Kubernetes Bare Metal Install - quinngroup/kubernetes GitHub Wiki
oneill 172.19.55.20
atlantis 172.19.55.10
vala 172.19.55.26
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
cat <<EOF > /etc/sysctl.d/k8s.conf
net.bridge.bridge-nf-call-ip6tables = 1
net.bridge.bridge-nf-call-iptables = 1
EOF
sysctl --system
yum -y install kubernetes
yum -y install etcd
echo "172.19.55.20 oneill-master 172.19.55.10 atl-node" >> /etc/hosts
KUBE_MASTER="--master=http://oneill-master:8080"" >>
systemctl mask firewalld.service systemctl stop firewalld.service
# 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
"ETCD_LISTEN_CLIENT_URLS="http://0.0.0.0:2379"" >> /etc/etcd/etcd.conf
# 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=""
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
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
kubectl create -f https://raw.githubusercontent.com/kubernetes/dashboard/master/src/deploy/recommended/kubernetes-dashboard.yaml
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