在每个namespace下都有一个默认的service account
使用 kubectl get sa -n uat-gaohe 查看
kubectl describe sa -n uat-gaohe查看serviceaccount信息
Image pull secrets 是ns下拉取镜像的秘钥
1.创建secret
kubectl create secret -p docker-registry registrykey --namespace=uat-gaohe --docker-username=harbor_user --docker-password=harbor_password --docker-server=harbar_url
2.配置进service account
kubectl patch serviceaccount default -p '{"imagePullSecrets": [{"name": "registrykey"}]}' -n uat-gaohe
至此在uat-gaohe下拉取镜像无需配置镜像拉取秘钥了