This repository contains a Kubernetes pod configuration designed for performing basic sanity checks within a Kubernetes cluster. It is useful for troubleshooting, testing connectivity, and verifying that a Kubernetes environment is functioning as expected.
- Sanity Check Pod: Simple pod for performing basic network connectivity and service availability checks.
- Custom Commands: Can run custom diagnostic commands within the pod.
- Minimalistic and Lightweight: Uses a lightweight container image for fast startup.
- Kubernetes Cluster: A running Kubernetes cluster.
- kubectl: Installed and configured to interact with your Kubernetes cluster.
/
├── /sanity-check-pod.yaml # Kubernetes Pod YAML configuration
├── /scripts/ # Optional scripts for testing
├── /Dockerfile # Dockerfile to build a custom image (optional)
└── /README.md # Project README (this file)
git clone https://github.com/vishnuswmech/sanity-check-pod.git
cd sanity-check-pod
Apply the provided Kubernetes pod configuration:
kubectl apply -f sanity-check-pod.yaml
This will deploy a simple pod that you can use to test your Kubernetes environment.
Ensure the pod is running by checking its status:
kubectl get pods
Once the pod is in a Running
state, you can execute commands inside the pod.
You can execute commands inside the sanity check pod for diagnostics. For example, to test connectivity to another service:
kubectl exec -it <pod-name> -- ping google.com
You can replace <pod-name>
with the actual pod name retrieved from the kubectl get pods
command.
To clean up and delete the sanity check pod:
kubectl delete -f sanity-check-pod.yaml
The repository includes a Dockerfile
for creating a custom image for the sanity check pod. You can build and use your own image if needed:
docker build -t sanity-check:latest .
Then, you can modify the sanity-check-pod.yaml
to use your custom image.