Cannot deploy yaml manifest in Minikube

0

0

Here is my manifest:

apiVersion: apps/v1
kind: Deployment
metadata:
  name: nginx-deployment
  labels:
    app: nginx
spec:
  replicas: 3
  selector:
    matchLabels:
      app: nginx
  template:
    metadata:
      labels:
        app: nginx
    spec:
      containers:
      - name: nginx
        image: nginx:1.7.9
        ports:
        - containerPort: 8080

I perform

mbp15-igunko:~ igunko$ kubectl apply -f deploy.yml
deployment.apps/nginx-deployment created

But as a result my pods are down:

bp15-igunko:~ igunko$ kubectl get pods
NAME                                READY   STATUS             RESTARTS   AGE
nginx-deployment-6dbcd856f5-f6bcl   0/1     ImagePullBackOff   0          46s
nginx-deployment-6dbcd856f5-j6zzh   0/1     ImagePullBackOff   0          46s
nginx-deployment-6dbcd856f5-tnqcz   0/1     ImagePullBackOff   0          46s

Here is an error log:

mbp15-igunko:~ igunko$ kubectl logs nginx-deployment-6dbcd856f5-f6bcl
Error from server (BadRequest): container "nginx" in pod "nginx-deployment-6dbcd856f5-f6bcl" is waiting to start: trying and failing to pull image

However, I can pull the image:

mbp15-igunko:~ igunko$ docker pull nginx:1.7.9
1.7.9: Pulling from library/nginx
[DEPRECATION NOTICE] registry v2 schema1 support will be removed in an upcoming release. Please contact admins of the docker.io registry NOW to avoid future disruption.
a3ed95caeb02: Already exists 
6f5424ebd796: Already exists 
d15444df170a: Already exists 
e83f073daa67: Already exists 
a4d93e421023: Already exists 
084adbca2647: Already exists 
c9cec474c523: Already exists 
Digest: sha256:e3456c851a152494c3e4ff5fcc26f240206abac0c9d794affb40e0714846c451
Status: Image is up to date for nginx:1.7.9
docker.io/library/nginx:1.7.9

I use minikube v1.3.1 on Darwin 10.14.6, Kubernetes v1.15.2 on Docker 18.09.8 on MacOS.

Illia G

Posted 2019-08-14T14:23:06.233

Reputation: 1

No answers