Multi-node Kubernetes on CentOS 7.x with Flannel

Mode: Multi-node setup, with Flannel, using Kismatic repo.

— DEPRECATED (may work; not tested lately) —

This is the common script (kube-base.txt) that we run on every machine. Please tweak it for your environment (mainly IPs) and drop it on some web location.

# file: kube-base.txt
# add docker repo and install docker
cat > /etc/yum.repos.d/docker.repo << '__EOF__'
[docker]
name=Docker Repository
baseurl=https://yum.dockerproject.org/repo/main/centos/7
enabled=1
gpgcheck=1
gpgkey=https://yum.dockerproject.org/gpg
__EOF__
 
yum install docker-engine -y
 
mkdir -p /etc/systemd/system/docker.service.d 
 
cat > /etc/systemd/system/docker.service.d/override.conf << '__EOF__'
[Service] 
ExecStart= 
ExecStart=/usr/bin/docker daemon --storage-driver=overlay $DOCKER_NETWORK_OPTIONS
__EOF__
 
systemctl daemon-reload
systemctl enable docker
 
# we'll start docker only after flannel is up and running
# systemctl start docker
 
tee -a /etc/hosts << '__EOF__'
 
192.168.1.150 kube-master
192.168.1.151 kube-node-01
192.168.1.152 kube-node-02
192.168.1.153 kube-node-03
__EOF__

Continue reading Multi-node Kubernetes on CentOS 7.x with Flannel

Install the latest Kubernetes on CentOS 7.x

This is how we get a single machine installation of Kubernetes 1.2.0 on CentOS 7.2

Update 2016-Apr-23: The latest release of Kubernetes is now available in repo “extras”.

Mode: Single node setup, extra repo.

[root@my-build-n5 ~]# date
Sat Apr 23 12:08:13 EDT 2016
[root@my-build-n5 ~]# yum info kubernetes
Loaded plugins: fastestmirror
Loading mirror speeds from cached hostfile
Available Packages
Name        : kubernetes
Arch        : x86_64
Version     : 1.2.0
Release     : 0.9.alpha1.gitb57e8bd.el7
Size        : 34 k
Repo        : extras
Summary     : Container cluster management
URL         : k8s.io/kubernetes
License     : ASL 2.0
Description : Container cluster management

Install ‘docker’, ‘etcd’ & ‘kubernetes’

yum install docker etcd kubernetes 
 
for SERVICE in docker etcd kube-apiserver kube-controller-manager kube-scheduler kube-proxy kubelet; do 
    systemctl restart $SERVICE
    systemctl enable $SERVICE
done
 
yum install cockpit cockpit-kubernetes
systemctl enable cockpit.socket
systemctl start cockpit.socket
 
firewall-cmd --permanent --zone=public --add-port=9090/tcp && firewall-cmd --reload

And browse to cockpit UI -> https://server_ip:9090

kube-cockpit1