Pull an Image from a Private Registry in Kubernetes
Jump to navigation
Jump to search
1) kubectl create secret docker-registry LowercaseRFC1123NAME --docker-username=user --docker-password=password
kubectl get secret LowercaseRFC1123NAME --output=yaml
2) imagePullSecrets
:
- name: LowercaseRFC1123NAME
kubectl create secret generic YOURregcred --from-file=.dockerconfigjson=/path/to/.docker/config.json --type=kubernetes.io/dockerconfigjson
kubectl create secret docker-registry ~/.docker/config.json
Errors[edit]
Error: INSTALLATION FAILED: 1 error occurred: * Deployment in version "v1" cannot be handled as a Deployment: json: cannot unmarshal string into Go struct field PodSpec.spec.template.spec.imagePullSecrets of type v1.LocalObjectReference
Related[edit]
spec.imagePullSecrets
- Container registry
docker pull
helm install
~/.docker/config.json
kubernetes.io/dockerconfigjson
kind: Secret
See also[edit]
helm install [ --set | --dry-run | --debug | --timeout | --namespace | --create-namespace | --generate-name | --help ] values.yaml
,helm upgrade --install
docker login, PAT, docker login --help, ~/.dockercfg, ~/.docker/config.json
- Kubernetes security, OPA, EKS security, PSA, PSS, CKS,
SecurityContext
, Trivy, KubeBench, Kubernetes Admission Controllersadmissionregistration.k8s.io
, Hardeneks, Gatekeeper (Kubernetes),kubernetes.io/enforce-mountable-secrets
, Auditing
Advertising: