Update README.md (#10248)
* Update README.md Added the missing answer of the question * Update README.md updated code in the kubernetes deployment.
This commit is contained in:
parent
a3a5fb2657
commit
b88151dee5
@ -314,6 +314,7 @@ Outputs the status of each of the control plane components.
|
|||||||
<details>
|
<details>
|
||||||
<summary>What happens to running pods if if you stop Kubelet on the worker nodes?</summary><br><b>
|
<summary>What happens to running pods if if you stop Kubelet on the worker nodes?</summary><br><b>
|
||||||
|
|
||||||
|
When you stop the kubelet service on a worker node, it will no longer be able to communicate with the Kubernetes API server. As a result, the node will be marked as NotReady and the pods running on that node will be marked as Unknown. The Kubernetes control plane will then attempt to reschedule the pods to other available nodes in the cluster.
|
||||||
</b></details>
|
</b></details>
|
||||||
|
|
||||||
#### Nodes Commands
|
#### Nodes Commands
|
||||||
@ -736,21 +737,29 @@ A Deployment is a declarative statement for the desired state for Pods and Repli
|
|||||||
<details>
|
<details>
|
||||||
<summary>How to create a deployment with the image "nginx:alpine"?</code></summary><br><b>
|
<summary>How to create a deployment with the image "nginx:alpine"?</code></summary><br><b>
|
||||||
|
|
||||||
`kubectl create deployment my_first_deployment --image=nginx:alpine`
|
`kubectl create deployment my-first-deployment --image=nginx:alpine`
|
||||||
|
|
||||||
OR
|
OR
|
||||||
|
|
||||||
```
|
```
|
||||||
cat << EOF | kubectl create -f -
|
cat << EOF | kubectl create -f -
|
||||||
apiVersion: v1
|
apiVersion: apps/v1
|
||||||
kind: Pod
|
kind: Deployment
|
||||||
metadata:
|
metadata:
|
||||||
name: nginx
|
name: nginx
|
||||||
spec:
|
spec:
|
||||||
containers:
|
replicas: 1
|
||||||
- name: nginx
|
selector:
|
||||||
image: nginx:alpine
|
matchLabels:
|
||||||
EOF
|
app: nginx
|
||||||
|
template:
|
||||||
|
metadata:
|
||||||
|
labels:
|
||||||
|
app: nginx
|
||||||
|
spec:
|
||||||
|
containers:
|
||||||
|
- name: nginx
|
||||||
|
image: nginx:alpine
|
||||||
```
|
```
|
||||||
</b></details>
|
</b></details>
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user