Skip to main content

Kubernetes Basics Guide 🌱

Minikube 🐳

Enable Metrics Server

To enable the metrics server for your Minikube cluster:
kubectl addons enable metrics-server

View Node and Pod Usage

To view the usage of nodes and pods:
kubectl top node
kubectl top pod

Kubeadm Cluster 🌐

Install Metric Server

To install the Metric Server binary and enable metrics for pods and nodes, follow the official installation guide from the Kubernetes Metrics Server documentation.

Logs 📜

View Pod Logs

To show logs of a pod:
kubectl logs -f event-sim.yaml

View Specific Container Logs

If the YAML file has multiple pods, use this command to view logs for a specific container within a pod:
kubectl logs -f event-sim.yaml <container-name>