To check resource limits for a specific pod or deployment in Kubernetes, you can use the following commands:
-
For a Pod:
kubectl describe pod <pod-name>This command will provide detailed information about the pod, including its resource limits and requests under the "Containers" section.
-
For a Deployment:
kubectl describe deployment <deployment-name>This command will show you the resource limits and requests configured for the containers within the deployment.
-
Using
kubectl getwith custom output:You can also use the following command to get a more concise view of resource limits:
kubectl get pod <pod-name> -o=jsonpath='{.spec.containers[*].resources}'This will output the resource requests and limits for the specified pod in a JSON format.
Replace <pod-name> or <deployment-name> with the actual name of your pod or deployment.
