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
Copy file name to clipboardExpand all lines: site/k8s_setup.md
+28-28Lines changed: 28 additions & 28 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -5,7 +5,7 @@
5
5
6
6
# Cheat sheet for setting up Kubernetes
7
7
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:
9
9
10
10
"Production" options:
11
11
@@ -26,24 +26,24 @@ Follow the basic steps from the [Terraform Kubernetes installer for Oracle Clou
26
26
27
27
### Prerequisites
28
28
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).
31
31
3. Create an Terraform configuration file at `~/.terraformrc` that specifies the path to the OCI provider:
4. Edit the terraform.tvfarsto 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:
60
60
61
61
```
62
62
#give a label to your cluster to help identify it if you have multiple
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:
112
112
113
113
```
114
114
$ terraform output worker_public_ips
@@ -140,18 +140,18 @@ $
140
140
141
141
## Install Kubernetes on your own compute resources (e.g. Oracle Linux servers outside a cloud)
142
142
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.
144
144
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.
146
146
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.
148
148
149
149
```
150
150
export docker_dir=/scratch/docker
151
151
export k8s_dir=/scratch/k8s_dir
152
152
```
153
153
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:
155
155
156
156
```
157
157
export PATH=$PATH:/sbin:/usr/sbin
@@ -179,7 +179,7 @@ Source that script to set up your environment variables:
179
179
. ~/.bashrc
180
180
```
181
181
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:
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:
223
223
224
224
```
225
225
# generate a custom /setc/sysconfig/docker-network
@@ -238,7 +238,7 @@ Add your user to the `docker` group:
238
238
usermod -aG docker YOUR_USERID
239
239
```
240
240
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:
242
242
243
243
```
244
244
systemctl enable docker && systemctl start docker
@@ -359,31 +359,31 @@ Congratulations! Docker and Kubernetes are installed and configured!
359
359
360
360
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:
361
361
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:
363
363
364
364

365
365
366
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:
**Note** If you are behind an HTTP proxyyou 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.
375
375
376
376
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:
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:
398
398
399
399
```
400
400
##
@@ -408,13 +408,13 @@ You should add `docker-for-desktop` to your `/etc/hosts` file entry for 127.0.0.
408
408
::1 localhost
409
409
```
410
410
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:
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:
418
418
419
419
```
420
420
$ kubectl cluster-info
@@ -425,4 +425,4 @@ To further debug and diagnose cluster problems, use 'kubectl cluster-info dump'.
425
425
426
426
### Important note about persistent volumes
427
427
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