Kubernetes - install the agent only on the desired nodes

If the client has multiple nodes but, for some reason, instana agent shouldn't monitor all nodes, then the client can install the agent only on desired nodes by using NodeAfinity property.


Example:

apiVersion: v1
kind: Pod
metadata:
name: with-node-affinity
spec:
affinity:
nodeAffinity:
requiredDuringSchedulingIgnoredDuringExecution:
nodeSelectorTerms:
- matchExpressions:
- key: kubernetes.io/e2e-az-name
operator: In
values:
- e2e-az1
- e2e-az2

https://kubernetes.io/docs/concepts/scheduling-eviction/assign-pod-node/#node-affinity

Screenshot_2021-03-18_at_04.13.02.png

https://medium.com/kubernetes-tutorials/learn-how-to-assign-pods-to-nodes-in-kubernetes-using-nodeselector-and-affinity-features-e62c437f3cf8

 

Have more questions? Submit a request

Comments