k8s服务拉取镜像swr报错解决

1、生成password

printf AK| openssl dgst -binary -sha256 -hmac SK| od -An -vtx1 | sed 's/[ \n]//g' | sed 'N;s/\n//'

2、创建secret

kubectl create secret docker-registry regsecret --docker-server=swr.cn-east-3.myhuaweicloud.com --docker-username=cn-east-3@AK--docker-
password=password -n prod

配置使用secret拉取镜像,添加imagePullSecrets两行

   imagePullSecrets:
   - name: regsecret

你可能感兴趣的:(k8s,paas,docker)