Skip to content

Commit 8337776

Browse files
committed
Conversion to complete markdown
Signed-off-by: ShashaankS <shashaank.srivastava04@gmail.com>
1 parent 686075e commit 8337776

File tree

9 files changed

+638
-747
lines changed

9 files changed

+638
-747
lines changed

content/en/learning-paths/mastering-kubernetes-for-engineers/cka/content/certifications.md

Lines changed: 41 additions & 69 deletions
Original file line numberDiff line numberDiff line change
@@ -10,12 +10,14 @@ weight: 1
1010

1111
{{< chapterstyle >}}
1212

13-
<h2>Several certifications available</h2>
14-
<hr>
13+
Get an overview of the existing Kubernetes certifications and what you need to learn for the CKA.
1514

16-
<p>The <a href="https://cncf.io">CNCF</a> delivers several Kubernetes certifications, which are listed in the following table.</p>
15+
## Several certifications available
16+
---
17+
18+
The [CNCF](https://cncf.io) delivers several Kubernetes certifications, which are listed in the following table.
1719

18-
<div style="display: flex; justify-content: center;">
20+
<div style="display: flex; justify-content: left;">
1921
<table style="width: 80%; table-layout: fixed;">
2022
<thead>
2123
<tr>
@@ -54,123 +56,93 @@ weight: 1
5456
</table>
5557
</div>
5658

57-
<p>If you pass all those certifications, you become a <a href="https://www.cncf.io/training/kubestronaut/">Kubestronaut</a>.</p>
58-
<p>If you pass all those certifications, you become a <a href="https://www.cncf.io/training/kubestronaut/">Kubestronaut</a>.</p>
59+
If you pass all those certifications, you become a [Kubestronaut](https://www.cncf.io/training/kubestronaut/).
5960

60-
<h2>Expectation for the CKA</h2>
61-
<hr>
61+
## Expectation for the CKA
62+
---
6263

63-
<p>The following table summarizes the distribution of the CKA questions across 5 main subjects.</p>
64+
The following table summarizes the distribution of the CKA questions across 5 main subjects.
6465

65-
<div style="display: flex; justify-content: center;">
66-
<table style="width: 80%; table-layout: fixed;">
67-
<thead>
68-
<tr>
69-
<th>Subject</th>
70-
<th>%</th>
71-
</tr>
72-
</thead>
73-
<tbody>
74-
<tr>
75-
<td>Cluster Architecture, Installation & Configuration</td>
76-
<td>25%</td>
77-
</tr>
78-
<tr>
79-
<td>Workloads & Scheduling</td>
80-
<td>15%</td>
81-
</tr>
82-
<tr>
83-
<td>Services & Networking</td>
84-
<td>20%</td>
85-
</tr>
86-
<tr>
87-
<td>Storage</td>
88-
<td>10%</td>
89-
</tr>
90-
<tr>
91-
<td>Troubleshooting</td>
92-
<td>30%</td>
93-
</tr>
94-
</tbody>
95-
</table>
96-
</div>
66+
| Subject | % |
67+
|---------|---|
68+
| Cluster Architecture, Installation & Configuration | 25% |
69+
| Workloads & Scheduling | 15% |
70+
| Services & Networking | 20% |
71+
| Storage | 10% |
72+
| Troubleshooting | 30% |
9773

98-
<h2>CKA Environment</h2>
99-
<hr>
74+
## CKA Environment
75+
---
10076

101-
<p>The CKA is a 2h exam. It contains 15/20 questions and requires at least 66% correct answers. This exam is remotely proctored, so you can take it from home (or any other quiet location) at a time that best suits your schedule.</p>
77+
The CKA is a 2h exam. It contains 15/20 questions and requires at least 66% correct answers. This exam is remotely proctored, so you can take it from home (or any other quiet location) at a time that best suits your schedule.
10278

103-
<p>Before launching the exam, which you do via your <a href="https://trainingportal.linuxfoundation.org/access/saml/login">Linux Foundation Training Portal</a>, you need to perform a couple of prerequisites including making sure the PSI Browser works correctly on your environment. This browser gives you access to the remote Desktop you'll use during the exam.</p>
79+
Before launching the exam, which you do via your [Linux Foundation Training Portal](https://trainingportal.linuxfoundation.org/access/saml/login), you need to perform a couple of prerequisites including making sure the PSI Browser works correctly on your environment. This browser gives you access to the remote Desktop you'll use during the exam.
10480

10581
{{< image src="/images/learning-path/cka/certifications/psi-browser.png" width="100%" align="center" alt="" >}}
10682

107-
<h2>Tips & tricks</h2>
108-
<hr>
83+
## Tips & tricks
84+
---
10985

110-
<h3>Tools</h3>
86+
### Tools
11187

112-
<p>Make sure you have a basic knowledge of</p>
88+
Make sure you have a basic knowledge of
11389

114-
<ul>
115-
<li><strong>vim</strong></li>
116-
<li><strong>openssl</strong></li>
117-
</ul>
90+
- **vim**
91+
- **openssl**
11892

11993
```bash
120-
Visualize the content of a certificate
94+
# Visualize the content of a certificate
12195
openssl x509 -in cert.crt -noout -text
12296
```
12397

124-
<ul>
125-
<li><strong>systemd / systemctl / journalctl</strong></li>
126-
</ul>
98+
- **systemd / systemctl / journalctl**
12799

128100
```bash
129-
Restart kubelet
101+
# Restart kubelet
130102
systemctl restart kubelet
131103

132-
Check kubelet logs
104+
# Check kubelet logs
133105
journalctl -u kubelet
134106
```
135107

136-
<h3>Aliases</h3>
108+
### Aliases
137109

138-
<p>Defining a couple of aliases at the very beginning of the examination could save time.</p>
110+
Defining a couple of aliases at the very beginning of the examination could save time.
139111

140112
```bash
141113
alias k=kubectl
142114
export dr="--dry-run=client -o yaml"
143115
export fd="--grace-period=0 --force"
144116
```
145117

146-
<h3>Imperative commands</h3>
118+
### Imperative commands
147119

148-
<p>Don't create specifications manually, instead use <code>--dry-run=client -o yaml</code> as in these examples.</p>
120+
Don't create specifications manually, instead use `--dry-run=client -o yaml` as in these examples.
149121

150122
```bash
151123
k run nginx --image=nginx:1.20 --dry-run=client -o yaml > pod.yaml
152124
k create deploy www --image=nginx:1.20 --replicas=3 --dry-run=client -o yaml > deploy.yaml
153125
k create role create-pod --verb=create --resource=pods --dry-run=client -o yaml > role.yaml
154126
```
155127

156-
<p>Quickly change the current Namespace.</p>
128+
Quickly change the current Namespace.
157129

158130
```bash
159131
k config set-context --current --namespace=dev
160132
```
161133

162-
<p>Don't wait for the grace period to get rid of a Pod.</p>
134+
Don't wait for the grace period to get rid of a Pod.
163135

164136
```bash
165137
k delete po nginx --force --grace-period=0
166138
```
167139

168-
<h3>Reference guide</h3>
140+
### Reference guide
169141

170-
<p>The <a href="https://kubernetes.io/docs/reference/kubectl/quick-reference/">Kubectl quick reference guide</a> is a must-read.</p>
142+
The [Kubectl quick reference guide](https://kubernetes.io/docs/reference/kubectl/quick-reference/) is a must-read.
171143

172-
<h3>Access to exam simulator</h3>
144+
### Access to exam simulator
173145

174-
<p>Registering for the CKA gives you access to two sessions of the official Exam simulator. I highly recommend using these sessions once you're almost ready.</p>
146+
Registering for the CKA gives you access to two sessions of the official Exam simulator. I highly recommend using these sessions once you're almost ready.
175147

176148
{{< /chapterstyle >}}

content/en/learning-paths/mastering-kubernetes-for-engineers/cka/content/creation.md

Lines changed: 44 additions & 35 deletions
Original file line numberDiff line numberDiff line change
@@ -10,44 +10,47 @@ weight: 2
1010

1111
{{< chapterstyle >}}
1212

13-
<p>This section guides you in creating of a 3-nodes Kubernetes cluster using <a href="https://kubernetes.io/docs/reference/setup-tools/kubeadm/">kubeadm</a> bootstrapping tool. This is an important step as you will use this cluster throughout this workshop.</p>
13+
This section guides you in creating of a 3-nodes Kubernetes cluster using [kubeadm](https://kubernetes.io/docs/reference/setup-tools/kubeadm/) bootstrapping tool. This is an important step as you will use this cluster throughout this workshop.
1414

15-
<p>The cluster you'll create is composed of 3 Nodes named <strong>controlplane</strong>, <strong>worker1</strong> and <strong>worker2</strong>. The controlplane Node runs the cluster components (API Server, Controller Manager, Scheduler, etcd), while worker1 and worker2 are the worker Nodes in charge of running the containerized workloads.</p>
15+
The cluster you'll create is composed of 3 Nodes named **controlplane**, **worker1** and **worker2**. The controlplane Node runs the cluster components (API Server, Controller Manager, Scheduler, etcd), while worker1 and worker2 are the worker Nodes in charge of running the containerized workloads.
1616

1717
{{< image src="/images/learning-path/cka/creation/objectives.png" width="100%" align="center" alt="" >}}
1818

19-
<h2>Provisioning VMs</h2>
19+
## Provisioning VMs
20+
---
2021

21-
<p>Before creating a cluster, it's necessary to provision the infrastructure (bare metal servers or virtual machines). You can create the 3 VMs on your local machine or a cloud provider (but this last option will come with a small cost). Ensure you name those VMs <strong>controlplane</strong>, <strong>worker1</strong>, and <strong>worker2</strong> to keep consistency alongside the workshop. Please also ensure each VM has at least 2 vCPUs and 2G of RAM so it meets the <a href="https://bit.ly/kubeadm-prerequisites">prerequisites</a>.</p>
22+
Before creating a cluster, it's necessary to provision the infrastructure (bare metal servers or virtual machines). You can create the 3 VMs on your local machine or a cloud provider (but this last option will come with a small cost). Ensure you name those VMs **controlplane**, **worker1**, and **worker2** to keep consistency alongside the workshop. Please also ensure each VM has at least 2 vCPUs and 2G of RAM so it meets the [prerequisites](https://bit.ly/kubeadm-prerequisites).
2223

23-
<p>If you want to create those VMs on your local machine, we recommend using <a href="https://multipass.run">Multipass</a>, a tool from <a href="https://canonical.com/">Canonical</a>. Multipass makes creating local VMs a breeze. Once you have installed Multipass, create the VMs as follows.</p>
24+
If you want to create those VMs on your local machine, we recommend using [Multipass](https://multipass.run), a tool from [Canonical](https://canonical.com/). Multipass makes creating local VMs a breeze. Once you have installed Multipass, create the VMs as follows.
2425

2526
```bash
2627
multipass launch --name controlplane --memory 2G --cpus 2 --disk 10G
2728
multipass launch --name worker1 --memory 2G --cpus 2 --disk 10G
2829
multipass launch --name worker2 --memory 2G --cpus 2 --disk 10G
2930
```
31+
3032
{{< image src="/images/learning-path/cka/creation/step-1.png" width="100%" align="center" alt="" >}}
3133

32-
<h2>Cluster initialization</h2>
34+
## Cluster initialization
35+
---
3336

34-
<p>Now that the VMs are created, you need to install some dependencies on each on them (a couple of packages including <strong>kubectl</strong>, <strong>containerd</strong> and <strong>kubeadm</strong>). To simplify this process we provide some scripts that will do this job for you.</p>
37+
Now that the VMs are created, you need to install some dependencies on each on them (a couple of packages including **kubectl**, **containerd** and **kubeadm**). To simplify this process we provide some scripts that will do this job for you.
3538

36-
<p>First, ssh on the controlplane VM and install those dependencies using the following command.</p>
39+
First, ssh on the controlplane VM and install those dependencies using the following command.
3740

3841
```bash
3942
curl https://luc.run/kubeadm/controlplane.sh | VERSION="1.32" sh
4043
```
4144

42-
<p>Next, still from the controlplane VM, initialize the cluster.</p>
45+
Next, still from the controlplane VM, initialize the cluster.
4346

4447
```bash
4548
sudo kubeadm init
4649
```
4750

48-
<p>The initialization should take a few tens of seconds. The list below shows all the steps it takes.</p>
51+
The initialization should take a few tens of seconds. The list below shows all the steps it takes.
4952

50-
<pre>
53+
```
5154
preflight Run pre-flight checks
5255
certs Certificate generation
5356
/ca Generate the self-signed Kubernetes CA to provision identities for other Kubernetes components
@@ -86,67 +89,71 @@ addon Install required addons for passing conformance te
8689
/coredns Install the CoreDNS addon to a Kubernetes cluster
8790
/kube-proxy Install the kube-proxy addon to a Kubernetes cluster
8891
show-join-command Show the join command for control-plane and worker node
89-
</pre>
92+
```
9093

91-
<p>Several commands are returned at the end of the installation process, which you'll use in the next part.</p>
94+
Several commands are returned at the end of the installation process, which you'll use in the next part.
9295

9396
{{< image src="/images/learning-path/cka/creation/step-2.png" width="100%" align="center" alt="" >}}
9497

95-
<h2>Retrieving kubeconfig file</h2>
98+
## Retrieving kubeconfig file
99+
---
96100

97-
<p>The first set of commands returned during the initialization step allows configuring kubectl for the current user. Run those commands from a shell in the controlplane Node.</p>
101+
The first set of commands returned during the initialization step allows configuring kubectl for the current user. Run those commands from a shell in the controlplane Node.
98102

99103
```bash
100104
mkdir -p $HOME/.kube
101105
sudo cp -i /etc/kubernetes/admin.conf $HOME/.kube/config
102106
sudo chown $(id -u):$(id -g) $HOME/.kube/config
103107
```
104108

105-
<p>You can now list the Nodes. You'll get only one Node as you've not added the worker Nodes yet.</p>
109+
You can now list the Nodes. You'll get only one Node as you've not added the worker Nodes yet.
106110

107111
```bash
108112
$ kubectl get no
109113
NAME STATUS ROLES AGE VERSION
110114
controlplane NotReady control-plane 5m4s v1.32.4
111115
```
112116

113-
<h2>Adding the first worker Node</h2>
117+
## Adding the first worker Node
118+
---
114119

115-
<p>As you've done for the controlplane, use the following command to install the dependencies (kubectl, containerd, kubeadm) on worker1.</p>
120+
As you've done for the controlplane, use the following command to install the dependencies (kubectl, containerd, kubeadm) on worker1.
116121

117122
```bash
118123
curl https://luc.run/kubeadm/worker.sh | VERSION="1.32" sh
119124
```
120125

121-
<p>Then, run the join command returned during the initialization step. This command allows you to add worker nodes to the cluster.</p>
126+
Then, run the join command returned during the initialization step. This command allows you to add worker nodes to the cluster.
122127

123128
```bash
124129
sudo kubeadm join 10.81.0.174:6443 --token kolibl.0oieughn4y03zvm7 \
125130
--discovery-token-ca-cert-hash sha256:a1d26efca219428731be6b62e3298a2e5014d829e51185e804f2f614b70d933d
126131
```
127132

128-
<h2>Adding the second worker Node</h2>
133+
## Adding the second worker Node
134+
---
129135

130-
<p>You need to do the same on worker2. First, install the dependencies.</p>
136+
You need to do the same on worker2. First, install the dependencies.
131137

132138
```bash
133139
curl https://luc.run/kubeadm/worker.sh | VERSION="1.32" sh
134140
```
135141

136-
<p>Then, run the join command to add this Node to the cluster.</p>
142+
Then, run the join command to add this Node to the cluster.
137143

138144
```bash
139145
sudo kubeadm join 10.81.0.174:6443 --token kolibl.0oieughn4y03zvm7 \
140146
--discovery-token-ca-cert-hash sha256:a1d26efca219428731be6b62e3298a2e5014d829e51185e804f2f614b70d933d
141147
```
142148

143-
<p>You now have cluster with 3 Nodes.</p>
149+
You now have cluster with 3 Nodes.
144150

145151
{{< image src="/images/learning-path/cka/creation/step-3.png" width="100%" align="center" alt="" >}}
146152

147-
<h2>Status of the Nodes</h2>
153+
## Status of the Nodes
154+
---
148155

149-
<p>List the Nodes and notice they are all in NotReady status.</p>
156+
List the Nodes and notice they are all in NotReady status.
150157

151158
```bash
152159
$ kubectl get nodes
@@ -156,16 +163,17 @@ worker1 NotReady <none> 58s v1.32.4
156163
worker2 NotReady <none> 55s v1.32.4
157164
```
158165

159-
<p>If you go one step further and describe the controlplane Node, you'll get why the cluster is not ready yet.</p>
166+
If you go one step further and describe the controlplane Node, you'll get why the cluster is not ready yet.
160167

161-
<pre>
168+
```
162169
163170
KubeletNotReady container runtime network not ready: NetworkReady=false reason:NetworkPluginNotReady message:Network plugin returns error: cni plugin not initialized
164-
</pre>
171+
```
165172

166-
<h2>Installing a network plugin</h2>
173+
## Installing a network plugin
174+
---
167175

168-
<p>Run the following commands from the controlplane Node to install Cilium in your cluster.</p>
176+
Run the following commands from the controlplane Node to install Cilium in your cluster.
169177

170178
```bash
171179
OS="$(uname | tr '[:upper:]' '[:lower:]')"
@@ -175,7 +183,7 @@ sudo tar xzvfC cilium-$OS-$ARCH.tar.gz /usr/local/bin
175183
cilium install
176184
```
177185

178-
<p>After a few tens of seconds, you'll see your cluster is ready.</p>
186+
After a few tens of seconds, you'll see your cluster is ready.
179187

180188
```bash
181189
$ kubectl get nodes
@@ -185,19 +193,20 @@ worker1 Ready <none> 4m28s v1.32.4
185193
worker2 Ready <none> 4m25s v1.32.4
186194
```
187195

188-
<h2>Get the kubeconfig on the host machine</h2>
196+
## Get the kubeconfig on the host machine
197+
---
189198

190-
<p>To avoid connecting to the controlplane Node to run the kubectl commands, copy the kubeconfig file from the controlplane to the host machine. Make sure to copy this file into <code>$HOME/.kube/config</code> so it automatically configures kubectl.</p>
199+
To avoid connecting to the controlplane Node to run the kubectl commands, copy the kubeconfig file from the controlplane to the host machine. Make sure to copy this file into `$HOME/.kube/config` so it automatically configures kubectl.
191200

192-
<p>If you've created your VMs with Multipass, you can copy the kubeconfig file using the following commands.</p>
201+
If you've created your VMs with Multipass, you can copy the kubeconfig file using the following commands.
193202

194203
```bash
195204
multipass transfer controlplane:/home/ubuntu/.kube/config config
196205
mkdir $HOME/.kube
197206
mv config $HOME/.kube/config
198207
```
199208

200-
<p>You should now be able to direcly list the Nodes from the host machine.</p>
209+
You should now be able to direcly list the Nodes from the host machine.
201210

202211
```bash
203212
$ kubectl get nodes

0 commit comments

Comments
 (0)