Skip to content

Commit 6e56860

Browse files
authored
Merge pull request #62 from oracle/jpatt/cheat-sheet-copy-edits
Fixed several typos.
2 parents efd8a5e + bdb65ed commit 6e56860

File tree

1 file changed

+28
-28
lines changed

1 file changed

+28
-28
lines changed

site/k8s_setup.md

Lines changed: 28 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55

66
# Cheat sheet for setting up Kubernetes
77

8-
If you need some help setting up a Kubernetes environment to experiment with the operator, please read on! The supported environment is an on-premise installation of Kubernetes, e.g. on Bare Metal, or on a cloud provider like Oracle Cloud, Google, or Amazon. Cloud providers allow you to provision a managed Kubernetes environment from their management consoles. You could also set up Kubernetes manually using compute resources on a cloud. There are also a number of ways to run a Kubernetes single-node cluster that is suitable for development or testing purposes. So your options look like this:
8+
If you need some help setting up a Kubernetes environment to experiment with the operator, please read on! The supported environment is an on-premises installation of Kubernetes; for example, on Bare Metal, or on a cloud provider like Oracle Cloud, Google, or Amazon. Cloud providers allow you to provision a managed Kubernetes environment from their management consoles. You could also set up Kubernetes manually using compute resources on a cloud. There are also a number of ways to run a Kubernetes single-node cluster that is suitable for development or testing purposes. So your options look like this:
99

1010
"Production" options:
1111

@@ -26,24 +26,24 @@ Follow the basic steps from the [Terraform Kubernetes installer for Oracle Clou
2626

2727
### Prerequisites
2828

29-
1. Download and install [Terraform][Terraform] (v0.10.3 or later)
30-
2. Download and install the [OCI Terraform Provider][OCI provider] (v2.0.0 or later)
29+
1. Download and install [Terraform][Terraform] (v0.10.3 or later).
30+
2. Download and install the [OCI Terraform Provider][OCI provider] (v2.0.0 or later).
3131
3. Create an Terraform configuration file at `~/.terraformrc` that specifies the path to the OCI provider:
3232
```
3333
providers {
3434
oci = "<path_to_provider_binary>/terraform-provider-oci"
3535
}
3636
```
37-
4. Ensure you have [Kubectl][Kubectl] installed if you plan to interact with the cluster locally
37+
4. Ensure you have [Kubectl][Kubectl] installed if you plan to interact with the cluster locally.
3838

3939
### Quick Start
4040

41-
1. git clone the Terraform Kubernetes installer project
41+
1. Do a `git clone` of the Terraform Kubernetes installer project:
4242

4343
```
4444
git clone https://github.com/oracle/terraform-kubernetes-installer.git
4545
```
46-
2. Initialize your project
46+
2. Initialize your project:
4747

4848
```
4949
cd terraform-kubernetes-installer
@@ -56,7 +56,7 @@ terraform init
5656
cp terraform.example.tfvars terraform.tfvars
5757
```
5858

59-
4. Edit the terraform.tvfars to include values for your tenancy, user, and compartment. Optionally edit variables to change the Shape of the VMs for your Kubernetes master and workers, and your etcd cluster. For example:
59+
4. Edit the `terraform.tvfars` file to include values for your tenancy, user, and compartment. Optionally edit variables to change the `Shape` of the VMs for your Kubernetes master and workers, and your etcd cluster. For example:
6060

6161
```
6262
#give a label to your cluster to help identify it if you have multiple
@@ -90,25 +90,25 @@ etcd_iscsi_volume_create = true
9090
etcd_iscsi_volume_size = 50
9191
```
9292

93-
5. Test and Apply your changes
93+
5. Test and apply your changes:
9494

9595
```
9696
terraform plan
9797
terraform apply
9898
```
9999

100-
6. Test your cluster using built in script at `scripts/cluster-check.sh`
100+
6. Test your cluster using the built-in script `scripts/cluster-check.sh`:
101101

102102
```
103103
scripts/cluster-check.sh
104104
```
105-
7. Output the ssh private key
105+
7. Output the SSH private key:
106106
```
107107
# output the ssh private key for use later
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+
7. If you need shared storage between your Kubernetes worker nodes, enable and configure NFS:
112112

113113
```
114114
$ terraform output worker_public_ips
@@ -140,18 +140,18 @@ $
140140

141141
## Install Kubernetes on your own compute resources (e.g. Oracle Linux servers outside a cloud)
142142

143-
These instructions are for Oracle Linux 7u2+. If you are using a different flavor of Linux you will need to adjust accordingly.
143+
These instructions are for Oracle Linux 7u2+. If you are using a different flavor of Linux, you will need to adjust accordingly.
144144

145-
**NOTE** These steps must be run with the `root` user, until specified otherwise! Any tome you see `YOUR_USERID` in a command, you should replace it with your actual userid.
145+
**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) as it will be used for the `/var/lib/docker` filesystem which contains all of your images and containers. The Kubernetes directory will be used for the `/var/lib/kubelet` filesystem and persistent volume storage.
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 syste, 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 it will get executed at login. You will also need to configure your proxy settings in here, if you are behind an HTTP proxy:
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 in here if you are behind an HTTP proxy:
155155

156156
```
157157
export PATH=$PATH:/sbin:/usr/sbin
@@ -179,7 +179,7 @@ Source that script to set up your environment variables:
179179
. ~/.bashrc
180180
```
181181

182-
If you want command completion, you can add this to the script:
182+
If you want command completion, you can add the following to the script:
183183

184184
```
185185
[ -f /usr/share/bash-completion/bash_completion ] && . /usr/share/bash-completion/bash_completion
@@ -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 HTTP proxy configuration if you need it:
222+
Set up the Docker network, including the HTTP proxy configuration if you need it:
223223

224224
```
225225
# generate a custom /setc/sysconfig/docker-network
@@ -238,7 +238,7 @@ Add your user to the `docker` group:
238238
usermod -aG docker YOUR_USERID
239239
```
240240

241-
Enable and start the Docker service we just installed and configured:
241+
Enable and start the Docker service that we just installed and configured:
242242

243243
```
244244
systemctl enable docker && systemctl start docker
@@ -359,31 +359,31 @@ 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 pretty 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 (Command-space bar, type in "Docker" (without the quotes) and run it). Once it is running you will see the Docker icon appear in your status bar:
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:
363363

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

366366
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:
367367

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

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

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

374-
**Note** If you are behind an HTTP proxy you should also go to the "Proxies" tab and add your proxy details in there.
374+
**Note** If you are behind an HTTP proxy, then you should also go to the "Proxies" tab and enter your proxy details.
375375

376376
Docker will download the Kuberentes components and start them up for you. When it is done, you will see the Kubernetes status go to green/running in the menu:
377377

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

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

382382
```
383383
$ kubectl config get-contexts
384384
CURRENT NAME CLUSTER AUTHINFO NAMESPACE
385-
* docker-for-desktop docker-for-desktop-cluster docker-for-desktop
386-
kubernetes-admin@kubernetes kubernetes kubernetes-admin
385+
* docker-for-desktop docker-for-desktop-cluster docker-for-desktop
386+
kubernetes-admin@kubernetes kubernetes kubernetes-admin
387387
$ kubectl config use-context docker-for-desktop
388388
Switched to context "docker-for-desktop".
389389
$ kubectl config get-clusters
@@ -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, you will have to use an admin user to edit this file:
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:
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 using this command:
411+
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 with these commands:
417+
Then validate you are talking to the Kubernetes in Docker by entering these commands:
418418

419419
```
420420
$ kubectl cluster-info
@@ -425,4 +425,4 @@ To further debug and diagnose cluster problems, use 'kubectl cluster-info dump'.
425425

426426
### Important note about persistent volumes
427427

428-
Docker for Mac has some restrictions on where you can place a directory that can be used as a `HostPath` for a persistent volume. To keep it easy, you should place your directory somewhere under `/Users`.
428+
Docker for Mac has some restrictions on where you can place a directory that can be used as a `HostPath` for a persistent volume. To keep it simple, place your directory somewhere under `/Users`.

0 commit comments

Comments
 (0)