diff --git a/kubernetes/commands.md b/kubernetes/commands.md index 9817309..d998d42 100644 --- a/kubernetes/commands.md +++ b/kubernetes/commands.md @@ -99,4 +99,19 @@ kubectl api-resources ### Apply Yaml File ```bash kubectl apply -f -n -``` \ No newline at end of file +``` +### View Pod Details + +```bash +kubectl get pod -n my-ns -o yaml +``` + +This command retrieves and displays the YAML configuration of the pod `testpod1` in the namespace `my-ns`. + +### Label a Node + +```bash +kubectl label node kubernetes.io/= +kubectl get nodes --show-labels +``` + diff --git a/kubernetes/workloads/all.md b/kubernetes/workloads/pod.md similarity index 93% rename from kubernetes/workloads/all.md rename to kubernetes/workloads/pod.md index 3856572..9b92aff 100644 --- a/kubernetes/workloads/all.md +++ b/kubernetes/workloads/pod.md @@ -190,19 +190,4 @@ spec: This defines a pod named `my-pod` running an Nginx container exposing port 80. -## Useful Kubernetes Commands -### View Pod Details - -```bash -kubectl get pod -n my-ns -o yaml -``` - -This command retrieves and displays the YAML configuration of the pod `testpod1` in the namespace `my-ns`. - -### Label a Node - -```bash -kubectl label node kubernetes.io/= -kubectl get nodes --show-labels -```