You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
We just created a new static pod named static-greenbox. Find it and delete it.
controlplane $ kubectl get pods
NAME READY STATUS RESTARTS AGE
static-busybox-controlplane 1/1 Running 0 5m5s
static-greenbox-node01 1/1 Running 0 4m10s
that means pod is created on node01. Let's get its IP address
controlplane $ kubectl get node -o wide
NAME STATUS ROLES AGE VERSION INTERNAL-IP EXTERNAL-IP OS-IMAGE KERNEL-VERSION CONTAINER-RUNTIME
controlplane Ready master 50m v1.19.0 172.17.0.19 <none> Ubuntu 18.04.5 LTS 4.15.0-122-generic docker://19.3.13
node01 Ready <none> 50m v1.19.0 172.17.0.23 <none> Ubuntu 18.04.5 LTS 4.15.0-122-generic docker://19.3.13
Let's try ssh into it
controlplane $ ssh node01
ssh: Could not resolve hostname node01: Temporary failure in name resolution
## that means its not added to host file
controlplane $ ssh 172.17.0.23
node01 $
Let's see kubelet service and get the static pod file path
node01 $ cd /etc/just-to-mess-with-you
node01 $ ls
greenbox.yaml
node01 $ rm greenbox.yaml
node01 $ kubectl get pods
The connection to the server localhost:8080 was refused - did you specify the right host or port?
node01 $ exitlogout
Connection to 172.17.0.23 closed.
controlplane $ kubectl get pods
NAME READY STATUS RESTARTS AGE
static-busybox-controlplane 1/1 Running 0 10m
static-greenbox-node01 1/1 Running 0 9m41s
## WAIT WHAT ? Let's check again
controlplane $ ssh 172.17.0.23
node01 $ cd /etc/just-to-mess-with-you
node01 $ ls
node01 $ kubectl get pods
The connection to the server localhost:8080 was refused - did you specify the right host or port?
node01 $ exitlogout
Connection to 172.17.0.23 closed.
controlplane $ kubectl get pods
NAME READY STATUS RESTARTS AGE
static-busybox-controlplane 1/1 Running 0 11m
## Ah okay, that means it takes come time to get deleted :)