How to view resource usage of pods in k8s?

To view the resource usage of Pods in Kubernetes, you can use the following method:

  1. Run the following command using the kubectl command-line tool to check the resource usage of a Pod:
  2. Show the resource usage of pods
  3. This will display the CPU and memory usage of all Pods.
  4. You can check the resource usage of a specific Pod by running the following command:
  5. Show the resource usage of a specific pod using kubectl.
  6. Replace with the name of the Pod you want to view.
  7. Launch the Kubernetes dashboard to monitor resource usage of Pods. You can start the Kubernetes dashboard by running the following command.
  8. start the kubectl proxy
  9. Next, access the Kubernetes dashboard in your browser by visiting http://localhost:8001/api/v1/namespaces/kube-system/services/https:kubernetes-dashboard:/proxy/. From there, you can navigate to the “Pods” tab to view the resource usage of each pod.

Before running the kubectl top command, it may be necessary to install and configure Heapster or Metrics Server in order to collect and store resource usage data for Pods.

Leave a Reply 0

Your email address will not be published. Required fields are marked *


广告
Closing in 10 seconds
bannerAds