Report this

What is the reason for this report?

Kubernetes cluster not working, status shows down

Posted on August 2, 2019

I have followed https://www.digitalocean.com/community/tutorials/how-to-automate-deployments-to-digitalocean-kubernetes-with-circleci and https://www.digitalocean.com/docs/kubernetes/how-to/add-load-balancers/ to setup cicd and a loadbalancer configuration. However my cluster is clearly not working as it’s show status down. Could someone enlighten me on what I could be doing wrong? Below is some output of the services and pods.

$ kubectl get services                          
NAME                       TYPE           CLUSTER-IP       EXTERNAL-IP       PORT(S)        AGE
do-kubernetes-sample-app   ClusterIP      10.245.218.135   <none>            80/TCP         10d
kubernetes                 ClusterIP      10.245.0.1       <none>            443/TCP        11d
sample-load-balancer       LoadBalancer   10.245.8.9       XXX.XXX.XXX.XXX   80:32454/TCP   38h

$ kubectl get pods --all-namespaces 
NAMESPACE     NAME                                        READY   STATUS             RESTARTS   AGE
default       do-kubernetes-sample-app-6fbf58f5bb-hfhpw   1/1     Running            0          19h
default       do-kubernetes-sample-app-79665478bf-b8dm5   0/1     InvalidImageName   0          9h
kube-system   cilium-operator-6b899cc7db-946pr            1/1     Running            19         10d
kube-system   cilium-vtvw8                                1/1     Running            6          10d
kube-system   coredns-78dc9d6fc7-8lx2p                    1/1     Running            2          10d
kube-system   coredns-78dc9d6fc7-zz6jk                    1/1     Running            2          10d
kube-system   csi-do-node-6cx7t                           2/2     Running            2          10d
kube-system   do-node-agent-zmffw                         1/1     Running            1          10d
kube-system   kube-proxy-j8j9s                            1/1     Running            1          10d

$ kubectl get pods --field-selector=status.phase=Running
NAME                                        READY   STATUS    RESTARTS   AGE
do-kubernetes-sample-app-6fbf58f5bb-hfhpw   1/1     Running   0          19h



This textbox defaults to using Markdown to format your answer.

You can type !ref in this text area to quickly search our full set of tutorials, documentation & marketplace offerings and insert the link!

These answers are provided by our Community. If you find them useful, show some love by clicking the heart. If you run into issues leave a comment, or add your own answer to help others.

This comment has been deleted

Heya,

Just came across this answer and decided to write some general guidelines for anyone who comes across this in the future despite the old question.

InvalidImageName suggests that the Docker image specified in your Kubernetes manifests can’t be found. Here are some possibilities:

  • The image doesn’t exist
  • The image registry isn’t reachable
  • There’s a typo in the image name

To troubleshoot:

  1. Check the image name and version you’ve used in your manifests.
  2. If the image is hosted on Docker Hub, you should be able to inspect it at dockerhub.com/r/<username>/<image>:tag.
  3. If the image is in a private registry, ensure your Kubernetes nodes have access to the image registry, and the correct access credentials are created as a Docker registry secret in your Kubernetes cluster.

You can use the following command to inspect the information about a problematic pod: kubectl describe pod <pod-name> It will provide more details, including the events occurring to the pod. In case you find out that there is indeed an issue with the image or the image registry, you can update the Deployment or the pod’s manifest file with the correct image information and then apply the changes: kubectl apply -f <manifest.yaml> For more robust debugging, check this guide that is part of the DigitalOcean documentation.

Hope that this helps!

The developer cloud

Scale up as you grow — whether you're running one virtual machine or ten thousand.

Get started for free

Sign up and get $200 in credit for your first 60 days with DigitalOcean.*

*This promotional offer applies to new accounts only.