DevOps(Day-33) : Working with Namespaces and Services in Kubernetes
TABLE OF CONTENTS
Namespace in K8s
Namespace is the methodology of categorizing a single cluster into multiple sub-clusters in an organisation. These sub-clusters are then managed by different teams that can interact and share information between them. While the clusters can function autonomously, they are still connected to other clusters and aren’t completely independent, and can even support one cluster nested within another. In general, there is a default namespace where all the resources exist.
Task-1: Create a Namespace for your Deployment
Create the Namespace in the server using the below command.
Now edit the deployment file and add Namespace to it.
Run the deployment file by applying the namespace to it using below command.
Now, check the namespace status.
Task-2: Services, LoadBalancing, Networking in K8s
Services
Service in K8s enables access to the external network to access Pods in K8. Services select Pods based on their labels. When a network request is made to the service, it selects all Pods in the cluster matching the service's selector, chooses one of them, and forwards the network request to it.
LoadBalancing
Load balancing is a key component of Kubernetes container management. A load balancer distributes network traffic among multiple Kubernetes services, allowing you to use your containers more efficiently and maximize the availability of your services.
Networking
The Kubernetes network model provides the foundation for understanding how containers, pods, and services within Kubernetes communicate with each other. Developed by Google, networking with Kubernetes allows administrators to move workloads across private, public, and hybrid cloud infrastructures. Developers use Kubernetes to package software applications with their required infrastructure and deploy new versions quickly.
Thanks for reading my article. Have a nice day.
WRITTEN BY Biswaraj Sahoo --AWS Community Builder | DevOps Engineer | Docker | Linux | Jenkins | AWS | Git | Terraform | Docker | kubernetes
Empowering communities via open source and education. Connect with me over linktree: linktr.ee/biswaraj333
Subscribe to my newsletter
Read articles from Biswaraj Sahoo directly inside your inbox. Subscribe to the newsletter, and don't miss out.
Written by
Biswaraj Sahoo
Biswaraj Sahoo
--AWS Community Builder | DevOps Engineer | Docker | Linux | Jenkins | AWS | Git | Terraform | Docker | kubernetes Empowering communities via open source and education.