Pulling private image from docker hub using minikube
i think what u need is to create a secrete which will tell kube from where it can pull your private image and its credentials
kubectl create secret docker-registry my-secret --docker-server=DOCKER_REGISTRY_SERVER --docker-username=DOCKER_USER --docker-password=DOCKER_PASSWORD --docker-email=DOCKER_EMAIL
below command to list your secretes
kubectl get secretNAME TYPE DATA AGEmy-secret kubernetes.io/dockercfg 1 100d
now in deployment defination u need to define whcih secret to use
apiVersion: extensions/v1beta1kind: Deploymentmetadata: name: web-deploymentspec: replicas: 1template: metadata: labels: app: nginx spec: containers: - name: nginx image: godraude/nginx imagePullPolicy: Always ports: - containerPort: 80 - containerPort: 443 imagePullSecrets: - name: my-secret
The problem was the image pull policy. It was set to Always
so docker was trying to pull the imagen even if it was present. Setting imagePullPolicy: Never
solved the issue.