Create the agent in peaks-1yazqpp:
sh
kubectl apply -n peaks-1yazqpp -f - <<EOF
apiVersion: apps/v1
kind: DaemonSet
metadata:
name: log-agent
spec:
selector:
matchLabels:
app: log-agent
template:
metadata:
labels:
app: log-agent
spec:
containers:
- name: agent
image: busybox
command: ["sh", "-c", "while true; do echo shipping logs; sleep 10; done"]
EOF
kubectl get ds,pods -n peaks-1yazqpp -o wideOne node has no agent. Find its taint, then apply the DaemonSet again with a toleration in the template, next to containers:
yaml
tolerations:
- key: dedicated
operator: Exists
effect: NoScheduleFinally, grow the cluster and watch the agent follow:
sh
kubectl apply -f - <<EOF
apiVersion: v1
kind: Node
metadata:
name: peaks-node-4
labels:
zone: east
EOF
kubectl get ds -n peaks-1yazqpp