To check the status of a currently running Scalyr Agent container, first use kubectl to find the name of the pod in which you are interested.
kubectl get pods --namespace=scalyr
Once you have the name of the pod running the Scalyr Agent, use the following command:
kubectl exec <pod_name> -- scalyr-agent-2 status
For more verbose output, run:
kubectl exec <pod_name> -- scalyr-agent-2 status -v
Stopping the Scalyr Agent DaemonSet
If you wish to stop running the Scalyr Agent DaemonSet entirely, then assuming you are using the default configuration and your DaemonSet's name is 'scalyr-agent-2' run:
kubectl delete daemonset scalyr-agent-2 --namespace=scalyr
There is currently no convenient way to stop the Scalyr Agent already running on a specific node. But you can prevent the agent from starting up on specific nodes by following the instructions in the next section:
Disabling the agent on the Master Node
The Scalyr Agent DaemonSet runs an Agent pod on each node. This also runs the Agent on the master node. To disable the Agent on the master node, comment the following in the DaemonSet scalyr-agent-2.yaml file:
tolerations:
- key: "node-role.kubernetes.io/master"
operator: "Exists"
effect: "NoSchedule"
Running the DaemonSet on select nodes
To run the Scalyr Agent on specific nodes of your cluster, add a nodeSelector or nodeAffinity section to your pod config file. For example, if your desired nodes are labeled logging=scalyr then adding the following nodeSelector will restrict Scalyr Agent pods to Nodes that have a logging=scalyr label:
spec:
nodeSelector:
logging: scalyr
or if you wanted to use nodeAffinity:
spec:
affinity:
nodeAffinity:
requiredDuringSchedulingIgnoredDuringExecution:
nodeSelectorTerms:
- matchExpressions:
- key: logging
operator: In
values: ["scalyr"]
Comments
0 comments
Please sign in to leave a comment.