Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

669
Views
How to delete a pod from EKS cluster?

I deployed a Elasticserach container to EKS cluster but I can't delete it.

$ kubectl get pods
NAME                           READY   STATUS              RESTARTS   AGE
kibana-f775fcb96-cvmkc         1/1     Running             0          81m
sample-es-0                    0/1     ContainerCreating   0          2m6s
sidecar-app-6b4bdbb86d-g5qb6   1/1     Running             0          81m

sample-es-0 is the pod I want to delete. But after run kubectl delete pod sample-es-0, it restarts by itself.

I have delete es deployment:

$ kubectl get deploy
NAME          READY   UP-TO-DATE   AVAILABLE   AGE
kibana        1/1     1            1           28h
sidecar-app   1/1     1            1           29h

and also check there is no es service running:

$ kubectl get service
NAME                 TYPE        CLUSTER-IP      EXTERNAL-IP   PORT(S)          AGE
kibana-entrypoint    ClusterIP   10.100.192.40   <none>        5601/TCP         28h
kubernetes           ClusterIP   10.100.0.1      <none>        443/TCP          6d10h
sidecar-entrypoint   NodePort    10.100.7.177    <none>        8080:32486/TCP   29h

And there is no replicaset for es either:

$ kubectl get replicaset
NAME                     DESIRED   CURRENT   READY   AGE
kibana-595fddf748        0         0         0       28h
kibana-66b96d587f        0         0         0       25h
kibana-69784478f         0         0         0       28h
kibana-6b47b7855f        0         0         0       26h
kibana-6c55cd9478        0         0         0       27h
kibana-6fdcc89695        0         0         0       11h
kibana-74c766ddbf        0         0         0       26h
kibana-756866579f        0         0         0       25h
kibana-b774d7b64         0         0         0       26h
kibana-bf8c496ff         0         0         0       23h
kibana-f775fcb96         1         1         1       170m
sidecar-app-54677877d4   0         0         0       27h
sidecar-app-566f6dd4d5   0         0         0       27h
sidecar-app-5ffdbbcb7c   0         0         0       23h
sidecar-app-67b46f5dfb   0         0         0       27h
sidecar-app-6955cc9bd9   0         0         0       23h
sidecar-app-6b4bdbb86d   1         1         1       137m
sidecar-app-6fdd5f9679   0         0         0       170m
sidecar-app-856978f87b   0         0         0       27h
sidecar-app-85c54787b8   0         0         0       26h
sidecar-app-8678db7cf8   0         0         0       11h
sidecar-app-d95f67768    0         0         0       25h

what other place should I check in order to delete it?

over 4 years ago · Santiago Trujillo
2 answers
Answer question

0

I found that the reason is the es pod is deployed via StatefulSet. It can be deleted by deleting the StatefulSet. kubectl delete StatefulSet es.

over 4 years ago · Santiago Trujillo Report

0

  • You need to delete the deployment, then it would delete the respected pods. For this use kubectl delete deployment <NAME>
  • Deleting a pod which is under a deployment will restarts it if that deployment is still in the place.

as you answered it was statefulset, but you didn't mentioned it was statefulset, you told deployment. Anyway, in both you need to delete the owner reference

over 4 years ago · Santiago Trujillo Report
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!