Closed amoyx closed 6 years ago
Hi,
I'm not sure Google Translate worked correctly, please correct in english if not.
You need to first create the appropriate secrets using K8sSecret. For example:
config = K8sConfig(kubeconfig=kubeconfig_fallback)
secret = K8sSecret(config=config,name='my-pull-secret')
data = {"auths": {"repo:port": {"auth": "authstring", "email": "you@company.com"}}}
secret.dockerconfigjson = data
s = secret.create()
deploy = K8sDeployment(config=config, name='my-deployment')
deploy.add_image_pull_secrets(secret={'name': 'my-pull-secret'})
Please let me know if this helps.
Regards,
Sebastien
@sebastienc thks, perfect
使用K8sDeployment时,不知道如何使用 add_image_pull_secrets, 由于拉取docker镜像时需要密钥。但是不知道如何使用add_image_pull_secrets