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-system
namespace since the deployment yaml hasnamespace: kube-system
kubectl get daemonsets
command showsdaemonsets
fromdefault
namespace and hence it givesNo resources found
You need to add
-n
parameter in the command to checkdaemonsets
created in a specific namespace such askube-system