Skip to content

Instantly share code, notes, and snippets.

@davistran86
Last active August 12, 2017 15:00
Show Gist options
  • Save davistran86/c85d865abbf15e4f51365bee1a30c53e to your computer and use it in GitHub Desktop.
Save davistran86/c85d865abbf15e4f51365bee1a30c53e to your computer and use it in GitHub Desktop.
Install k8s 1.7.3 on CentOS
===============================
#INSTALL LATEST VERSION 1.7.3
===============================
cat <<EOF > /etc/yum.repos.d/virt7-container-common-candidate.repo
[virt7-container-common-candidate]
name=virt7-container-common-candidate
baseurl=http://cbs.centos.org/repos/virt7-container-common-candidate/x86_64/os/
enabled=0
gpgcheck=0
# See CentOS-extras.repo - change that first, then make this match.
#exclude=
EOF
#AS INSTALLING KUBERNETES ALSO INSTALL DOCKER 1.13.1,
#AND THIS DOCKER VERSION REQUIRE CONTAINER-STORAGE-SETUP
#WHICH IS MISSING IN THIS REPO, WE NEED TO INSTALL DOCKER 1.12.6 IN THE BELLOW REPO
cat <<EOF > /etc/yum.repos.d/kubernetes.repo
[kubernetes]
name=Kubernetes
baseurl=http://yum.kubernetes.io/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
yum -y install docker --enablerpo=kubernetes
yum -y install --enablerepo=virt7-container-common-candidate kubernetes etcd flannel
#CONTAINER STORAGE SETUP REQUIRE FREE SPACE AT LEAST MORE THAN 40GB
#ANOTHER WORKAROUND 1: https://github.com/projectatomic/container-storage-setup
#ANOTHER WORKAROUND 2: INSTALL SEPPERATE : https://github.com/CentOS/CentOS-Dockerfiles/tree/master/kubernetes-sig
# FOLLOW DOCKERFILE TO SEE HOW TO INSTALL K8S WITHOUT DOCKER
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment