Restart a Pod
About this task
Procedure
- Log in to AWS Management Console.
- Click the icon to open AWS Cloudshell as shown in the following figure.
-
Run the following command to get your EKS cluster authority:
aws eks update-kubeconfig --name <EKS Cluster Name> --region <region name >
After you complete the deployment, you can get EKS cluster name in the output like this:
The region name is the region where the EKS cluster is deployed.The output of the following command will show something like the following: -
Run the following command to get all running pods into your EKS
cluster:
Kubectl get pods
The output of the previous command will generate a result similar to the following: -
To delete any pod, run the following command:
Kubectl delete pod <pod-name>
For example:Kubectl delete pod historian-archiver-sts-0
-
To verify that pod was deleted, run the following command:
The output of this command will generate a result similar to the following:Kubectl get pods
Note: The age of the container will be few seconds, as it got restarted after deletion.