Kubernetes Bare Metal Install - quinngroup/kubernetes GitHub Wiki

IP ADDRESSES


oneill 172.19.55.20


atlantis 172.19.55.10


vala 172.19.55.26

SET UP REPO

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 IP TABLES

cat <<EOF > /etc/sysctl.d/k8s.conf net.bridge.bridge-nf-call-ip6tables = 1 net.bridge.bridge-nf-call-iptables = 1 EOF sysctl --system

INSTAL KUBERNETES

yum -y install kubernetes

INSTALL ETCD

yum -y install etcd

ON ALL MACHINES

echo "172.19.55.20 oneill-master 172.19.55.10 atl-node" >> /etc/hosts

Edit /etc/kubernetes/config

KUBE_MASTER="--master=http://oneill-master:8080"" >>

Disable firewall

systemctl mask firewalld.service systemctl stop firewalld.service

configure kubernetes on the master

# The address on the local server to listen to. vaddress=0.0.0.0"

# Comma separated list of nodes in the etcd cluster >KUBE_ETCD_SERVERS="--etcd-servers=http://127.0.0.1:2379"

# Address range to use for services KUBE_SERVICE_ADDRESSES="--service-cluster-ip-range=10.254.0.0/16"

# Add your own! KUBE_API_ARGS=""" >> /etc/kubernetes/apiserver

Edit etcd.conf

"ETCD_LISTEN_CLIENT_URLS="http://0.0.0.0:2379"" >> /etc/etcd/etcd.conf

Kubernetes kubelet (node) config

# The address for the info server to serve on (set to 0.0.0.0 or "" for all interfaces) KUBELET_ADDRESS="--address=0.0.0.0"

# You may leave this blank to use the actual hostname KUBELET_HOSTNAME="--hostname-override=fed-node"

# location of the api-server KUBELET_ARGS="--cgroup-driver=systemd --kubeconfig=/etc/kubernetes/master-kubeconfig.yaml --require-kubeconfig"

# Add your own! KUBELET_ARGS=""

Update the yaml -- /etc/kubernetes/master-kubeconfig.yaml

kind: Config clusters: - name: local cluster: server: http://oneill-master:8080 users: - name: kubelet contexts: - context: cluster: local user: kubelet name: kubelet-context current-context: kubelet-context" >> /etc/kubernetes/kubelet

Start services on Nodes

for SERVICES in kube-proxy kubelet docker; do systemctl restart $SERVICES systemctl enable $SERVICES systemctl status $SERVICES done

for SERVICES in etcd kube-apiserver kube-controller-manager kube-scheduler; do systemctl -l restart $SERVICES systemctl -l enable $SERVICES systemctl -l status $SERVICES done

DEPLOY DASHBOARD

kubectl create -f https://raw.githubusercontent.com/kubernetes/dashboard/master/src/deploy/recommended/kubernetes-dashboard.yaml

Current Issue

Error from server (BadRequest): error when creating "dashboard-admin.yaml": Clust erRoleBinding in version "v1beta1" cannot be handled as a ClusterRoleBinding: no kind "ClusterRoleBinding" is registered for version "rbac.authorization.k8s.io/v1 beta1" #kubectl create -f https://raw.githubusercontent.com/kubernetes/dashboard/v1.5.1/src/deploy/kubernetes-dashboard.yaml

⚠️ **GitHub.com Fallback** ⚠️