Detail Plan of Set Up
Configuring GitHub:
- Install git on 192.168.12.251 (Master node).
- sudo apt update
- sudo apt install git
- git –version
- git config --global user.name "Your Name"
- git config --global user.email "[email protected]"
- Setup up a git hub account using mail id.
Configuring Docker Hub:
- Install docker on 192.168.12.228 (Worker Node).
- sudo apt-get update
- sudo apt-get install apt-transport-https ca-certificates curl software-properties-common
- curl -fsSL https//download.docker.com/linux/ubuntu/gpg | sudo apt-key add –
- sudo add-apt-repository "deb [arch=amd64] https//download.docker.com/linux/ubuntu $(lsb_release -cs) stable"
- sudo apt-get update
- sudo apt-get install docker-ce
- sudo systemctl start docker
- sudo systemctl enable docker
- docker --version
- Set up a docker hub account.
- Create a new repository on docker hub.
- Hooking a GitHub repo to docker repo to build automatic docker images.
Configuring Kubernetes:
- Add the Docker gpg key.
curl -fsSL https//download.docker.com/linux/ubuntu/gpg | sudo apt-key add -
- Add the Docker repository:**
sudo add-apt-repository "deb [arch=amd64] https//download.docker.com/linux/ubuntu \
$(lsb_release -cs) \ stable"
- Add the Kubernetes gpg key
curl -s https//packages.cloud.google.com/apt/doc/apt-key.gpg | sudo apt-key add -
- Add the Kubernetes repository
cat << EOF | sudo tee /etc/apt/sources.list.d/kubernetes.list
deb https//apt.kubernetes.io/ kubernetes-xenial main
EOF
- Update your packages
sudo apt-get update
- Install Docker, kubelet, kubeadm, and kubectl:
sudo apt-get install -y docker-ce=18.06.1~ce~3-0~ubuntu kubelet=1.13.5-00 kubeadm=1.13.5-00 kubectl=1.13.5-00
- Hold Docker and kubernetes at the current version
sudo apt-mark hold docker-ce kubelet kubeadm kubectl
- Modify Bridge adaptor settings, add the iptables rule to sysctl.conf:
echo "net.bridge.bridge-nf-call-iptables=1" | sudo tee -a /etc/sysctl.conf
- Enable bridge adaptor settings iptables immediately:
sudo sysctl -p
Now run these below commands only on Master node.
- Initialize the K8s cluster
sudo kubeadm init --pod-network-cidr=10.244.0.0/16
- Make Directory for K8s:
mkdir -p $HOME/.kube
- Copy the Kubeconfig:
sudo cp -i /etc/kubernetes/admin.conf $HOME/.kube/config
- Change ownership of the config
sudo chown $(id -u):$(id -g) $HOME/.kube/config
- Apply Flannel CNI network overlay:
kubectl apply -f https//raw.githubusercontent.com/coreos/flannel/bc79dd1505b0c8681ece4de4c0d86c5cd2643275/Documentation/kube-flannel.yml
- Join the worker nodes to the cluster:
sudo kubeadm join [your unique string from the kubeadm init command]
- Verify the worker nodes have joined the cluster successfully:
kubectl get nodes
Installing Spinnaker:
- Installing of Halyard
curl -O https//raw.githubusercontent.com/spinnaker/halyard/master/install/debian/InstallHalyard.sh
- sudo bash InstallHalyard.sh
- hal -v
- . ~/.bashrc
- sudo update-halyard
- Choose Cloud Providers (Kubernetes Legacy)
- Choose Environment (Distributed Installation on Kubernetes)
- Choose Storage (Please suggest us)
- Setting up of spinnaker.
Configuring Spinnaker:
- Creating a spinnaker application.
- Creating a load balancer.
- Creating a server group.
- Setting up of pipeline.
- Verification of pipeline.
- Promote to prod.
- Run the pipeline.