Step 1:Execute below command to create new service account and secret.
kubectl apply -f https://s3.amazonaws.com/ARC_PUBLIC/service_account.yaml
Step 2: Execute kubectl top nodes in the Kubernetes. If you are not able to view the node details then execute Step 4 otherwise go to Step 5.
Step 3: 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
If it is running then go to Step 8. 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 that the metrics API server is running, execute the following command and check the output:
kubectl top nodes
Step 4: Refer here to install Single Agent and start.
The Single Agent should be deployed on a local or virtual machine and will collect Kubernetes details. The Single Agent must have access to the Kubernetes cluster.
Once we start the SingleAgent it will be added to Applicare Console.
Step 5: Execute the below command one by one to get the Cluster IP and Token. Copy the $APISERVER and $TOKEN value for configuration.
APISERVER=$(kubectl config view --minify -o jsonpath='{.clusters[0].cluster.server}')
echo $APISERVER
SECRET_NAME=$(kubectl get sa applicare -o jsonpath='{.secrets[0].name}')
echo $SECRET_NAME
TOKEN=$(kubectl get secret $SECRET_NAME -o jsonpath='{.data.token}' | base64 --decode)
echo $TOKEN
Step 6: Login into Applicare console and go to Overview screen and select the newly added server and click Edit button.
Step 7: Enable the Add Kubernetes Monitoring checkbox and enter the configuration details.
Step 8: Remove the "https:// (or) http://" in $APISERVER value and Paste the remaining value in ClusterIP field.
Step 9: Copy the $TOKEN value and paste it in Token field.
Step 10: Enter the Kubernetes running port in Port field.
Step 11: Select the Kubernetes protocol from the Protocol dropdown. Protocol details will be available in the $APISERVER. "https:// (or) http://"
Step 12: Click the Update button.
You can edit or delete the Kubernetes configuration from either 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.
Comments
0 comments
Article is closed for comments.