# 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.

![](https://cdn.hashnode.com/res/hashnode/image/upload/v1685574265736/2167629d-9196-4a29-8736-008b216b42da.png align="center")

You can check all you namespace by running " <mark>kubectl get namespace</mark> "

![](https://cdn.hashnode.com/res/hashnode/image/upload/v1685574304476/2fd029d7-9ce8-47a8-a08f-e00eba7e0357.png align="center")

now we need to update our deployment.yml

update your file as below.

![](https://cdn.hashnode.com/res/hashnode/image/upload/v1685574430360/669e02c8-7d4e-4440-8521-7eef5183cc75.png align="center")

you need to run this command again :

```bash
kubectl apply -f deployment.yml
```

Now you can check your namespace.

![](https://cdn.hashnode.com/res/hashnode/image/upload/v1685574491161/4173b798-02f0-4de8-9eb8-e9487252e54c.png align="center")

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.
