0% found this document useful (0 votes)
20 views20 pages

Siva k8s

Uploaded by

rajsekhar.psoft
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
20 views20 pages

Siva k8s

Uploaded by

rajsekhar.psoft
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 20

concepts/resize-disk.

md at main · daws-81s/concepts

step -1

check the partitions

concepts/resize-disk.md at main · daws-81s/concepts

lsblk
sudo growpart /dev/xvda 4

sudo lvextend -l +50%FREE /dev/RootVG/rootVol

sudo lvextend -l +50%FREE /dev/RootVG/varVol

sudo xfs_growfs /

sudo xfs_growfs /var


df -hT

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

So that all user can execute kube cmds

sudo mv kubectl /usr/local/bin/kubectl


Step -4 install eksctl using below cmds

# for ARM systems, set ARCH to: `arm64`, `armv6` or `armv7`

ARCH=amd64

PLATFORM=$(uname -s)_$ARCH

curl -sLO "https://github.com/eksctl-io/eksctl/releases/latest/download/eksctl_$PLATFORM.tar.gz"

# (Optional) Verify checksum

curl -sL "https://github.com/eksctl-io/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

Step -4 – aws configure

Enter access key

Now to create cluster using ymal conf and eksctl


We use .yaml file

apiVersion: eksctl.io/v1alpha5
kind: ClusterConfig

metadata:
name: expense-1
region: us-east-1

managedNodeGroups:
- name: expense
instanceType: m5.large
desiredCapacity: 3
spot: true

eksctl create cluster --config-file=eks.yaml

(kops = eksctl)
Kubectl used for operations

Kubectl get nodes

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

kubectl get namespace

kubectl delete -f 01-namespace.yaml

pod

----------------

pod is the smallest deployable unit in kubernetes. pod can contain one or many containers.
pod vs container

------------------

1. pod is the smallest deployable unit in kubernetes

2. pod can contain one or many containers.

3. containers in a pod can share same network identity and storage

4. these are useful in sidecar and proxy patterns

kubectl apply -f 02-pods.yaml

kubectl get pod

kubectl exec -it nginx -- bash

curl localhost
2. pod can contain one or many containers.

3. containers in a pod can share same network identity and storage

kubectl exec -it multicontainer -c almalinux -- bash

Session 49

Labels

Are key value pair to describe the pod add’s metadata to pod and used for selectors
Annotations

Just like labels used by selectors (external)


Environment var

They are also key value pairs

The env values can be accessed inside the container/pod code


Limits

To specify the amount of cpu and ram occupied by container or limit the container we use

Resource block
Varables
Configmap

Varable values needed by application pod are supplied by configmap

We can create a pod and use the values

You might also like

pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy