replicaset doc

This commit is contained in:
2024-07-15 23:03:44 +03:30
parent 24df655dc0
commit c5fc73e396
3 changed files with 113 additions and 4 deletions

View File

@@ -114,4 +114,23 @@ This command retrieves and displays the YAML configuration of the pod `testpod1`
kubectl label node <node-name> kubernetes.io/<var-name>=<var-value>
kubectl get nodes --show-labels
```
### Retrieve the ReplicaSet
To retrieve information about the ReplicaSet in the `my-ns` namespace, use the following command:
```bash
kubectl get rs -n my-ns
```
### Delete All Pods in the Namespace
To delete all pods in the `my-ns` namespace, use the following command:
```bash
kubectl delete pod --all -n my-ns
```
### Change the Replica Count to 5
To scale the ReplicaSet to 5 replicas, you can use one of the following methods:
1. **Using the `kubectl scale` Command**
```bash
kubectl scale rs my-app --replicas=5 -n my-ns
```