Skip to content

Agent on Kubernetes

kubectl

The following steps assume that you have the Kubectl command installed on the machine from where you are performing the installation and that your KUBECONFIG environment variable is correctly set for your target Kubernetes cluster.

Kubernetes Namepsaces

Where you see in the below instructions should be replaced with the value of the namespace within which you want to deploy the Enterprise Session Monitor Server. This could be the same namespace as your SAS® Viya deployment, or another namespace.

Obtain Installation Assets

The appropriate SAS Enterprise Session Monitor Server on Kubernetes installation media can be obtained from the kubernetes folder in the release folder on the Boemska Downloads site or by contacting SAS Technical Support.

Install the Agent(s)

Server and agent cluster deployments

If you are deploying the Enterprise Session Monitor Agent to the same cluster as the Server then you will need to get the Cluster IP address for the Agent installation process. This can be retrieved by running the following command:

kubectl get svc sas-enterprise-session-monitor-server -n <NAMESPACE> | grep sas-enterprise-session-monitor-server | cut -d' ' -f7

Cluster-wide Deployment

  1. Update line 91 of esm-agents.yaml replacing YOURESMSERVER with the IP address or fully qualified domain name of your Enterprise Session Monitor Server instance
  2. [OPTIONAL] Update all instances of namespace: default to the namespace into which you want to deploy the Agent
  3. Deploy the Enterprise Session Monitor secret. This is required to authenticate to the image repository: kubectl apply -f esm-secret.yaml -n <NAMESPACE>
  4. Deploy the Enterprise Session Monitor Agent(s): kubectl apply -f esm-agents.yaml

Namespace Scoped Deployments

In certain deployment scenarios a user might only have permissions to work within a single namespace. In this case, modifications need to be made to the esm-agents.yaml deployment YAML in addition to the steps detailed above. The following steps should be completed before Step 3 in the above Agent installation instructions

  1. Remove the PriorityClass configuration block (lines 4 through 12)
  2. Update ClusterRole to Role on (line 20)
  3. Update ClusterRoleBinding to RoleBinding (line 30)
  4. Update ClusterRole to Role (line 40)
  5. Remove the priorityClassName block from the Agent container specification block (line 69)
  6. Within the env section of sas-enterprise-session-monitor-viya4 container, add the following environment variables:
  7. NAMESPACE - The Namespace that the Agent will look for pods within.
  8. CONTAINER_RUNTIME_TYPE - Sets the container runtime environment technology choice. This is used by the agent to find containers and pods. Valid values are docker, and containerd.
  9. CONTAINER_RUNTIME_VERSION This is the version of the CONTAINER_RUNTIME_TYPE. For example, for docker this might be "19.3.33" or for containerd 1.4.9.

Validate Agent Deployment

  1. From a supported browser, navigate to the Enterprise Session Monitor UI
  2. The application will load and you will be presented with a login dialog. Enter the credentials used in step 7 of the installation process.
  3. After successfully logging in, from the main menu on the left, select "Live View" ( icon).
  4. In the bottom left-hand corner of the page, in the "Nodes" list, you should see an item with the same name as selected in step 6. Single Click on the node name.
  5. Single clicking on the name of the node, should open the Node Portlet in full height mode. You should see the chart move slowly from right to left as data about the node comes in to the server.

Last update: April 24, 2023
Created: April 24, 2023