> Create a new AWS Instance named “Minikube” on T2-Medium & access it via PUTTY as we do, then do the rest lab:
ubuntu
→ This command logs you in as the ubuntu user
sudo su
→ Switches to the root user for administrative tasks
apt update && apt -y install docker.io
→ Updates the package lists and installs Docker, which is required for container management
curl -LO <https://storage.googleapis.com/kubernetes-release/release/$>(curl -s <https://storage.googleapis.com/kubernetes-release/release/stable.txt>)/bin/linux/amd64/kubectl && chmod +x ./kubectl && sudo mv ./kubectl /usr/local/bin/kubectl
→ Downloads the latest version of kubectl
, sets the appropriate permissions, and moves it to /usr/local/bin
so it can be executed from anywhere
which kubectl
→ Verifies the installation by showing the path where kubectl
is installed
kubectl version
→ Displays the client and server versions of kubectl
curl -Lo minikube <https://storage.googleapis.com/minikube/releases/latest/minikube-linux-amd64> && chmod +x minikube && sudo mv minikube /usr/local/bin/
→ Downloads the latest Minikube binary, sets the appropriate permissions, and moves it to /usr/local/bin
apt install conntrack
→ Installs conntrack
, which is required for Minikube
minikube start --vm-driver=none
→ Starts Minikube without using a VM, making it run directly on the host system
minikube status
→ Checks the status of the Minikube cluster to ensure it is running
curl -fsSL -o get_helm.sh <https://raw.githubusercontent.com/helm/helm/master/scripts/get-helm-3
> → Downloads the Helm installation script
chmod 700 get_helm.sh
→ Sets execute permissions for the Helm installation script
./get_helm.sh
→ Executes the Helm installation script to install Helm
Downloading [<https://get.helm.sh/helm-v3.6.3-linux-amd64.tar.gz>](<https://get.helm.sh/helm-v3.6.3-linux-amd64.tar.gz>)
Verifying checksum... Done.
Preparing to install helm into /usr/local/bin
helm installed into /usr/local/bin/helm
which helm
→ Verifies the installation by showing the path where Helm is installed
helm version
→ Displays the client and server versions of Helm
Helm Repository Management:
helm repo add stable <https://charts.helm.sh/stable
> → Adds the stable Helm chart repository to your Helm configuration
"stable" has been added to your repositories
helm repo list
→ Lists all Helm repositories that have been added
NAME URL
stable [<https://charts.helm.sh/stable>](<https://charts.helm.sh/stable>)
Helm Chart Search:
helm search repo jenkins
→ Searches for Jenkins charts in the Helm repositories
NAME CHART VERSION APP VERSION DESCRIPTION
stable/jenkins 2.1.0 lts Jenkins - the leading open source automation server
helm search repo tomcat
→ Searches for Tomcat charts in the Helm repositories
NAME CHART VERSION APP VERSION DESCRIPTION
stable/tomcat 0.4.0 8.5.35 An Open Source Implementation of Java Servlet, J...
helm search repo apache
→ Searches for Apache charts in the Helm repositories
NAME CHART VERSION APP VERSION DESCRIPTION
stable/apache 8.5.35 2.4.37 Chart for Apache HTTP Server
Viewing Helm Chart Information:
helm show values stable/tomcat
→ Displays the default values for the Tomcat chart
replicaCount: 1
image:
repository: tomcat
tag: 8.5.35
pullPolicy: IfNotPresent
helm show chart stable/tomcat
→ Displays metadata about the Tomcat chart
apiVersion: v1
description: An Open Source Implementation of Java Servlet, JSP, and WebSocket technologies
name: tomcat
version: 0.4.0
helm show all stable/tomcat
→ Displays all information about the Tomcat chart
Complete output including metadata, default values, and templates
File and Directory Operations:
apt-get install tree
→ Installs the tree
utility, which displays directory structures in a tree-like format
helm create helloworld
→ Creates a new Helm chart named “helloworld”
ls
→ Lists files and directories in the current directory
tree helloworld/
→ Displays the directory structure of the “helloworld” chart
helloworld/
├── Chart.yaml
├── charts
├── templates
│ ├── NOTES.txt
│ ├── _helpers.tpl
│ ├── deployment.yaml
│ ├── hpa.yaml
│ ├── ingress.yaml
│ ├── service.yaml
│ └── tests
│ └── test-connection.yaml
└── values.yaml
cd helloworld
→ Changes directory to “helloworld”
ls
→ Lists files and directories in the “helloworld” directory
Chart.yaml charts templates values.yaml
vi values.yml
→ Edits the values.yml
file in the “helloworld” chart
cd ..
→ Goes back to the previous directory
ls
→ Lists files and directories in the current directory
tree helloworld
→ Displays the directory structure of the “helloworld” chart after editing
rm -rf helloworld
→ Removes the “helloworld” directory and its contents
ls
→ Lists files and directories in the current directory