Kubernetes Code Help
Budget $10-30 USD
Job Description:
Design and implement a small program that finds pods in “bad” or “completed” states and forcibly delete them from the cluster, in order to avoid delaying deployments, or causing load on the Kubernetes API server.
• Write a program in any language that scans all pods in a Kubernetes cluster, and finds pods in specific states - “Terminating”, “Completed”, “Failed”
• If the pod has been in this state for more than N minutes (configurable and in argument to the program), delete the pod, either by force or normally.
• Write unit tests
The program should consider the cases where we want to forcefully delete, delete normally, or avoid taking action. Consider how this program will run on multiple clusters and how you would monitor the results across multiple clusters.
To test it, use the pod manifests, to reproduce a pod in Completed:
apiVersion: v1
kind: Pod
metadata:
name: successful-pod
namespace: default
spec:
containers:
- name: main
image: busybox:1.28
command: ["/bin/sh"]
args:
- "-c"
- "exit 0"
To test it, use the pod manifests, to reproduce a pod in Failed:
apiVersion: v1
kind: Pod
metadata:
name: failed-pod
namespace: default
spec:
containers:
- name: main
image: busybox:1.28
command: ["/bin/sh"]
args:
- "-c"
- "exit 1"
To test it, use the pod manifests, to reproduce a pod stuck in Terminating state:
apiVersion: v1
kind: Pod
metadata:
name: terminating-pod
namespace: default
spec:
terminationGracePeriodSeconds: 50000
containers:
- name: main
image: busybox:1.28
command: ["/bin/sh"]
args:
- "-c"
- "sleep 99999"
Décerné à:
Hi, I'm a Certified Kubernetes Administrator with 8 years of experience ([login to view URL]) I work with kubernetes on a daily basis. I'm thinking of doing this project using client-go in gola Plus
5 freelances font une offre moyenne de 140 $ pour ce travail
hi, i'm sre for 9 years. hope to work with you hi, i'm sre for 9 years. hope to work with youhi, i'm sre for 9 years. hope to work with you
Good Day, I have read your requirement for developing a program to get state of pods and accordingly do actions. I can write such code. Let's discuss in this in chat. Regards Amardeep Singh
Hi, I can do it using Kubernetes API for java, have worked on Kubernetes a lot recently and deployed 4 apps on GKE also formalized the way we do CICD using Kubernetes. I have some questions though let's discuss in deta Plus
Hi I am a certified aws professional. I have knowledge on aws services like EC2, S3, VPC, Route 53, IAM, KMS, Cloud Watch, Cloud Front, AWS Lambda, SNS, SES, SQS, EKS, ECR, MWAA, FSX and RDS. I am specialized in areas Plus