Move Commands

This commit is contained in:
2024-07-13 23:37:18 +03:30
parent 94f0a2f105
commit 24df655dc0
2 changed files with 16 additions and 16 deletions

View File

@@ -99,4 +99,19 @@ kubectl api-resources
### Apply Yaml File
```bash
kubectl apply -f <yaml-file> -n <namespace-name>
```
```
### View Pod Details
```bash
kubectl get pod -n my-ns <pod-name> -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 <node-name> kubernetes.io/<var-name>=<var-value>
kubectl get nodes --show-labels
```

View File

@@ -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 <pod-name> -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 <node-name> kubernetes.io/<var-name>=<var-value>
kubectl get nodes --show-labels
```