Step 1: Execute kubectl top nodes in the kubernetes. If you are not able to view the below details then execute Step 2 otherwise go to Step 3.
Step 2: Install metrics pod in the Kubernetes. Execute the the below command to install metrics pod.
kubectl apply -f https://github.com/kubernetes-sigs/metrics-server/releases/latest/download/components.yaml
Check if the metrics server is running by executing the below command.
kubectl get pods -n kube-system
Note: If it is running then go to Step 3. If it is not running then follow the below steps
1: Edit the configuration file by executing the below command.
kubectl edit deployments.apps -n kube-system metrics-server
2: Add the below lines in the spec: container: args: and save the file.
- --kubelet-insecure-tls
3: After few minutes execute the command kubectl get pods -n kube-system and check the metrics server is running. If it is running skip the below step.
4: Edit the configuration file by executing the command kubectl edit deployments.apps -n kube-system metrics-server and modify the below lines in the spec: container: args: and save it.
- --kubelet-preferred-address-types=InternalIP
5: To verify the metrics API server is running execute the below command and check
kubectl top nodes
SingleAgent should be deployed in the machine where kubernetes cluster is running.
Step 3: Refer here to install SingleAgent and start.
Once we start the agent it will be added to Applicare Console.
Step 4. Execute the below command and note down the cluster server details for configuration.
kubectl config view
Cluster IP : kubernetes.docker.internal
Port : 6443
Protocol : https
Step 5: Login into Applicare console and go to Overview screen and select the newly added server and click Edit button.
Step 6: Enable the Add Kubernetes Monitoring checkbox and add the configuration details. Leave the Token field empty and click the update button.
Note:
We can edit or delete the kubernetes configuration from both the Overview or Kubernetes menu.
Overview Menu
Update
Select the row and click Edit button and update the details and click Update button.
Delete
Select the row and click Edit button and uncheck the Add the Kubernetes Monitoring checkbox and click Update button.
Kubernetes Menu
Update
Select the row and click Edit button and update the details and click Save button.
Delete
Select the row and click Delete button.
Comments
0 comments
Article is closed for comments.