12.2 Deploying node agents with DaemonSet
View in the book.
Buy the book.
Inspect existing Daemonsets
$ kubectl get daemonset -n kube-system
NAME DESIRED CURRENT READY UP-TO-DATE AVAILABLE NODE SELECTOR AGE
anetd 7 7 6 7 6 kubernetes.io/os=linux 18h
anetd-win 0 0 0 0 0 kubernetes.io/os=windows 18h
filestore-node 7 7 6 7 6 kubernetes.io/os=linux 18h
fluentbit-gke-big 7 7 6 7 6 kubernetes.io/os=linux 18h
fluentbit-gke-small 0 0 0 0 0 kubernetes.io/os=linux 18h
gcsfusecsi-node 7 7 5 7 5 kubernetes.io/os=linux 18h
gke-metadata-server 7 7 6 7 1 beta.kubernetes.io/os=linux,iam.gke.io/gke-metadata-server-enabled=true 18h
gke-metrics-agent 7 7 6 7 6 <none> 18h
gke-metrics-agent-scaling-10 0 0 0 0 0 <none> 18h
gke-metrics-agent-scaling-100 0 0 0 0 0 <none> 18h
gke-metrics-agent-scaling-20 0 0 0 0 0 <none> 18h
gke-metrics-agent-scaling-200 0 0 0 0 0 <none> 18h
gke-metrics-agent-scaling-50 0 0 0 0 0 <none> 18h
gke-metrics-agent-scaling-500 0 0 0 0 0 <none> 18h
gke-metrics-agent-windows 0 0 0 0 0 kubernetes.io/os=windows 18h
image-package-extractor 7 7 5 7 5 kubernetes.io/os=linux 18h
ip-masq-agent 7 7 6 7 6 kubernetes.io/os=linux,node.kubernetes.io/masq-agent-ds-ready=true 18h
kube-proxy 0 0 0 0 0 kubernetes.io/os=linux,node.kubernetes.io/kube-proxy-ds-ready=true 18h
metadata-proxy-v0.1 0 0 0 0 0 cloud.google.com/metadata-proxy-ready=true,kubernetes.io/os=linux 18h
nccl-fastsocket-installer 0 0 0 0 0 <none> 18h
netd 7 7 6 7 6 cloud.google.com/gke-netd-ready=true,kubernetes.io/os=linux 18h
node-local-dns 7 7 6 7 6 addon.gke.io/node-local-dns-ds-ready=true 18h
nvidia-gpu-device-plugin-large-cos 0 0 0 0 0 <none> 18h
nvidia-gpu-device-plugin-large-ubuntu 0 0 0 0 0 <none> 18h
nvidia-gpu-device-plugin-medium-cos 0 0 0 0 0 <none> 18h
nvidia-gpu-device-plugin-medium-ubuntu 0 0 0 0 0 <none> 18h
nvidia-gpu-device-plugin-small-cos 0 0 0 0 0 <none> 18h
nvidia-gpu-device-plugin-small-ubuntu 0 0 0 0 0 <none> 18h
pdcsi-node 7 7 6 7 6 kubernetes.io/os=linux 18h
pdcsi-node-windows 0 0 0 0 0 kubernetes.io/os=windows 18h
runsc-metric-server 0 0 0 0 0 kubernetes.io/os=linux,sandbox.gke.io/runtime=gvisor 18h
tpu-device-plugin 0 0 0 0 0 <none> 18h
Make our own
$ kubectl create -f Chapter12/12.2_DaemonSet/logreader.yaml
daemonset.apps/logreader created
Once the Pods are ready
$ kubectl get pods
NAME READY STATUS RESTARTS AGE
logreader-7c6rc 1/1 Running 0 30s
logreader-8r6j4 1/1 Running 0 30s
logreader-l8448 1/1 Running 0 30s
timeserver-f94cc5dd9-65bl9 1/1 Running 0 3m59s
timeserver-f94cc5dd9-ljx4w 1/1 Running 0 2m14s
timeserver-f94cc5dd9-wqh6s 1/1 Running 0 93s
we can stream the logs:
$ kubectl logs -f logreader-2nbt4 --tail 10
==> /var/log/containers/filestore-node_kube-system_gcp-filestore-1b5.log <==
lock is held by gk3-autopilot-cluster-2sc2_e4337a2e and has not yet expired