Monday, February 13, 2017

Private docker registry on kubernete recipe

Encrypt docker config to base64.
cat ~/.docker/config.json | base64
Add encrypted data to data element.
apiVersion: v1
kind: Secret
metadata:
  name: docker-config
type: kubernetes.io/dockerconfigjson
data:
  .dockerconfigjson: ewoJI...
Refer docker-config as same level with container in deployment.
imagePullSecrets:
  - name: docker-config