Step1: Kubernetes cluster creation
-
Deploy a clean instance of Ubuntu Server VM with following prerequisites:
- Recommended 4 CPU cores (Controller with one TE)
- Recommended 10GB RAM
-
Login to newly deployed server and get helper scripts.
git clone http://gitlab.it.keysight.com/athena/scripts.git cd scripts/kne && chmod +x ./kne.sh
-
Install prerequisites and setup kubeadm cluster.
- comment out meshnet, go and kne part in kne.sh
./kne.sh setup
- ensure all pods are up and running and kubectl will be installed automatically as part of kubeadm setup
kubectl get pods -A
Step2: Install helm
curl -fsSL -o get_helm.sh https://raw.githubusercontent.com/helm/helm/main/scripts/get-helm-3
chmod 700 get_helm.sh
./get_helm.sh
Step3: Install helmfile
-
References:
- https://github.com/roboll/helmfile
- https://www.codegrepper.com/code-examples/shell/helmfile+install+ubuntu
wget -O helmfile_linux_amd64 https://github.com/roboll/helmfile/releases/download/v0.135.0/helmfile_linux_amd64 chmod +x helmfile_linux_amd64 mv helmfile_linux_amd64 ~/.local/bin/helmfile
OR
Install brew package in ubuntu
sudo apt update sudo apt-get install build-essential sudo apt install git -y /bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)" eval "$(/home/linuxbrew/.linuxbrew/bin/brew shellenv)" brew doctor brew install gcc
Install helmfile
brew install helmfile
Step4: Interface Creation
sudo ip link add veth1 type veth peer name veth2
sudo ip link set veth1 up
sudo ip link set veth2 up
Step5: Deployment using helmfile
- add helm chart repo
helm repo add <local_repo_name> <location_of_helm_chart>
Ex-
helm repo add helm https://shramroy.github.io/helm
- check all the local helm chart repo list
helm repo list -a
- search helm charts
helm search repo <local_repo_name>
- check helm envioronment variables
helm env
- check the releases of helm chart based on the namespace
helm list -a
- check all contents(in chart.yaml & values.yaml) for a specific helmchart
helm show all helm/my-chart
- check contents in Chart.yaml for a specific helmchart
helm show chart helm/my-chart
- check contents in values.yaml for a specific helmchart
helm show values helm/my-chart
- check the details about the release of helm chart
helm status <release_name>
-
Get samples of helmfile (b2b, dise)
-
Edit the 'chart' in helmfile.yaml based on the local location of the helm chart for that topology Ex-
releases: - chart: helm/ixia-c
-
Modify helmfile based on requirements like interace & port details
-
Deployment/Install:
- Go to specific topology directory
cd topologies/b2b
- Run:
helmfile sync
-
Delete/Uninstall:
-
Update helmfile.yaml with
installed: false
for application(s) -
Run:
helmfile sync
-
-
Use exposed services on given Nodeports:
- Execute the following command to know the nodeports of exposed serives
- Run:
kubectl get svc -n <namespace_name>