Day 33 : Working with Namespaces and Services in Kubernetes
Today we will be creating namespace on our cluster. Let's get started
Task 1 ) Create a Namespace for your Deployment and Update the deployment.yml file to include the Namespace
You can create namespace by running following command.

You can check all you namespace by running " kubectl get namespace "

now we need to update our deployment.yml
update your file as below.

you need to run this command again :
kubectl apply -f deployment.yml
Now you can check your namespace.

Task 2 ) What is Services, Load Balancing, and Networking in Kubernetes ?
1️⃣ Services: Think of Services as a way to group and organize your application's components (Pods) together. It gives them a unique name and provides a consistent way to access them. It's like giving your team a shared phone number, so anyone can reach them without knowing each individual's contact details.
2️⃣ Load Balancing: Imagine your application has multiple Pods running the same service. Load balancing ensures that incoming requests are evenly distributed among these Pods. It's like having a receptionist who directs incoming calls to different team members to prevent any one person from being overwhelmed.
3️⃣ Networking: In Kubernetes, each Pod gets its own unique IP address, allowing them to communicate with each other. Services act as a middleman, giving your application a single "phone number" that can be used to reach any Pod. Network policies provide rules for controlling who can communicate with whom, acting like a team's internal communication guidelines.
Using Services, Load Balancing, and Networking in Kubernetes helps your application work together as a team, handle incoming requests efficiently, and ensure secure communication between different components.
That was it for today. If you have any queries/suggestions please comment below.



