AWS - Classic Load Balancer - CLB¶
Step-00: Kubernetes Manifests¶
#02-UserManagementMicroservice-Deployment-Service.yml
apiVersion: apps/v1
kind: Deployment
metadata:
name: usermgmt-microservice
labels:
app: usermgmt-restapp
spec:
replicas: 1
selector:
matchLabels:
app: usermgmt-restapp
template:
metadata:
labels:
app: usermgmt-restapp
spec:
initContainers:
- name: init-db
image: busybox:1.31
command: ['sh', '-c', 'echo -e "Checking for the availability of MySQL Server deployment"; while ! nc -z mysql 3306; do sleep 1; printf "-"; done; echo -e " >> MySQL DB Server has started";']
containers:
- name: usermgmt-restapp
image: stacksimplify/kube-usermanagement-microservice:1.0.0
ports:
- containerPort: 8095
env:
- name: DB_HOSTNAME
value: "mysql"
- name: DB_PORT
value: "3306"
- name: DB_NAME
value: "usermgmt"
- name: DB_USERNAME
value: "dbadmin" # RDS DB Username is dbadmin
- name: DB_PASSWORD
valueFrom:
secretKeyRef:
name: mysql-db-password
key: db-password
livenessProbe:
exec:
command:
- /bin/sh
- -c
- nc -z localhost 8095
initialDelaySeconds: 60
periodSeconds: 10
readinessProbe:
httpGet:
path: /usermgmt/health-status
port: 8095
initialDelaySeconds: 60
periodSeconds: 10
Step-01: Create AWS Classic Load Balancer Kubernetes Manifest & Deploy¶
- 04-ClassicLoadBalancer.yml
- Deploy all Manifest
AWS EKS - Elastic Kubernetes Service - Masterclass¶
Step-02: Verify the deployment¶
- Verify if new CLB got created
- Go to Services -> EC2 -> Load Balancing -> Load Balancers
- CLB should be created
- Copy DNS Name (Example: a85ae6e4030aa4513bd200f08f1eb9cc-7f13b3acc1bcaaa2.elb.us-east-1.amazonaws.com)
- Go to Services -> EC2 -> Load Balancing -> Target Groups
- Verify the health status, we should see active.
- Access Application
Step-03: Clean Up¶
# Delete all Objects created
kubectl delete -f kube-manifests/
# Verify current Kubernetes Objects
kubectl get all
🎉 New Course
Ultimate DevOps Real-World Project Implementation on AWS
$15.99
$84.99
81% OFF
APRIL2026
Enroll Now on Udemy
🎉 Offer
