启动 私库命令:
docker run -d -p 5000:5000 -v /home/test/docker-certs:/certs -e REGISTRY_HTTP_ADDR=0.0.0.0:5000 -e REGISTRY_HTTP_TLS_CERTIFICATE=/certs/test-registry.crt -e REGISTRY_HTTP_TLS_KEY=/certs/test-registry.key --restart=always --name registry registry:latest
私库启动成功之后,上传镜像成功
yaml 文件内容:
执行命令: kubectl create -f postgres.yaml
报错信息:
Failed to pull image “192.168.0.129:5000/postgres:v1”: rpc error: code = Unknown desc = failed to pull and unpack image “192.168.0.129:5000/postgres:v1”: failed to resolve reference “192.168.0.129:5000/postgres:v1”: failed to do request: Head “https://192.168.0.129:5000/v2/postgres/manifests/v1”: x509: certificate signed by unknown authority
手动执行 docker pull 192.168.0.129:5000/postgres:v1 可以下载镜像
创建pod 就会报: x509: certificate signed by unknown authority