/Debugging_KubernetesCluster_part_I

This simply serves to be "how-to guide " for solving majorly faced issues in kuberenetes , and will be a handy note for new learners

๐Ÿงฉ๐Ÿงฉ Guide to solve basic kubernetes problems ๐Ÿงฉ๐Ÿงฉ

๐ŸŒผKubernetes is a container orchestration tool ,and while working with it errors are part of it ,but it would be time saving if we knew where to debug & fix the issue, as for a beginner things might get overwhelming.

Static Badge

Static Badge

Static Badge

๐Ÿ”Ž What is Kubernetes ?

Kuberenetes which is also widely refered to as k8s is open-source container orchestration technology used for managing your applications & automating deployments of software . Initially it was founded & owned by Google kbd>, but now is maintained by Cloud Native Computing Foundation

You can read more about it it here Kubernetes Overview

โ™ป๏ธ Why Kubernetes debugging is helpful ?

When deploying application to kubernetes clusters , which is itself a complex system has multiple components involved , at times during

Static Badge , Static Badge , Static Badge you may face common issues listed below , debugging provides essential information to track down the issue & Static Badge



๐Ÿ”ŒPre-requisites

    ๐ŸŸ  Kubernetes Cluster

    ๐ŸŸ  Kubectl



Here are 5 common k8s failures and how to fix them ๐Ÿ› ๏ธ

Screenshot





    ๐Ÿท๐Ÿ) ๐ˆ๐ฆ๐š๐ ๐ž-๐ฉ๐ฎ๐ฅ๐ฅ ๐›๐š๐œ๐ค ๐จ๐Ÿ๐Ÿ

    ๐Ÿท2) ๐‚๐ซ๐š๐ฌ๐ก-๐ฅ๐จ๐จ๐ฉ ๐›๐š๐œ๐ค ๐จ๐Ÿ๐Ÿ

    ๐Ÿท3) ๐…๐š๐ข๐ฅ๐ฎ๐ซ๐ž ๐ฐ๐ข๐ญ๐ก ๐„๐ฑ๐ข๐ญ ๐œ๐จ๐๐ž :๐Ÿ

    ๐Ÿท4) ๐…๐š๐ข๐ฅ๐ฎ๐ซ๐ž ๐ฐ๐ข๐ญ๐ก ๐„๐ฑ๐ข๐ญ ๐œ๐จ๐๐ž :๐Ÿ๐Ÿ๐Ÿ“

    ๐Ÿท5) ๐๐จ๐ /๐๐จ๐๐ž ๐ง๐จ๐ญ ๐ซ๐ž๐š๐๐ฒ

๐ŸŒต 1) ๐ˆ๐ฆ๐š๐ ๐ž-๐ฉ๐ฎ๐ฅ๐ฅ ๐›๐š๐œ๐ค ๐จ๐Ÿ๐Ÿ

Static Badge

~ Check for ๐™„๐™ข๐™–๐™œ๐™š ๐™ฅ๐™ช๐™ก๐™ก ๐™ฅ๐™ค๐™ก๐™ž๐™˜๐™ฎ , ๐™ฅ๐™š๐™ง๐™ข๐™ž๐™จ๐™จ๐™ž๐™ค๐™ฃ ๐™ฉ๐™ค ๐™ฅ๐™ช๐™ก๐™ก ๐™›๐™ง๐™ค๐™ข ๐™ง๐™š๐™ฅ๐™ค๐™จ๐™ž๐™ฉ๐™ค๐™ง๐™ฎ,๐™˜๐™ค๐™ง๐™ง๐™š๐™˜๐™ฉ ๐™ž๐™ข๐™–๐™œ๐™š ๐™ฃ๐™–๐™ข๐™š ๐™–๐™ก๐™ค๐™ฃ๐™œ ๐™ฌ๐™ž๐™ฉ๐™ ๐™ฉ๐™–๐™œ. Useful Commands ๐Ÿ”ฎ
    Kubectl describe po podname
    Kubectl get po podname
    Kubectl apply -f deployment File name


๐ŸŒต2) ๐‚๐ซ๐š๐ฌ๐ก-๐ฅ๐จ๐จ๐ฉ ๐›๐š๐œ๐ค ๐จ๐Ÿ๐Ÿ

Static Badge

~ Check for ๐˜พ๐™ค๐™ง๐™ง๐™š๐™˜๐™ฉ ๐™ž๐™ข๐™–๐™œ๐™š ๐™ฃ๐™–๐™ข๐™š ๐™–๐™ก๐™ค๐™ฃ๐™œ ๐™ฌ๐™ž๐™ฉ๐™ ๐™ฉ๐™–๐™œ , ๐™š๐™ฃ๐™ค๐™ช๐™œ๐™ ๐™ง๐™š๐™จ๐™ค๐™ช๐™ง๐™˜๐™š ๐™˜๐™ค๐™ฃ๐™จ๐™ฉ๐™ง๐™–๐™ž๐™ฃ๐™ฉ๐™จ,๐™ข๐™ž๐™จ๐™˜๐™ค๐™ฃ๐™›๐™ž๐™œ๐™ช๐™ง๐™–๐™ฉ๐™ž๐™ค๐™ฃ ๐™ค๐™› ๐™š๐™ฃ๐™ซ๐™ž๐™ง๐™ค๐™ฃ๐™ข๐™š๐™ฃ๐™ฉ ๐™ซ๐™–๐™ง๐™ž๐™–๐™—๐™ก๐™š๐™จ , ๐™–๐™ฅ๐™ฅ๐™ก๐™ž๐™˜๐™–๐™ฉ๐™ž๐™ค๐™ฃ ๐™›๐™–๐™ž๐™ก๐™ช๐™ง๐™š ๐™—๐™š๐™˜๐™–๐™ช๐™จ๐™š ๐™ค๐™› ( ๐™›๐™–๐™ž๐™ก ๐™ฉ๐™ค ๐™—๐™ช๐™ž๐™ก๐™™ ๐™Ÿ๐™–๐™ง ๐™›๐™ž๐™ก๐™š๐™จ , ๐™ž๐™จ๐™จ๐™ช๐™š๐™จ ๐™ฌ๐™๐™ž๐™ก๐™š ๐™—๐™ช๐™ž๐™ก๐™™๐™ž๐™ฃ๐™œ ๐™™๐™ค๐™˜๐™ ๐™š๐™ง ๐™ž๐™ข๐™–๐™œ๐™š. Useful Commands ๐Ÿ”ฎ
    Kubectl describe po podname
    Kubectl logs logs podname
    Also to check if enough resources are allocated (memory)


๐ŸŒต 3) ๐…๐š๐ข๐ฅ๐ฎ๐ซ๐ž ๐ฐ๐ข๐ญ๐ก ๐„๐ฑ๐ข๐ญ ๐œ๐จ๐๐ž :๐Ÿ

Static Badge

~ Check for ๐˜ผ๐™ฅ๐™ฅ๐™ก๐™ž๐™˜๐™–๐™ฉ๐™ž๐™ค๐™ฃ ๐™˜๐™ค๐™™๐™š ๐™˜๐™ง๐™–๐™จ๐™๐™š๐™จ , ๐™ž๐™ฃ๐™˜๐™ค๐™ง๐™ง๐™š๐™˜๐™ฉ ๐™š๐™ฃ๐™ซ๐™ž๐™ง๐™ค๐™ฃ๐™ข๐™š๐™ฃ๐™ฉ ๐™ซ๐™–๐™ง๐™ž๐™–๐™—๐™ก๐™š๐™จ, ๐™ž๐™ฃ๐™จ๐™ช๐™›๐™›๐™ž๐™˜๐™ž๐™š๐™ฃ๐™ฉ ๐™›๐™ž๐™ก๐™š ๐™ฅ๐™š๐™ง๐™ข๐™ž๐™จ๐™จ๐™ž๐™ค๐™ฃ๐™จ. Useful Commands ๐Ÿ”ฎ
    Kubectl logs podname
    Kubectl get po podname
    Kubectl apply -f deployment podname
    Lookout for any exceptions in logs /missing variables at code level as well .


๐ŸŒต 4) ๐…๐š๐ข๐ฅ๐ฎ๐ซ๐ž ๐ฐ๐ข๐ญ๐ก ๐„๐ฑ๐ข๐ญ ๐œ๐จ๐๐ž :๐Ÿ๐Ÿ๐Ÿ“

Static Badge

~ Check for ๐™ž๐™ฃ๐™˜๐™ค๐™ง๐™ง๐™š๐™˜๐™ฉ ๐™›๐™ž๐™ก๐™š ๐™ฅ๐™š๐™ง๐™ข๐™ž๐™จ๐™จ๐™ž๐™ค๐™ฃ๐™จ , ๐™š๐™ญ๐™˜๐™š๐™ฅ๐™ฉ๐™ž๐™ค๐™ฃ๐™จ ๐™™๐™ช๐™ง๐™ž๐™ฃ๐™œ ๐™—๐™ค๐™ค๐™ฉ๐™ž๐™ฃ๐™œ ๐™ช๐™ฅ ๐™ค๐™› ๐™ฅ๐™ค๐™™ Useful Commands ๐Ÿ”ฎ
    Kubectl logs podname
    Kubectl describe podname


๐ŸŒต5) ๐๐จ๐/๐๐จ๐๐ž ๐ง๐จ๐ญ ๐ซ๐ž๐š๐๐ฒ

Static Badge

~ Check for ๐™‰๐™š๐™ฉ๐™ฌ๐™ค๐™ง๐™  ๐˜พ๐™ค๐™ฃ๐™ฃ๐™š๐™˜๐™ฉ๐™ž๐™ซ๐™ž๐™ฉ๐™ฎ , ๐™š๐™ฃ๐™ค๐™ช๐™œ๐™ ๐™ง๐™š๐™จ๐™ค๐™ช๐™ง๐™˜๐™š ๐™–๐™ก๐™ก๐™ค๐™˜๐™–๐™ฉ๐™ž๐™ค๐™ฃ ,๐™ช๐™ฃ๐™๐™š๐™–๐™ก๐™ฉ๐™๐™ฎ ๐™ฅ๐™ง๐™ค๐™˜๐™š๐™จ๐™จ๐™š๐™จ Useful Commands ๐Ÿ”ฎ
    Kubectl logs podname
    Kubectl get po podname and check for its state
    Increase system resource usage



Wrapping up

If you have came reading this far I really appreciate it. If you found it helpful, please share it so you can help another developer improve their projects.

You can connect with me :