I am running the following command on the master node, to create a daemonset on a Kubernetes cluster.
$ kubectl apply -f https://k8s.io/examples/controllers/daemonset.yaml
I think it got created successfully because the following message is shown,
daemonset.apps/fluentd-elasticsearch created
But after that when I run,
$ kubectl get daemonsets
No resources found in default namespace
So I tried to recreate the same but this time it shows,
$ kubectl apply -f https://k8s.io/examples/controllers/daemonset.yaml
daemonset.apps/fluentd-elasticsearch unchanged
I don’t understand what is happening here. An explanation would be highly appreciated.
It's getting deployed in
kube-systemnamespace since the deployment yaml hasnamespace: kube-systemkubectl get daemonsetscommand showsdaemonsetsfromdefaultnamespace and hence it givesNo resources foundYou need to add
-nparameter in the command to checkdaemonsetscreated in a specific namespace such askube-system