Pulling images from private registry in Kubernetes

后端 未结 6 1534
忘了有多久
忘了有多久 2020-12-04 19:39

I have built a 4 node kubernetes cluster running multi-container pods all running on CoreOS. The images come from public and private repositories. Right now I have to log in

6条回答
  •  臣服心动
    2020-12-04 20:12

    I can confirm that imagePullSecrets not working with deployment, but you can

    kubectl create secret docker-registry myregistrykey --docker-server=DOCKER_REGISTRY_SERVER --docker-username=DOCKER_USER --docker-password=DOCKER_PASSWORD --docker-email=DOCKER_EMAIL
    kubectl edit serviceaccounts default
    

    Add

    imagePullSecrets:
    - name: myregistrykey
    

    To the end after Secrets, save and exit. And its works. Tested with Kubernetes 1.6.7

提交回复
热议问题