Topics
- AKS
- EKS
- Helm/Kustomize
- ingress
- hpa
Managed K8s
- Managed K8s cluster will manage master nodes i.e. we don’t have explicit access to master nodes
- so cluster administrational activities such as
- backing up k8s cluster
- upgrading k8s cluster
- cloud controller manager configurations to
- have access to native cloud networks
- have csi implementations specific to cloud provider
- have cni implemenations specific to cloud provider
- Cloud providers charge hourly for cluster and they give sla’s
AKS cluster creation and features
EKS Cluster
- Elastic kubernetes Services is a managed k8s from aws
- EKS cluster can be created in many ways
- aws console
- aws cli
- terraform
- eksctl
this will be used
- Features Refer Here
- Create a linux instance, install aws cli, create iam credentials
- install kubectl Refer Here
- we had followed direct installation Refer Here
- Install eksctl Refer Here
# for ARM systems, set ARCH to: `arm64`, `armv6` or `armv7`
ARCH=amd64
PLATFORM=$(uname -s)_$ARCH
curl -sLO "https://github.com/weaveworks/eksctl/releases/latest/download/eksctl_$PLATFORM.tar.gz"
# (Optional) Verify checksum
curl -sL "https://github.com/weaveworks/eksctl/releases/latest/download/eksctl_checksums.txt" | grep $PLATFORM | sha256sum --check
tar -xzf eksctl_$PLATFORM.tar.gz -C /tmp && rm eksctl_$PLATFORM.tar.gz
sudo mv /tmp/eksctl /usr/local/bin
- Create a file called as
cluster.yaml with the following content
apiVersion: eksctl.io/v1alpha5
kind: ClusterConfig
metadata:
name: basic-cluster
region: us-west-2
nodeGroups:
- name: basic
instanceType: t2.large
desiredCapacity: 2
volumeSize: 20
ssh:
allow: true # will use ~/.ssh/id_rsa.pub as the default ssh key
- Execute ssh-keygen
ssh-keygen
- Now execute the command
eksctl create cluster -f cluster.yaml
- After creation execute
kubectl get nodes
kubectl get pods --all-namespaces

Helm
- Helm is a package manager for k8s
- In helm we have repositories where charts are defined
- An helm chart is analogus to package (apt package)
- install helm Refer Here
-
Manifests are static in nature, to add reusability and dynamic nature to manifests we have two options
- helm:
- this uses templated approach
- this was present from earlier days of k8s
- kustomize:
- this uses override approach
- this is natively supported in kubectl (recent additions)
-
Refer Here for the basic chart created
Kustomize
- Kustomize is a tool where we can natively manage configurations
- Refer Here for kustomize
- Natively manage dynamic configurations to k8s manifests
- Lets write a k8s manifest
- to deploy
shaikkhajaibrahim/dashboardservice:1.0.0 which runs on 80 port
- create a service file exposed as LoadBalancer
- Refer Here for manifests
- Refer Here for tutorial from vultr to use kustomize
- Refer Here for the manifest folder structure
- Now lets add name prefix per environment
- Refer Here for nameprefix docs.
- Refer Here for the changes done

- Refer Here for labels per env
- Refer Here for kustomize examples
Problem – 1
- Creating a Load Balancer for every service shoots up cloud costs
- I would like to perform
- path based routing
- hostname based routing
- Solution:
- Ingress which provides external access to k8s services
Questions
- How to check logs of pods
- What are events in k8s
- why should i use k8s
- What are stateful sets?
- What is purpose of headless service?
- What is CSI ?
- What is CNI ?
- What is the last problem which you faced in k8s ?
- How to use external vault in k8s
- How to backup k8s cluster?
- How to upgrade the k8s cluster?
- what is draining the node vs cordon the node?
- Can we implement custom dns in k8s?
- What is default dns in k8s?
- communication between two services in different namespaces
- How to auto scale nodes in aks/eks?
cluster node autoscaler
- List down atleast 10 most common k8s failures?
Like this:
Like Loading...