Installing agents
Kube State Metrics
Kube-state-metrics (KSM) is a simple service that listens to the Kubernetes API server and generates metrics about the state of the objects. The metrics are exported on the HTTP endpoint/metrics on the listening port (default 8080).
Deploying KSM
- Clone the repo: https://github.com/kubernetes/kube-state-metrics
- Use the following command.
Verifying if KSM is deployed successfully
- Check the service.
- Check the pod.
If both service and pods are created, KSM is deployed successfully.
Deploying Metrics Server
- Run the following command to start the metrics server.
On Kubernetes v1.21+:
On Kubernetes v1.19-1.21:
- To disable tls for the metrics server, edit the deployment file and add the following line under container args.
- Save and exit.
Verify if the metrics server is deployed successfully
Check if pods are ready and running
SixthSense Kubernetes Agent
Deploying the agent
- Download the Docker image
The onboarding team will provide the credentials to log in to the registry and the latest agent version.
note
If the instances are behind corporate proxy, Docker pull will not work. Corporate proxy information must be set in Docker config in the URL -- https://docs.docker.com/network/proxy/#configure-the-docker-client.
- Create a clusterrole and clusterrolebinding in order to allow agent to fetch the metrics.
Filename: sixthsense-clusterrole.yml
Run the following command.
- Create a deployment using the Docker image.
Sample Deployment file: Name: sixthsense-k8-deploy.yml
Run the following command.
- Check the pod status.