You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
<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.
102
78
103
-
<p>Before launching the exam, which you do via your <ahref="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.
k create role create-pod --verb=create --resource=pods --dry-run=client -o yaml > role.yaml
154
126
```
155
127
156
-
<p>Quickly change the current Namespace.</p>
128
+
Quickly change the current Namespace.
157
129
158
130
```bash
159
131
k config set-context --current --namespace=dev
160
132
```
161
133
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.
163
135
164
136
```bash
165
137
k delete po nginx --force --grace-period=0
166
138
```
167
139
168
-
<h3>Reference guide</h3>
140
+
### Reference guide
169
141
170
-
<p>The <ahref="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.
171
143
172
-
<h3>Access to exam simulator</h3>
144
+
### Access to exam simulator
173
145
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.
Copy file name to clipboardExpand all lines: content/en/learning-paths/mastering-kubernetes-for-engineers/cka/content/creation.md
+44-35Lines changed: 44 additions & 35 deletions
Original file line number
Diff line number
Diff line change
@@ -10,44 +10,47 @@ weight: 2
10
10
11
11
{{< chapterstyle >}}
12
12
13
-
<p>This section guides you in creating of a 3-nodes Kubernetes cluster using <ahref="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.
14
14
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.
<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 <ahref="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).
22
23
23
-
<p>If you want to create those VMs on your local machine, we recommend using <ahref="https://multipass.run">Multipass</a>, a tool from <ahref="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.
<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.
35
38
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.
37
40
38
41
```bash
39
42
curl https://luc.run/kubeadm/controlplane.sh | VERSION="1.32" sh
40
43
```
41
44
42
-
<p>Next, still from the controlplane VM, initialize the cluster.</p>
45
+
Next, still from the controlplane VM, initialize the cluster.
43
46
44
47
```bash
45
48
sudo kubeadm init
46
49
```
47
50
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.
49
52
50
-
<pre>
53
+
```
51
54
preflight Run pre-flight checks
52
55
certs Certificate generation
53
56
/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
86
89
/coredns Install the CoreDNS addon to a Kubernetes cluster
87
90
/kube-proxy Install the kube-proxy addon to a Kubernetes cluster
88
91
show-join-command Show the join command for control-plane and worker node
89
-
</pre>
92
+
```
90
93
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.
<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.
<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.
191
200
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.
193
202
194
203
```bash
195
204
multipass transfer controlplane:/home/ubuntu/.kube/config config
196
205
mkdir $HOME/.kube
197
206
mv config $HOME/.kube/config
198
207
```
199
208
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.
0 commit comments