CRD (Custom Resource Definitions) & Operators
- Kubernetes gives the extension mechanism where we create
- CRD (Custom resource definition)
- Operators: Refer Here
- They create reconcile loop
- Lifecycle => CRD + Operator
Problem 1: Static YAML Manifests
- K8s manifests are static in nature
- During deployments we will have changes to handle
- image tags
- labels
- namespaces
- We have to manually change the manifests
Problem 2: No Reusability
- Manifest YAML files are not reusable
Solutions
- Helm:
- This works as a package manager to kubernetes
- we need to install helm
- Kustomize:
- This works as if manages multiple environments
- This works with native kubectl
Helm
- Refer Here for official docs and Refer Here to install helm
-
In helm
-
Components:
- Helm (client)
- Repository (Which hosts the charts)
- Chart (An individual package)
Create a helm chart for basic deployment
- YAML Manifest
---
apiVersion: apps/v1
kind: Deployment
metadata:
name: nginx
spec:
replicas: 3
selector:
matchLabels:
app: nginx
template:
metadata:
labels:
app: nginx
spec:
containers:
- name: nginx
image: nginx:1.27
resources:
limits:
memory: "128Mi"
cpu: "500m"
ports:
- containerPort: 80
---
apiVersion: v1
kind: Service
metadata:
name: nginx-svc
spec:
type: ClusterIP
selector:
app: nginx
ports:
- port: 80
targetPort: 80
Helm Charts
- Lets create a helm chart
helm create activity1
- A folder called as activity1 is create with following content

- Refer Here for official docs on Charts
- Helm use go templating syntax Refer Here
- Use helm online validator to verify expression Refer Here
- Helm creates manifests and passes it to the kubectl after replacing dynamic expression (template expressions)

- Refer Here for synaxes used in Helm
- Refer Here for the helm chart.
- Now create a chart repository and push the chart to repository
Kustomize
- Kustomize simplifies templating without strange expressions
- Refer Here for official docs
- Refer Here for kustomize documents
- Refer Here
- Refer Here for multi base
Elastic Kubernetes Service (EKS)
- This is kubernetes as a service offering from AWS
- AWS Service Integrations: (Private integrations)
- AWS has VPC CNI where every pod gets an ip address from vpc range
- AWS services can be linked to AWS load Balancers
- AWS EKS provides Application Load Balancer Ingress controller
- AWS EKS provides necessary CSI implementations (StorageClasses) to use
- AWS EBS Disks
- AWS EFS
- AWS FSx
- AWS S3
- EKS offers cluster node autoscaling
- Cluster autoscaler
- Karpenter
- EKS can be integrated with IAM to bring in AWS users or with external identity servers
- What are different EKS offerings ?
- EKS (Completely on AWS)
- Compute options
- EC2
- Fargate
- Compute options
- EKS on Outposts (Hybrid cloud)
- EKS Anywhere (distribution)
- Onprem
- EKS (Completely on AWS)
- EKS creation options
- Console
- cli
- eksctl Refer Here
- terraform (CI/CD)
