Skip to content

Commit

Permalink
Update kubeadm install doc for v1.8
Browse files Browse the repository at this point in the history
  • Loading branch information
luxas committed Sep 28, 2017
1 parent b8d00ae commit 8642a7c
Showing 1 changed file with 50 additions and 28 deletions.
78 changes: 50 additions & 28 deletions docs/setup/independent/install-kubeadm.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ This page shows how to use install kubeadm.

{% capture prerequisites %}

* One or more machines running Ubuntu 16.04+, CentOS 7 or HypriotOS v1.0.1+
* One or more machines running Ubuntu 16.04+, CentOS 7, RHEL 7, Fedora 25 (YMMV) or HypriotOS v1.0.1+
* 1GB or more of RAM per machine (any less will leave little room for your apps)
* Full network connectivity between all machines in the cluster (public or private network is fine)
* Unique MAC address and product_uuid for every node
Expand Down Expand Up @@ -55,38 +55,50 @@ documentation for the plugins about what port(s) those need.
## Installing Docker

On each of your machines, install Docker.
Version 1.12 is recommended, but v1.10 and v1.11 are known to work as well.
Versions 1.13 and 17.03+ have not yet been tested and verified by the Kubernetes node team.
For installation instructions, see
[Install Docker](https://docs.docker.com/engine/installation/).
Version v1.12 is recommended, but v1.11, v1.13 or 17.03 are known to work as well.
Versions 17.06+ _might work_, but have not yet been tested and verified by the Kubernetes node team.

## Installing kubectl
You can for instance use the following commands to install Docker on your system:

On each of your machines,
[install kubectl](/docs/tasks/tools/install-kubectl/).
You only need kubectl on the master and/or your workstation, but it can be
useful to have on the other nodes as well.
{% capture ubuntu %}

## Installing kubelet and kubeadm
``` bash
apt-get update
apt-get install -y docker.io
```

You will install these packages on all of your machines:
{% endcapture %}

{% capture centos %}

``` bash
yum install -y docker
systemctl enable docker && systemctl start docker
```

{% endcapture %}

{% assign tab_names = "Ubuntu or HypriotOS;CentOS, RHEL or Fedora" | split: ';' | compact %}
{% assign tab_contents = site.emptyArray | push: ubuntu | push: centos %}

{% include tabs.md %}

* `kubelet`: the component that runs on all of the machines in your cluster
and does things like starting pods and containers.

## Installing kubeadm, kubelet and kubectl

You will install these packages on all of your machines:

* `kubeadm`: the command to bootstrap the cluster.

**Note:** If you already have kubeadm installed, you should do a `apt-get update &&
apt-get upgrade` or `yum update` to get the latest version of kubeadm. See the
kubeadm release notes if you want to read about the different [kubeadm
releases](https://github.com/kubernetes/kubeadm/blob/master/CHANGELOG.md).
* `kubelet`: the component that runs on all of the machines in your cluster
and does things like starting pods and containers.

For each machine:
* `kubectl`: the command line util to talk to your cluster.

* SSH into the machine and become root if you are not already (for example,
run `sudo -i`).
Please proceed with executing the following commands based on your OS as the `root` user by SSH-ing
into each machine. You may for example become `root` by executing `sudo -i`.

* If the machine is running Ubuntu or HypriotOS, run:
{% capture ubuntu %}

``` bash
apt-get update && apt-get install -y apt-transport-https
Expand All @@ -95,10 +107,12 @@ For each machine:
deb http://apt.kubernetes.io/ kubernetes-xenial main
EOF
apt-get update
apt-get install -y kubelet kubeadm
apt-get install -y kubelet kubeadm kubectl
```
* If the machine is running CentOS, run:
{% endcapture %}
{% capture centos %}
``` bash
cat <<EOF > /etc/yum.repos.d/kubernetes.repo
Expand All @@ -116,13 +130,21 @@ For each machine:
systemctl enable kubelet && systemctl start kubelet
```
**Note:** Disabling SELinux by running `setenforce 0` is required to allow
containers to access the host filesystem, which is required for the `kubeadm init`
process to complete successfully. You have to do this until SELinux support is
improved in the kubelet.
{% endcapture %}
{% assign tab_names = "Ubuntu or HypriotOS;CentOS, RHEL or Fedora" | split: ';' | compact %}
{% assign tab_contents = site.emptyArray | push: ubuntu | push: centos %}
{% include tabs.md %}
The kubelet is now restarting every few seconds, as it waits in a crashloop for
kubeadm to tell it what to do.
**Note:** Disabling SELinux by running `setenforce 0` is required to allow
containers to access the host filesystem, which is required by pod networks for
example. You have to do this until SELinux support is improved in the kubelet.
{% endcapture %}
{% capture whatsnext %}
Expand Down

0 comments on commit 8642a7c

Please sign in to comment.