Skip to content

Commit aec0754

Browse files
authored
Merge pull request #3258 from jbeda/old-kubeadm
Document how to access kubeadm 1.5.
2 parents 88212bd + 27f9724 commit aec0754

File tree

1 file changed

+76
-0
lines changed

1 file changed

+76
-0
lines changed

docs/getting-started-guides/kubeadm.md

+76
Original file line numberDiff line numberDiff line change
@@ -138,6 +138,10 @@ Note: Disabling SELinux by running `setenforce 0` is required in order to allow
138138
containers to access the host filesystem, which is required by pod networks for
139139
example. You have to do this until SELinux support is improved in the kubelet.
140140
141+
While this guide is correct for kubeadm 1.6, the previous version is still
142+
available but can be a bit tricky to install. [See below](#old-kubeadm) for
143+
details.
144+
141145
### (2/4) Initializing your master
142146
143147
The master is the machine where the "control plane" components run, including
@@ -632,3 +636,75 @@ A web search on the error message may help narrow down the issue. Or
632636
communicate the errors you are seeing to the community/company that provides the
633637
pod network implementation you are using.
634638
639+
### Installing kubeadm 1.5 {#old-kubeadm}
640+
641+
This section covers the previous version, kubeadm 1.5. It is still available but is a little tricky to get to. Also note that the command line options and other configuration parameters have changed.
642+
643+
As root, run the following. This is very similar to the regular instructions except for pinning the versions. Note that, due to some unfortunate version strings, kubeadm isn't indexed in the repos and the packages must be downloaded and installed directly.
644+
645+
#### Ubuntu
646+
647+
```bash
648+
apt-get update && apt-get install -y apt-transport-https
649+
curl -s https://packages.cloud.google.com/apt/doc/apt-key.gpg | apt-key add -
650+
cat <<EOF >/etc/apt/sources.list.d/kubernetes.list
651+
deb http://apt.kubernetes.io/ kubernetes-xenial main
652+
EOF
653+
apt-get update
654+
655+
# 1.5.6 does exist in the repo but it has a hard depenedency on a newer kubernetes-cni. Use 1.5.3 instead.
656+
sudo apt-get -y install kubectl=1.5.3-00 kubelet=1.5.3-00 kubernetes-cni=0.3.0.1-07a8a2-00
657+
658+
# Versioning strangeness for how we packaged kubeadm pre-1.6 means that the version number
659+
# says 1.6.0-alpha even though it is the 1.5 version of kubeadm. Because of how this sorts,
660+
# we cannot keep this deb in the repo. Download it manually and install it.
661+
curl -Lo /tmp/old-kubeadm.deb https://apt.k8s.io/pool/kubeadm_1.6.0-alpha.0.2074-a092d8e0f95f52-00_amd64_0206dba536f698b5777c7d210444a8ace18f48e045ab78687327631c6c694f42.deb
662+
sudo dpkg -i /tmp/old-kubeadm.deb
663+
sudo apt-get install -f
664+
665+
# Hold these packages back so that we don't accidentally upgrade them.
666+
sudo apt-mark hold kubeadm kubectl kubelet kubernetes-cni
667+
```
668+
669+
#### CentOS
670+
671+
```bash
672+
cat <<EOF > /etc/yum.repos.d/kubernetes.repo
673+
[kubernetes]
674+
name=Kubernetes
675+
baseurl=http://yum.kubernetes.io/repos/kubernetes-el7-x86_64
676+
enabled=1
677+
gpgcheck=1
678+
repo_gpgcheck=1
679+
gpgkey=https://packages.cloud.google.com/yum/doc/yum-key.gpg
680+
https://packages.cloud.google.com/yum/doc/rpm-package-key.gpg
681+
EOF
682+
683+
setenforce 0
684+
685+
# 1.5.4 is the latest previous version in the repo. Because of messed up
686+
# versioning in the 1.5 release, kubeadm is no longer indexed in the repos
687+
# so we have to refer to the RPM directly.
688+
sudo yum -y install \
689+
yum-versionlock \
690+
docker \
691+
kubectl-1.5.4-0 \
692+
kubelet-1.5.4-0 \
693+
kubernetes-cni-0.3.0.1-0.07a8a2 \
694+
http://yum.kubernetes.io/pool/082436e6e6cad1852864438b8f98ee6fa3b86b597554720b631876db39b8ef04-kubeadm-1.6.0-0.alpha.0.2074.a092d8e0f95f52.x86_64.rpm
695+
696+
# Lock the version of these packages so that we don't upgrade them accidentally.
697+
sudo yum versionlock add kubectl kubelet kubernetes-cni kubeadm
698+
699+
# Enable and start up docker and the kubelet
700+
systemctl enable docker && systemctl start docker
701+
systemctl enable kubelet && systemctl start kubelet
702+
```
703+
704+
#### Running `kubeadm init`
705+
706+
Finally, when running `kubeadm init` you must specify the `--use-kubernetes-version` flag:
707+
708+
```bash
709+
kubeadm init --use-kubernetes-version=v1.5.6
710+
```

0 commit comments

Comments
 (0)