Skip to content

Commit 0e0c628

Browse files
authored
Merge pull request #262 from Rajakavitha/patch-1
Update k8s_setup.md
2 parents 1d0ae63 + eebacf4 commit 0e0c628

File tree

1 file changed

+22
-22
lines changed

1 file changed

+22
-22
lines changed

site/k8s_setup.md

Lines changed: 22 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -108,7 +108,7 @@ scripts/cluster-check.sh
108108
$ rm -f generated/instances_id_rsa && terraform output ssh_private_key > generated/instances_id_rsa && chmod 600 generated/instances_id_rsa
109109
```
110110

111-
7. If you need shared storage between your Kubernetes worker nodes, enable and configure NFS:
111+
8. If you need shared storage between your Kubernetes worker nodes, enable and configure NFS:
112112

113113
```
114114
$ terraform output worker_public_ips
@@ -144,14 +144,14 @@ These instructions are for Oracle Linux 7u2+. If you are using a different flav
144144

145145
**NOTE**: These steps must be run with the `root` user, until specified otherwise! Any time you see `YOUR_USERID` in a command, you should replace it with your actual `userid`.
146146

147-
Choose the directories where your Docker and Kubernetes files will be stored. The Docker directory should be on a disk with a lot of free space (more than 100GB) because it will be used for the `/var/lib/docker` file system, which contains all of your images and containers. The Kubernetes directory will be used for the `/var/lib/kubelet` file system and persistent volume storage.
147+
1. Choose the directories where your Docker and Kubernetes files will be stored. The Docker directory should be on a disk with a lot of free space (more than 100GB) because it will be used for the `/var/lib/docker` file system, which contains all of your images and containers. The Kubernetes directory will be used for the `/var/lib/kubelet` file system and persistent volume storage.
148148

149149
```
150150
export docker_dir=/scratch/docker
151151
export k8s_dir=/scratch/k8s_dir
152152
```
153153

154-
Create a shell script that sets up the necessary environment variables. You should probably just append this to the user's `.bashrc` so that it will get executed at login. You will also need to configure your proxy settings here if you are behind an HTTP proxy:
154+
2. Create a shell script that sets up the necessary environment variables. You should probably just append this to the user's `.bashrc` so that it will get executed at login. You will also need to configure your proxy settings here if you are behind an HTTP proxy:
155155

156156
```
157157
export PATH=$PATH:/sbin:/usr/sbin
@@ -186,20 +186,20 @@ If you want command completion, you can add the following to the script:
186186
source <(kubectl completion bash)
187187
```
188188

189-
Create the directories you need:
189+
3. Create the directories you need:
190190

191191
```
192192
mkdir -p $docker_dir $k8s_dir/kubelet
193193
ln -s $k8s_dir/kubelet /var/lib/kubelet
194194
```
195195

196-
Set an environment variable with the Docker version you want to install:
196+
4. Set an environment variable with the Docker version you want to install:
197197

198198
```
199199
docker_version="17.03.1.ce"
200200
```
201201

202-
Install Docker, removing any previously installed version:
202+
5. Install Docker, removing any previously installed version:
203203

204204
```
205205
### install docker and curl-devel (for git if needed)
@@ -210,7 +210,7 @@ yum -y erase docker-engine docker-engine-selinux
210210
yum -y install docker-engine-$docker_version curl-devel
211211
```
212212

213-
Update the Docker options:
213+
6. Update the Docker options:
214214

215215
```
216216
# edit /etc/sysconfig/docker to add custom OPTIONS
@@ -219,7 +219,7 @@ diff /etc/sysconfig/docker /tmp/docker.out
219219
mv /tmp/docker.out /etc/sysconfig/docker
220220
```
221221

222-
Set up the Docker network, including the HTTP proxy configuration, if you need it:
222+
7. Set up the Docker network, including the HTTP proxy configuration, if you need it:
223223

224224
```
225225
# generate a custom /setc/sysconfig/docker-network
@@ -232,19 +232,19 @@ NO_PROXY="localhost,127.0.0.0/8,.my.domain.com,/var/run/docker.sock"
232232
EOF
233233
```
234234

235-
Add your user to the `docker` group:
235+
8. Add your user to the `docker` group:
236236

237237
```
238238
usermod -aG docker YOUR_USERID
239239
```
240240

241-
Enable and start the Docker service that you just installed and configured:
241+
9. Enable and start the Docker service that you just installed and configured:
242242

243243
```
244244
systemctl enable docker && systemctl start docker
245245
```
246246

247-
Install the Kubernetes packages:
247+
10. Install the Kubernetes packages:
248248

249249
```
250250
# generate the yum repo config
@@ -286,13 +286,13 @@ EOF
286286
fi
287287
```
288288

289-
Enable and start the Kubernetes service:
289+
11. Enable and start the Kubernetes service:
290290

291291
```
292292
systemctl enable kubelet && systemctl start kubelet
293293
```
294294

295-
Install and use Flannel for CNI:
295+
12. Install and use Flannel for CNI:
296296

297297
```
298298
# run kubeadm init as root
@@ -316,7 +316,7 @@ chmod 644 $KUBECONFIG
316316

317317
**NOTE**: The following steps should be run with your normal (non-`root`) user.
318318

319-
Configure CNI:
319+
13. Configure CNI:
320320

321321
```
322322
sudo -u YOUR_USERID kubectl create clusterrolebinding permissive-binding --clusterrole=cluster-admin --user=admin --user=kubelet --group=system:serviceaccounts
@@ -344,7 +344,7 @@ if [ ${status:=Error} != "Ready" ] ; then
344344
fi
345345
```
346346

347-
Taint the nodes:
347+
14. Taint the nodes:
348348

349349
```
350350
sudo -u YOUR_USERID kubectl taint nodes --all node-role.kubernetes.io/master-
@@ -359,15 +359,15 @@ Congratulations! Docker and Kubernetes are installed and configured!
359359

360360
Docker for Mac 17.12 CE Edge provides an [embedded Kubernetes environment](https://docs.docker.com/docker-for-mac/#kubernetes) that is a quick and easy way to get a simple test environment set up on your Mac. To set it up, follow these instructions:
361361

362-
Install "Docker for Mac" from the Edge channel [https://download.docker.com/mac/edge/Docker.dmg](https://download.docker.com/mac/edge/Docker.dmg). Then start up the Docker application (press Command-Space bar, type in `Docker` and run it). After it is running you will see the Docker icon appear in your status bar:
362+
1. Install "Docker for Mac" from the Edge channel [https://download.docker.com/mac/edge/Docker.dmg](https://download.docker.com/mac/edge/Docker.dmg). Then start up the Docker application (press Command-Space bar, type in `Docker` and run it). After it is running you will see the Docker icon appear in your status bar:
363363

364364
![Docker icon in status bar](images/docker-icon-in-status-bar.png)
365365

366-
Click on that icon and select "Preferences..." from the drop down menu. Go to the "Advanced" tab and give Docker a bit more memory if you have enough to spare:
366+
2. Click the Docker icon and select "Preferences..." from the drop down menu. Go to the "Advanced" tab and give Docker a bit more memory if you have enough to spare:
367367

368368
![Docker memory settings](images/docker-memory.png)
369369

370-
Go to the "Kubernetes" tab and click on the option to enable Kubernetes:
370+
3. Go to the "Kubernetes" tab and click on the option to enable Kubernetes:
371371

372372
![Enable Kubernetes setting](images/docker-enable-k8s.png)
373373

@@ -377,7 +377,7 @@ Docker will download the Kuberentes components and start them up for you. When
377377

378378
![Kubernetes running](images/docker-k8s-running.png)
379379

380-
If you have previously used `kubectl` on your Mac, then you must make sure it is pointing to the correct cluster and context.
380+
4. Ensure that `kubectl` on your Mac, is pointing to the correct cluster and context.
381381

382382
```
383383
$ kubectl config get-contexts
@@ -394,7 +394,7 @@ $ kubectl config set-cluster docker-for-desktop-cluster
394394
Cluster "docker-for-desktop-cluster" set.
395395
```
396396

397-
You should add `docker-for-desktop` to your `/etc/hosts` file entry for `127.0.0.1`, as shown in this example, and you must use an admin user to edit this file:
397+
5. You should add `docker-for-desktop` to your `/etc/hosts` file entry for `127.0.0.1`, as shown in this example, and you must use an admin user to edit this file:
398398

399399
```
400400
##
@@ -408,13 +408,13 @@ You should add `docker-for-desktop` to your `/etc/hosts` file entry for `127.0.0
408408
::1 localhost
409409
```
410410

411-
You may also have to tell `kubectl` to ignore the certificate by entering this command:
411+
6. You may also have to tell `kubectl` to ignore the certificate by entering this command:
412412

413413
```
414414
kubectl config set-cluster docker-for-desktop --insecure-skip-tls-verify=true
415415
```
416416

417-
Then validate you are talking to the Kubernetes in Docker by entering these commands:
417+
7. Then validate you are talking to the Kubernetes in Docker by entering these commands:
418418

419419
```
420420
$ kubectl cluster-info

0 commit comments

Comments
 (0)