How many DaemonSets are created in the cluster in all namespaces?
Check all namespaces
kubectl get daemonsets --all-namespaces | wc -l
8
The outout gave 8 which means there are 7 daemon-sets . The first row is for the heading section itself.
Which namespace are the DaemonSets created in?
master $ kubectl get daemonsets --all-namespaces
NAMESPACE NAME DESIRED CURRENT READY UP-TO-DATE AVAILABLE NODE SELECTOR AGE
kube-system kube-flannel-ds-amd64 2 2 2 2 2 <none> 10m
kube-system kube-flannel-ds-arm 0 0 0 0 0 <none> 10m
kube-system kube-flannel-ds-arm64 0 0 0 0 0 <none> 10m
kube-system kube-flannel-ds-ppc64le 0 0 0 0 0 <none> 10m
kube-system kube-flannel-ds-s390x 0 0 0 0 0 <none> 10m
kube-system kube-keepalived-vip 1 1 1 1 1 <none> 10m
kube-system kube-proxy 2 2 2 2 2 kubernetes.io/os=linux 10m
From above, the namespace is kube-system.
On how many nodes are the pods scheduled by the DaemonSet kube-proxy
--
master $ kubectl describe daemonset kube-proxy --namespace=kube-proxy
Error from server (NotFound): namespaces "kube-proxy" not found
master $ kubectl describe daemonset kube-proxy --namespace=kube-system
Name: kube-proxy
Selector: k8s-app=kube-proxy
Node-Selector: kubernetes.io/os=linux
Labels: k8s-app=kube-proxy
Annotations: deprecated.daemonset.template.generation: 1
Desired Number of Nodes Scheduled: 2
Current Number of Nodes Scheduled: 2
Number of Nodes Scheduled with Up-to-date Pods: 2
Number of Nodes Scheduled with Available Pods: 2
Number of Nodes Misscheduled: 0
Pods Status: 2 Running / 0 Waiting / 0 Succeeded / 0 Failed
Pod Template:
Labels: k8s-app=kube-proxy
Service Account: kube-proxy
Containers:
kube-proxy:
Image: k8s.gcr.io/kube-proxy:v1.18.0
Port: <none>
Host Port: <none>
Command:
/usr/local/bin/kube-proxy
--config=/var/lib/kube-proxy/config.conf
--hostname-override=$(NODE_NAME)
Environment:
NODE_NAME: (v1:spec.nodeName)
Mounts:
/lib/modules from lib-modules (ro)
/run/xtables.lock from xtables-lock (rw)
/var/lib/kube-proxy from kube-proxy (rw)
Volumes:
kube-proxy:
Type: ConfigMap (a volume populated by a ConfigMap)
Name: kube-proxy
Optional: false
xtables-lock:
Type: HostPath (bare host directory volume)
Path: /run/xtables.lock
HostPathType: FileOrCreate
lib-modules:
Type: HostPath (bare host directory volume)
Path: /lib/modules
HostPathType:
Priority Class Name: system-node-critical
Events:
Type Reason Age From Message
---- ------ ---- ---- -------
Normal SuccessfulCreate 37m daemonset-controller Createdpod: kube-proxy-smvpc
Normal SuccessfulCreate 36m daemonset-controller Createdpod: kube-proxy-6wwgd
So from above, we can see the answer is 2.
What is the image used by the POD deployed by the kube-flannel-ds-amd64 DaemonSet?
-- Similiar approach like above to get the description and image from there
master $ kubectl describe daemonset kube-flannel-ds-amd64 --namespace=kube-system | grep -i image
Image: quay.io/coreos/flannel:v0.12.0-amd64
Image: quay.io/coreos/flannel:v0.12.0-amd64
No comments:
Post a Comment