From b88151dee5402caaa05e1cfe428d12142d215aa9 Mon Sep 17 00:00:00 2001
From: RAJ RAUT <107211922+raj-raut8502@users.noreply.github.com>
Date: Fri, 2 Feb 2024 18:44:42 +0530
Subject: [PATCH] Update README.md (#10248)
* Update README.md
Added the missing answer of the question
* Update README.md
updated code in the kubernetes deployment.
---
topics/kubernetes/README.md | 23 ++++++++++++++++-------
1 file changed, 16 insertions(+), 7 deletions(-)
diff --git a/topics/kubernetes/README.md b/topics/kubernetes/README.md
index 6c4ae03..982a13f 100644
--- a/topics/kubernetes/README.md
+++ b/topics/kubernetes/README.md
@@ -314,6 +314,7 @@ Outputs the status of each of the control plane components.
What happens to running pods if if you stop Kubelet on the worker nodes?
+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.
#### Nodes Commands
@@ -736,21 +737,29 @@ A Deployment is a declarative statement for the desired state for Pods and Repli
How to create a deployment with the image "nginx:alpine"?
-`kubectl create deployment my_first_deployment --image=nginx:alpine`
+`kubectl create deployment my-first-deployment --image=nginx:alpine`
OR
```
cat << EOF | kubectl create -f -
-apiVersion: v1
-kind: Pod
+apiVersion: apps/v1
+kind: Deployment
metadata:
name: nginx
spec:
- containers:
- - name: nginx
- image: nginx:alpine
-EOF
+ replicas: 1
+ selector:
+ matchLabels:
+ app: nginx
+ template:
+ metadata:
+ labels:
+ app: nginx
+ spec:
+ containers:
+ - name: nginx
+ image: nginx:alpine
```