Restart a Pod

About this task

The following steps explain how to restart a pod in your own environment

Procedure

  1. Log in to AWS Management Console.
  2. Click the icon to open AWS Cloudshell as shown in the following figure.
  3. 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:
  4. 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:
  5. To delete any pod, run the following command:
    Kubectl delete pod <pod-name>
    For example:
    Kubectl delete pod historian-archiver-sts-0
  6. To verify that pod was deleted, run the following command:
    Kubectl get pods
    The output of this command will generate a result similar to the following:
    Note: The age of the container will be few seconds, as it got restarted after deletion.