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