modified: README.md
This commit is contained in:
29
README.md
29
README.md
@@ -18,7 +18,6 @@ Kubernetes is an open‑source platform that automates the deployment, scaling,
|
||||
- [kubectl](#kubectl)
|
||||
- [Helper pods](#helper-pods)
|
||||
- [network testing](#network-testing)
|
||||
- [Set Replicas](#set-replicas)
|
||||
- [Resources](#resources)
|
||||
- [Services Accounts](#services-accounts)
|
||||
- [Secrets](#secrets)
|
||||
@@ -29,6 +28,8 @@ Kubernetes is an open‑source platform that automates the deployment, scaling,
|
||||
- [nodes](#nodes)
|
||||
- [taint nodes](#taint-nodes)
|
||||
- [control plane - NoSchedule](#control-plane---noschedule)
|
||||
- [statefulset](#statefulset)
|
||||
- [statefulset - Set Replicas](#statefulset---set-replicas)
|
||||
- [Deployment](#deployment)
|
||||
- [Deployment - Set Replicas](#deployment---set-replicas)
|
||||
- [Deployment - Restart](#deployment---restart)
|
||||
@@ -288,16 +289,6 @@ nslookup google.com
|
||||
kubectl delete pod dns-test --namespace tests
|
||||
```
|
||||
|
||||
### Set Replicas
|
||||
|
||||
**Set deployment replicas to 0:**
|
||||
|
||||
```bash
|
||||
kubectl patch deployment <deployment-name> \
|
||||
-n <namespace> \
|
||||
-p '{"spec":{"replicas":0}}'
|
||||
```
|
||||
|
||||
### Resources
|
||||
|
||||
**List all resources:**
|
||||
@@ -444,16 +435,30 @@ MASTER_NODE_NAME="master-node-name"
|
||||
kubectl taint nodes ${MASTER_NODE_NAME} node-role.kubernetes.io/control-plane=:NoSchedule
|
||||
```
|
||||
|
||||
## statefulset
|
||||
|
||||
### statefulset - Set Replicas
|
||||
|
||||
```bash
|
||||
kubectl patch statefulset <statefulset-name> \
|
||||
-p '{"spec":{"replicas":0}}'
|
||||
```
|
||||
|
||||
## Deployment
|
||||
|
||||
### Deployment - Set Replicas
|
||||
|
||||
``` bash
|
||||
DEPLOYMENT_NAME="deployment name"
|
||||
DEPLOYMENT_NAME="???"
|
||||
# example with 0 to "disable" deployment
|
||||
kubectl scale deployment ${DEPLOYMENT_NAME} --replicas=0
|
||||
```
|
||||
|
||||
```bash
|
||||
kubectl patch deployment <deployment-name> \
|
||||
-p '{"spec":{"replicas":0}}'
|
||||
```
|
||||
|
||||
### Deployment - Restart
|
||||
|
||||
**example restart coredns:**
|
||||
|
||||
Reference in New Issue
Block a user