AWS EKS Kubernetes and DockerHub

MasterOfTheHouse

I have a cluster and node creates in AWS EKS. I applied the deployment to that cluster as under

kubectl apply -f deployment.yaml

Where deployment.yaml contains the containers' specification along with DockerHub repo and image

However, I did a mistake in deployment.yaml and I need to re-apply it to the configuration

My question is:

1 - How do I reapply a deployment.yaml to the AWS EKS cluster using kubectl? Just running the above command is not working (kubectl apply -f deployment.yaml)

2- After I re-apply the deployment.yaml , will the node will go an pick up the DockerHub image or do I still need to do something else( supposing all the other details are ok)

Some outputs below:

>> kubectl get pods

my-app-786dc95d8f-b6w4h   0/1     ImagePullBackOff   0          9h
my-app-786dc95d8f-w8hkg   0/1     ImagePullBackOff   0          9h
kubectl describe pod my-app-786dc95d8f-b6w4h                                                                            
Name:         my-app-786dc95d8f-b6w4h
Namespace:    default
Priority:     0
Node:         ip-192-168-24-13.ec2.internal/192.168.24.13
Start Time:   Fri, 10 Jul 2020 12:54:38 -0400
Labels:       app=my-app
              pod-template-hash=786dc95d8f
Annotations:  kubernetes.io/psp: eks.privileged
Status:       Pending
IP:           192.168.7.235
IPs:
  IP:           192.168.7.235
Controlled By:  ReplicaSet/my-app-786dc95d8f
Containers:
  simple-node:
    Container ID:
    Image:          BAD_REPO/simple-node
    Image ID:
    Port:           80/TCP
    Host Port:      0/TCP
    State:          Waiting
      Reason:       ImagePullBackOff
    Ready:          False
    Restart Count:  0
    Environment:    <none>
    Mounts:
      /var/run/secrets/kubernetes.io/serviceaccount from default-token-mwwvl (ro)
Conditions:
  Type              Status
  Initialized       True
  Ready             False
  ContainersReady   False
  PodScheduled      True
Volumes:
  default-token-mwwvl:
    Type:        Secret (a volume populated by a Secret)
    SecretName:  default-token-mwwvl
    Optional:    false
QoS Class:       BestEffort
Node-Selectors:  <none>
Tolerations:     node.kubernetes.io/not-ready:NoExecute for 300s
                 node.kubernetes.io/unreachable:NoExecute for 300s
Events:
  Type     Reason   Age                    From                                    Message
  ----     ------   ----                   ----                                    -------
  Normal   BackOff  17m (x2570 over 9h)    kubelet, ip-192-168-24-13.ec2.internal  Back-off pulling image "BAD_REPO/simple-node"
  Warning  Failed   2m48s (x2634 over 9h)  kubelet, ip-192-168-24-13.ec2.internal  Error: ImagePullBackOff

BR

Abdennour TOUMI

ImagePullBackOff means that kubernetes is not able to pull the image.

Specially, the service account "default" is not able to pull the image.

To fix this issue, you need two checks:

  • Check that you don't have typo in the image name and tag. And that image is available publically.
  • If the Docker registry is private, make sure to create secret with dockerlogin type, and then patch the service account "default" by this secret.

Collected from the Internet

Please contact [email protected] to delete if infringement.

edited at
0

Comments

0 comments
Login to comment

Related

Kubernetes EKS Ingress and TLS

Amazon Kubernetes AWS-EKS is not getting created properly or not synched with kubectl

Helm on AWS EKS

Kubernetes on Docker for Windows -> AKS/EKS

AWS CodePipeline and deployingto EKS

Only the creator user can manage AWS kubernetes cluster (EKS) from kubectl?

Pod limit on Node - AWS EKS

Get list of all pods (including deleted) for kubernetes cluster? (AWS EKS)

Where are the Kubernetes kubelet logs located for the AWS EKS Clusters?

How to write Spark logs to S3 when using Kubernetes (EKS)? Error: Unrecognized option: --spark.kubernetes.driver.secretKeyRef.AWS_ACCESS_KEY_ID

aws-iam-authenticator & EKS

LetsEncrypt not verifying via Kubernetes ingress and loadbalancer in AWS EKS

Enabling AWS Group to access AWS EKS cluster

EKS + NLB: `service.beta.kubernetes.io/aws-load-balancer-internal: true` not working with `service.beta.kubernetes.io/aws-load-balancer-type: nlb`

Kubernetes AWS Fargate (EKS) continuously terminating pod hosting React service

AWS EKS Cluster , DockerHub and Traefik, not accessible from internet

Kubernetes AWS EKS Failed to load resource: net::ERR_NAME_NOT_RESOLVED

Kubernetes AWS Cloudwatch adapter not fetching custom metric value for EKS HPA autoscaling

kubectl authentication to aws eks cluster

Kubernetes - In AWS EKS Fargate How Can I Send Logs From One Container To FluentD For Splunk?

How does a Network Load Balancer work with an Ingress Controller in Kubernetes (AWS/EKS)?

Autoscaling Kubernetes based on number of Jobs on AWS EKS

Using Kong with AWS EKS

aws eks and aws sso RBAC authentication problem

AWS EKS fargate coredns ImagePullBackOff

AWS EKS IAM Addon Policies

Kubernetes daemonset not running at all in AWS EKS 1.21

Is it possible to retrieve logs from kubernetes pods through API endpoint from AWS EKS?

SSL configuration for ingress in aws EKS