Siva k8s
Siva k8s
md at main · daws-81s/concepts
step -1
lsblk
sudo growpart /dev/xvda 4
sudo xfs_growfs /
10gb
Step -2
Install docker
curl https://raw.githubusercontent.com/daws-81s/expense-docker/refs/heads/main/install-
docker.sh | sudo bash
Step -3 – install kubectl and eksctl
https://docs.aws.amazon.com/eks/latest/userguide/install-kubectl.html
curl -O https://s3.us-west-2.amazonaws.com/amazon-eks/1.31.0/2024-09-12/bin/linux/amd64/
kubectl
chmod +x ./kubectl
Move to the /usr/local/bin/kubectl
ARCH=amd64
PLATFORM=$(uname -s)_$ARCH
apiVersion: eksctl.io/v1alpha5
kind: ClusterConfig
metadata:
name: expense-1
region: us-east-1
managedNodeGroups:
- name: expense
instanceType: m5.large
desiredCapacity: 3
spot: true
(kops = eksctl)
Kubectl used for operations
eksctl is specifically meant to bootstrap clusters using Amazon's managed Kubernetes service (EKS).
With EKS, Amazon will take responsibility for managing your Kubernetes Master Nodes (at an
additional cost).
kops is a Kubernetes Installer. It will install kubernetes on any type of node (e.g. an amazon ec2
instance, local virtual machine). But you will be responsible for maintaining the master nodes (and
the complexity that comes with that).
Resources
1)
namespace --> just like VPC, you will have a dedicated isolated project to create your
workloads/resources
syntax in k8
apiVersion:
kind: Namespace
metadata:
name:
labels:
spec:
kubectl apply -f 01-namespace.yaml
pod
----------------
pod is the smallest deployable unit in kubernetes. pod can contain one or many containers.
pod vs container
------------------
curl localhost
2. pod can contain one or many containers.
Session 49
Labels
Are key value pair to describe the pod add’s metadata to pod and used for selectors
Annotations
To specify the amount of cpu and ram occupied by container or limit the container we use
Resource block
Varables
Configmap