@@ -10,11 +10,12 @@ This page shows how to use install kubeadm.
1010
1111{% capture prerequisites %}
1212
13- *  One or more machines running Ubuntu 16.04+, CentOS 7 or HypriotOS v1.0.1+
13+ *  One or more machines running Ubuntu 16.04+, Debian 9,  CentOS 7, RHEL 7, Fedora 25/26 (YMMV)  or HypriotOS v1.0.1+
1414*  1GB or more of RAM per machine (any less will leave little room for your apps)
1515*  Full network connectivity between all machines in the cluster (public or private network is fine)
1616*  Unique MAC address and product_uuid for every node
1717*  Certain ports are open on your machines. See the section below for more details
18+ *  Swap disabled. You must disable swap in order for the kubelet to work properly.
1819
1920{% endcapture %}
2021
@@ -55,73 +56,105 @@ documentation for the plugins about what port(s) those need.
5556## Installing Docker  
5657
5758On each of your machines, install Docker.
58- Version 1.12 is recommended, but v1.10 and v1.11 are known to work as well.
59- Versions 1.13 and 17.03+ have not yet been tested and verified by the Kubernetes node team.
60- For installation instructions, see
61- [ Install Docker] ( https://docs.docker.com/engine/installation/ ) .
59+ Version v1.12 is recommended, but v1.11, v1.13 and 17.03 are known to work as well.
60+ Versions 17.06+ _ might work_ , but have not yet been tested and verified by the Kubernetes node team.
6261
63- ##  Installing kubectl 
62+ You can use the following commands to install Docker on your system: 
6463
65- On each of your machines,
66- [ install kubectl] ( /docs/tasks/tools/install-kubectl/ ) .
67- You only need kubectl on the master and/or your workstation, but it can be
68- useful to have on the other nodes as well.
64+ {% capture docker_ubuntu %}
6965
70- ## Installing kubelet and kubeadm  
66+ Install Docker from Ubuntu's repositories:
67+ 
68+ ``` bash 
69+ apt-get update
70+ apt-get install -y docker.io
71+ ``` 
72+ 
73+ or install Docker CE 17.03 from Docker's repositories for Ubuntu or Debian:
74+ 
75+ ``` bash 
76+ apt-get update &&  apt-get install -y curl apt-transport-https
77+ curl -fsSL https://download.docker.com/linux/ubuntu/gpg |  apt-key add -
78+ cat << EOF  >/etc/apt/sources.list.d/docker.list
79+ deb https://download.docker.com/linux/$( lsb_release -si |  tr ' [:upper:]' ' [:lower:]' ) $( lsb_release -cs)  
80+ EOF 
81+ apt-get update &&  apt-get install -y docker-ce=$( apt-cache madison docker-ce |  grep 17.03 |  head -1 |  awk ' {print $3}' ) 
82+ ``` 
83+ 
84+ {% endcapture %}
85+ 
86+ {% capture docker_centos %}
87+ 
88+ ``` bash 
89+ yum install -y docker
90+ systemctl enable  docker &&  systemctl start docker
91+ ``` 
92+ 
93+ {% endcapture %}
94+ 
95+ {% assign docker_tab_names = "Ubuntu, Debian or HypriotOS;CentOS, RHEL or Fedora" | split: ';' | compact %}
96+ {% assign docker_tab_contents = site.emptyArray | push: docker_ubuntu | push: docker_centos %}
97+ 
98+ ## Installing kubeadm, kubelet and kubectl  
7199
72100You will install these packages on all of your machines:
73101
102+ *  ` kubeadm ` : the command to bootstrap the cluster.
103+ 
74104*  ` kubelet ` : the component that runs on all of the machines in your cluster
75105    and does things like starting pods and containers.
76106
77- *  ` kubeadm ` : the command to bootstrap the  cluster.
107+ *  ` kubectl ` : the command line util  to talk to your  cluster.
78108
79- ** Note:**  If you already have kubeadm installed, you should do a `apt-get update &&
80- apt-get upgrade`  or  ` yum update` to get the latest version of kubeadm. See the
81- kubeadm release notes if you want to read about the different [ kubeadm
82- releases] ( https://github.com/kubernetes/kubeadm/blob/master/CHANGELOG.md ) .
83- 
84- For each machine:
85- 
86- *  SSH into the machine and become root if you are not already (for example,
87-   run ` sudo -i ` ).
88- 
89- *  If the machine is running Ubuntu or HypriotOS, run:
90- 
91-   ```  bash 
92-   apt-get update &&  apt-get install -y apt-transport-https
93-   curl -s https://packages.cloud.google.com/apt/doc/apt-key.gpg |  apt-key add -
94-   cat << EOF  >/etc/apt/sources.list.d/kubernetes.list
95-   deb http://apt.kubernetes.io/ kubernetes-xenial main 
96-   EOF 
97-   apt-get update 
98-   apt-get install -y kubelet kubeadm 
99-   ` ` `  
100- 
101- *  If the machine is running CentOS, run:
102- 
103-   ` ` `   bash
104-   cat <<EOF > /etc/yum.repos.d/kubernetes.repo 
105-   [kubernetes] 
106-   name=Kubernetes 
107-   baseurl=https://packages.cloud.google.com/yum/repos/kubernetes-el7-x86_64 
108-   enabled=1 
109-   gpgcheck=1 
110-   repo_gpgcheck=1 
111-   gpgkey=https://packages.cloud.google.com/yum/doc/yum-key.gpg 
112-           https://packages.cloud.google.com/yum/doc/rpm-package-key.gpg 
113-   EOF 
114-   setenforce 0 
115-   yum install -y kubelet kubeadm 
116-   systemctl enable kubelet && systemctl start kubelet 
117-   ` ` `  
109+ Please proceed with executing the following commands based on your OS as the ` root `  user by SSH-ing
110+ into each machine. You may for example become ` root `  by executing ` sudo -i ` .
118111
119- The kubelet is now restarting every few seconds, as it waits in  a crashloop for  
120- kubeadm to tell it what to do. 
112+ {% capture ubuntu %}
113+ 
114+ ``` bash 
115+ apt-get update &&  apt-get install -y apt-transport-https
116+ curl -s https://packages.cloud.google.com/apt/doc/apt-key.gpg |  apt-key add -
117+ cat << EOF  >/etc/apt/sources.list.d/kubernetes.list
118+ deb http://apt.kubernetes.io/ kubernetes-xenial main 
119+ EOF 
120+ apt-get update
121+ apt-get install -y kubelet kubeadm kubectl
122+ ``` 
123+ 
124+ {% endcapture %}
125+ 
126+ {% capture centos %}
127+ 
128+ ``` bash 
129+ cat << EOF  > /etc/yum.repos.d/kubernetes.repo
130+ [kubernetes] 
131+ name=Kubernetes 
132+ baseurl=https://packages.cloud.google.com/yum/repos/kubernetes-el7-x86_64 
133+ enabled=1 
134+ gpgcheck=1 
135+ repo_gpgcheck=1 
136+ gpgkey=https://packages.cloud.google.com/yum/doc/yum-key.gpg 
137+         https://packages.cloud.google.com/yum/doc/rpm-package-key.gpg 
138+ EOF 
139+ setenforce 0
140+ yum install -y kubelet kubeadm
141+ systemctl enable  kubelet &&  systemctl start kubelet
142+ ``` 
121143
122144** Note:**  Disabling SELinux by running ` setenforce 0 `  is required to allow
123- containers to access the host filesystem, which is required by pod networks for  
124- example. You have to do  this until  SELinux support is improved in  the kubelet. 
145+ containers to access the host filesystem, which is required for the ` kubeadm init ` 
146+ process to complete successfully. You have to do this until SELinux support
147+ is improved.
148+ 
149+ {% endcapture %}
150+ 
151+ {% assign tab_names = "Ubuntu, Debian or HypriotOS;CentOS, RHEL or Fedora" | split: ';' | compact %}
152+ {% assign tab_contents = site.emptyArray | push: ubuntu | push: centos %}
153+ 
154+ {% include tabs.md %}
155+ 
156+ The kubelet is now restarting every few seconds, as it waits in a crashloop for
157+ kubeadm to tell it what to do.
125158
126159{% endcapture %}
127160
0 commit comments