---
# kubectl create secret docker-registry private-registry-secret --docker-server=registry.domain.com --docker-username=your_username --docker-password=your_password

kind: Secret
apiVersion: v1
metadata:
  name: private-registry-secret
type: kubernetes.io/dockerconfigjson
data:
  .dockerconfigjson: |
    {"auths":{"registry.domain.com":{"username":"your_username","password":"your_password","auth":"base64(your_username:your_password)"}}}

# 添加到默认的 SA
# kubectl patch serviceaccount default -p '{"imagePullSecrets": [{"name": "private-registry-secret"}]}'
