Component Pack 6.0.0.6 Installation Guide: Martti Garden - IBM Roberto Boccadoro - ELD Engineering
Component Pack 6.0.0.6 Installation Guide: Martti Garden - IBM Roberto Boccadoro - ELD Engineering
Component Pack 6.0.0.6 Installation Guide: Martti Garden - IBM Roberto Boccadoro - ELD Engineering
6 Installation Guide
Martti Garden – IBM
Configure Docker with the devicemapper storage driver (loop-lvm) (on each server)
sudo systemctl stop docker
vi /etc/docker/daemon.json
add:
{
"storage-driver": "devicemapper"
}
add
[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
save and close
The setenforce 0 command disables SELinux to allow containers to access the host file system (required by
pod networks, for example).
setenforce 0
yum install -y kubelet-1.11.1* kubeadm-1.11.1* kubectl-1.11.1*
systemctl enable kubelet && systemctl start kubelet
Ensure that the packages do not upgrade to a later version by running the following command to disable
the kubernetes yum repo:
yum-config-manager --disable kubernetes*
#Some users on RHEL/CentOS 7 have reported issues with traffic being routed incorrectly due to iptables
being bypassed. To avoid this problem, run the following commands to ensure that net.bridge.bridge-nf-
call-iptables is set to 1 in your sysctl config:
vi /etc/sysctl.d/k8s.conf
add
net.bridge.bridge-nf-call-ip6tables = 1
net.bridge.bridge-nf-call-iptables = 1
save and close
sysctl –system
Initializing Master (on Master)
Using Calico as pod network addon
kubeadm init --kubernetes-version=v1.11.1 --pod-network-
cidr=192.168.0.0/16
mkdir -p $HOME/.kube
sudo cp -i /etc/kubernetes/admin.conf $HOME/.kube/config
sudo chown $(id -u):$(id -g) $HOME/.kube/config
Install a pod network add-on (here Calico) so that your pods can communicate with each other.
kubectl apply -f https://docs.projectcalico.org/v3.1/getting-
started/kubernetes/installation/hosted/rbac-kdd.yaml
kubectl apply -f https://docs.projectcalico.org/v3.1/getting-
started/kubernetes/installation/hosted/kubernetes-datastore/calico-
networking/1.7/calico.yaml
mkdir -p $HOME/.kube
SCP the cert from the docker registry machine to all other machines in the kubernetes cluster:
scp cert.pem
soc1.yourserver.com:/etc/docker/certs.d/soc.yourserver.com\:5000/ca.crt
scp cert.pem
soc2.yourserver.com:/etc/docker/certs.d/soc.yourserver.com\:5000/ca.crt
Create registry:
docker run -d -p 5000:5000 --restart=always --name registry -v /docker-
registry/auth:/auth -v /docker-registry/certs:/certs -v /docker-
registry/registry:/var/lib/registry -e "REGISTRY_AUTH=htpasswd" -e
"REGISTRY_AUTH_HTPASSWD_REALM=Registry Realm" -e
"REGISTRY_AUTH_HTPASSWD_PATH=/auth/htpasswd" -e
"REGISTRY_HTTP_TLS_CERTIFICATE=/certs/cert.pem" -e
"REGISTRY_HTTP_TLS_KEY=/certs/key.pem" registry:2
Verify:
docker login -u admin -p mypassword soc.yourserver.com:5000
unzip -p hybridcloud_20180925-031433.zip
microservices_connections/hybridcloud/support/nfsSetup.sh > nfsSetup.sh
unzip -p hybridcloud_20180925-031433.zip
microservices_connections/hybridcloud/support/volumes.sh > volumes.sh
Installing the Dasboards for for monitoring and logging (on master)
mkdir /opt/kubernetes-dashboard
create keys
openssl req -nodes -new -x509 -keyout /opt/kubernetes-
dashboard/dashboard.key -out /opt/kubernetes-dashboard/dashboard.crt -
subj "/CN=dashboard"
kubectl create secret generic kubernetes-dashboard-certs --from-
file=/opt/kubernetes-dashboard -n kube-system
kubectl apply -f
https://raw.githubusercontent.com/kubernetes/dashboard/master/src/deploy/
recommended/kubernetes-dashboard.yaml
kubectl apply -f
/root/cp6006/microservices_connections/hybridcloud/support/dashboard-
admin.yaml
kubectl patch svc kubernetes-dashboard -n kube-system -p
'{"spec":{"type": "NodePort"}}'
kubectl create -f
https://raw.githubusercontent.com/kubernetes/heapster/master/deploy/kube-
config/influxdb/grafana.yaml
kubectl create -f
https://raw.githubusercontent.com/kubernetes/heapster/master/deploy/kube-
config/influxdb/heapster.yaml
kubectl create -f
https://raw.githubusercontent.com/kubernetes/heapster/master/deploy/kube-
config/influxdb/influxdb.yaml
kubectl create -f
https://raw.githubusercontent.com/kubernetes/heapster/master/deploy/kube-
config/rbac/heapster-rbac.yaml
nohup kubectl proxy --address=159.8.241.236 -p 443 --accept-hosts='^*$' &
Verify with
http://IP_ADDR:443/api/v1/namespaces/kube-
system/services/https:kubernetes-dashboard:/proxy/
First Time Setup : Enter ‘comppackk8s-*’ as the index name or pattern and click ‘Create’