"Buenos Aires": Kubernetes Pod Crashing
Scenario: "Buenos Aires": Kubernetes Pod Crashing
Level: Medium
Type: Fix
Tags: kubernetes python
Access: Email
Description: There are two pods: "logger" and "logshipper" living in the default namespace. Unfortunately, logshipper has an issue (crashlooping) and is forbidden to see what logger is trying to say. Could you help fix Logshipper?
Do not change the K8S definition of the logshipper pod.
Because k8s takes a minute or two to change the pod state initially, the check for the scenario is made to fail in the first two minutes.
Credit Srivatsav Kondragunta
Root (sudo) Access: True
Test: kubectl get pods -l app=logshipper --no-headers -o json | jq -r '.items[] | "\(.status.containerStatuses[0].ready)"' returns true
The logshipper pod still uses ServiceAccount logshipper-sa (do not change the logshipper pod spec).
The "Check My Solution" button runs the script /home/admin/agent/check.sh, which you can see and execute.
Time to Solve: 20 minutes.