Description

This article explains a few basic kubernetes commands that can be used to diagnose/troubleshoot pods/container related issues in Paragon Automation.

Symptoms

This article describes a few basic commands used in kubernetes

Solution

To get the list and status of pods in the PA setup, run the command:

kubectl get pods -A

 

To get extensive status of the pods, run the command:

kubectl get pods -o wide -A

 

To get the list and status of nodes in the PA setup, run the command

kubectl get nodes

 

To get the CPU and memory utilization by each pod, run the command:

kubectl top pods

 

To get the kubectl logs - which can show the logs for the pods:

 

kubectl logs <podname> -n <namespace name>

 

 

To get the status of the any specific pod, you can run the following commands:

 

kubectl get pods -n healthbot | grep -i <any pattern used in the pod name>

 

 

To continuously stream the logs of a pod in real-time, use the -f flag:

kubectl logs -f <pod-name> -n <namespace>

 

 

To restart a pod OR delete and recreate it , you can run the command:

kubectl delete pod <pod-name> -n <namespace>

Modification History

2024-11-22 : Article Created