Create a faulty pod and Fix it
Muhammad Afaq Nasir
DevOps Specialist | Expertise in CI/CD Pipelines, Cloud Management & DevSecOps Solutions | Streamlining Automation & Infrastructure for Maximum Efficiency
Create a faulty pod
vim pod2.yaml
write the pod definition file
apiVersion: v1
kind: Pod
metadata:
name: nginx12
spec:
containers:
- name: nginx
image: nginox:1.14.2
ports:
- containerPort: 80
kubectl apply -f pod2.yaml
Find the problem
kubectl get pod
kubectl get pod -o wide
kubectl get pod nginx12 -o yaml
kubectl describe pod nginx12
kubectl logs nginx12
Fix it
vim pod2.yaml
update the pod definition file
apiVersion: v1
kind: Pod
metadata:
name: nginx12
spec:
containers:
- name: nginx
image: nginx:latest
ports:
- containerPort: 80
kubectl apply -f pod2.yaml