# Kubernetes bundle on CentOS7.7

**URL:** <https://wlcg-discourse.web.cern.ch/t/kubernetes-bundle-on-centos7-7/26>\
**Category:** Installation and Operations\
**Created:** [February 7, 2020, 12:55pm UTC](https://wlcg-discourse.web.cern.ch/t/kubernetes-bundle-on-centos7-7/26 "2020-02-07T12:55:32Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![aforti](https://wlcg-discourse.web.cern.ch/user_avatar/wlcg-discourse.web.cern.ch/aforti/32/16_2.png) [@aforti](https://wlcg-discourse.web.cern.ch/u/aforti)\
**Post date:** [February 7, 2020, 12:55pm UTC](https://wlcg-discourse.web.cern.ch/t/kubernetes-bundle-on-centos7-7/26/1 "2020-02-07T12:55:33Z")

</div>

In the Extras repository there is a kubernetes rpm bundle

```
[root@vm89 ~]# yum info kubernetes --enablerepo=man-CentOS-Extras
Loaded plugins: fastestmirror, langpacks, priorities, protectbase, releasemods
Loading mirror speeds from cached hostfile
233 packages excluded due to repository priority protections
0 packages excluded due to repository protections
Installed Packages
Name : kubernetes
Arch : x86_64
Version : 1.5.2
Release : 0.7.git269f928.el7
Size : 0.0  
Repo : installed
From repo : man-CentOS-Extras
Summary : Container cluster management
URL : k8s.io/kubernetes
Licence : ASL 2.0
Description : Container cluster management

Dependencies Resolved

==================================================================================================================
 Package Arch Version Repository Size
==================================================================================================================
Installing:
 kubernetes x86_64 1.5.2-0.7.git269f928.el7 man-CentOS-Extras 36 k
Installing for dependencies:
 atomic-registries x86_64 1:1.22.1-29.gitb507039.el7 man-CentOS-Extras 35 k
 audit-libs-python x86_64 2.8.5-4.el7 man-CentOS-Base 76 k
 checkpolicy x86_64 2.5-8.el7 man-CentOS-Base 295 k
 conntrack-tools x86_64 1.4.4-5.el7_7.2 man-CentOS-Updates 187 k
 container-selinux noarch 2:2.107-3.el7 man-CentOS-Extras 39 k
 container-storage-setup noarch 0.11.0-2.git5eaf76c.el7 man-CentOS-Extras 35 k
 containers-common x86_64 1:0.1.37-3.el7.centos man-CentOS-Extras 21 k
 docker x86_64 2:1.13.1-108.git4ef4b30.el7.centos man-CentOS-Extras 18 M
 docker-client x86_64 2:1.13.1-108.git4ef4b30.el7.centos man-CentOS-Extras 3.9 M
 docker-common x86_64 2:1.13.1-108.git4ef4b30.el7.centos man-CentOS-Extras 98 k
 kubernetes-client x86_64 1.5.2-0.7.git269f928.el7 man-CentOS-Extras 14 M
 kubernetes-master x86_64 1.5.2-0.7.git269f928.el7 man-CentOS-Extras 25 M
 kubernetes-node x86_64 1.5.2-0.7.git269f928.el7 man-CentOS-Extras 14 M
 libcgroup x86_64 0.41-21.el7 man-CentOS-Base 66 k
 libnetfilter_cthelper x86_64 1.0.0-4.el7 man-epel 18 k
 libnetfilter_cttimeout x86_64 1.0.0-2.el7 man-epel 18 k
 libnetfilter_queue x86_64 1.0.2-2.el7_2 man-CentOS-Base 23 k
 libsemanage-python x86_64 2.5-14.el7 man-CentOS-Base 113 k
 oci-register-machine x86_64 1:0-6.git2b44233.el7 man-CentOS-Extras 1.1 M
 oci-systemd-hook x86_64 1:0.2.0-1.git05e6923.el7_6 man-CentOS-Extras 34 k
 oci-umount x86_64 2:2.5-3.el7 man-CentOS-Extras 33 k
 policycoreutils-python x86_64 2.5-33.el7 man-CentOS-Base 457 k
 python-IPy noarch 0.75-6.el7 man-CentOS-Base 32 k
 python-backports x86_64 1.0-8.el7 man-CentOS-Base 5.8 k
 python-backports-ssl_match_hostname noarch 3.5.0.1-1.el7 man-CentOS-Base 13 k
 python-ipaddress noarch 1.0.16-2.el7 man-CentOS-Base 34 k
 python-pytoml noarch 0.1.14-1.git7dea353.el7 man-CentOS-Extras 18 k
 python-setuptools noarch 0.9.8-7.el7 man-CentOS-Base 397 k
 setools-libs x86_64 3.3.8-4.el7 man-CentOS-Base 620 k
 socat x86_64 1.7.3.2-2.el7 man-CentOS-Base 290 k
 subscription-manager-rhsm-certificates x86_64 1.24.13-3.el7.centos man-CentOS-Updates 228 k

```

it will make it easier to explore bare metal installation in our environment.

---

<div class="post-metadata">

**Author:** ![lbryant](https://wlcg-discourse.web.cern.ch/letter_avatar_proxy/v4/letter/l/8797f3/32.png) [@lbryant](https://wlcg-discourse.web.cern.ch/u/lbryant)\
**Post date:** [February 10, 2020, 6:18pm UTC](https://wlcg-discourse.web.cern.ch/t/kubernetes-bundle-on-centos7-7/26/2 "2020-02-10T18:18:39Z")

</div>

Just want to note that Kubernetes 1.5 is quite old (late 2016/early 2017) so it may be a missing a few things people would expect. It looks like this version may be used by OpenShift and otherwise maintained by RH?

---

<div class="post-metadata">

**Author:** ![aforti](https://wlcg-discourse.web.cern.ch/user_avatar/wlcg-discourse.web.cern.ch/aforti/32/16_2.png) [@aforti](https://wlcg-discourse.web.cern.ch/u/aforti)\
**Post date:** [February 10, 2020, 9:06pm UTC](https://wlcg-discourse.web.cern.ch/t/kubernetes-bundle-on-centos7-7/26/3 "2020-02-10T21:06:56Z")

</div>

Yes, it’s not a cutting edge version, but IMO rpms, instead of putting together the whole stack manually, make it easier to start with and learn the ropes unless we already have a recipe to install from scratch.

---

<div class="post-metadata">

**Author:** ![lbryant](https://wlcg-discourse.web.cern.ch/letter_avatar_proxy/v4/letter/l/8797f3/32.png) [@lbryant](https://wlcg-discourse.web.cern.ch/u/lbryant)\
**Post date:** [February 10, 2020, 9:33pm UTC](https://wlcg-discourse.web.cern.ch/t/kubernetes-bundle-on-centos7-7/26/4 "2020-02-10T21:33:17Z")

</div>

Yes, I definitely agree that RPMs are preferred!

Some sites may be more restrictive than others, but there are RPMs produced directly from the Kubernetes project if you use “kubeadm” for installation:  
[https://kubernetes.io/docs/setup/production-environment/tools/kubeadm/install-kubeadm/#installing-kubeadm-kubelet-and-kubectl](https://kubernetes.io/docs/setup/production-environment/tools/kubeadm/install-kubeadm/#installing-kubeadm-kubelet-and-kubectl)

These will have the latest binaries.

e.g.:

```auto
cat <<EOF > /etc/yum.repos.d/kubernetes.repo
[kubernetes]
name=Kubernetes
baseurl=https://packages.cloud.google.com/yum/repos/kubernetes-el7-x86_64
enabled=1
gpgcheck=1
repo_gpgcheck=1
gpgkey=https://packages.cloud.google.com/yum/doc/yum-key.gpg https://packages.cloud.google.com/yum/doc/rpm-package-key.gpg
EOF

# Set SELinux in permissive mode (effectively disabling it)
setenforce 0
sed -i 's/^SELINUX=enforcing$/SELINUX=permissive/' /etc/selinux/config

yum install -y kubelet kubeadm kubectl --disableexcludes=kubernetes

systemctl enable --now kubelet

```

For SLATE we also documented a “from scratch to single node Kubernetes cluster” guide here: [https://slateci.io/docs/cluster/index.html](https://slateci.io/docs/cluster/index.html) - You can stop after the “SLATE Master” section if you just want a mostly vanilla Kubernetes, and skip over the SLATE-specific parts.

---

<div class="post-metadata">

**Author:** ![aforti](https://wlcg-discourse.web.cern.ch/user_avatar/wlcg-discourse.web.cern.ch/aforti/32/16_2.png) [@aforti](https://wlcg-discourse.web.cern.ch/u/aforti)\
**Post date:** [February 11, 2020, 1:20pm UTC](https://wlcg-discourse.web.cern.ch/t/kubernetes-bundle-on-centos7-7/26/5 "2020-02-11T13:20:24Z")

</div>

Hi Lincoln,

that’s great, Still more complicated than

```auto
yum iinstall -y kubernetes --enablerepo=man-CentOS-Extras

```

🙂

---

<div class="post-metadata">

**Author:** ![strigazi](https://wlcg-discourse.web.cern.ch/letter_avatar_proxy/v4/letter/s/f1d935/32.png) [@strigazi](https://wlcg-discourse.web.cern.ch/u/strigazi)\
**Post date:** [March 6, 2020, 9:18am UTC](https://wlcg-discourse.web.cern.ch/t/kubernetes-bundle-on-centos7-7/26/6 "2020-03-06T09:18:14Z")

</div>

Hello all,

I had built k8s rpms for centos for specific releases (I did it for two) on the centos community build system. For example, [0]. These where tied to a minor release so yum update/distro-sync won’t make you jump from 1.x.y to 1.(x+3).y.

In the CERN cloud team we are now running everything in podman or docker/containerd including the kubelet.

_If there is enough demand I can pick it up again. So let me know._

On ther other hand, an up to date podman can let you run the kubelet in a container using k8s gcr io/hyperkube:\<kubernetes\_release\> and you can get kubeadm from [2].  
For users that want high velocity this is best.

Cheers,  
Spyros

[0] kubernetes 1.9 [http://mirror.centos.org/centos/7/virt/x86\_64/kubernetes19/](http://mirror.centos.org/centos/7/virt/x86_64/kubernetes19/)  
[1] kubernetes 1.10 http:// mirror centos org/centos/7/virt/x86\_64/kubernetes110/  
[2] curl -L --remote-name-all [https://storage.googleapis.com/kubernetes-release/release/${KUBERNETES\_RELEASE}/bin/linux/amd64/{kubeadm,kubelet,kubectl}](https://storage.googleapis.com/kubernetes-release/release/%24%7BKUBERNETES_RELEASE%7D/bin/linux/amd64/%7Bkubeadm,kubelet,kubectl%7D)

ps Sorry, discourse doesn’t let me post more than two links.
