Skip to content

Commit

Permalink
updates
Browse files Browse the repository at this point in the history
  • Loading branch information
0xfab1 committed Feb 2, 2024
1 parent d2821f1 commit b378e73
Showing 1 changed file with 31 additions and 0 deletions.
31 changes: 31 additions & 0 deletions docs/tech/tools/kubernetes.md
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,37 @@ Simple example:
kubectl port-forward mycontainer 8080:3000
```

Retrieve information about resources in the cluster

- List all pods: ```kubectl get pods```
- ist all deployments ```kubectl get deployments```
- List all services ```kubectl get services```
- List all nodes in the cluster ```kubectl get nodes```

Provide detailed information about a specific resource

- Get pod details ```kubectl describe pod <pod-name>```
- Get deployment details ```kubectl describe deployment <deployment-name>```
- Get service details ```kubectl describe service <service-name>```

Create a resource from a YAML or JSON file

- Create a resource from a YAML file ```kubectl create -f <filename.yaml>```
- Create a deployment using a specified image ```kubectl create deployment <deployment-name> --image=<image-name>```

Delete a resource

- Delete a pod ```kubectl delete pod <pod-name>```
- Delete a deployment ```kubectl delete deployment <deployment-name>```
- Delete a service ```kubectl delete service <service-name>```

Other

- Scale deployment replicas ```kubectl scale deployment <deployment-name> --replicas=<number>```
- Print pod logs ```kubectl logs <pod-name>```
- Execute a command on a pod ```kubectl exec -it <pod-name> -- <command>```
- Apply changes to a resource using a YAML file ```kubectl apply -f <filename.yaml>```

## Kubernetes Dashboard

Running Docker for Windows with enabled Kubernetes Cluster
Expand Down

0 comments on commit b378e73

Please sign in to comment.