PermalinkDay 33 Task: Working with Namespaces and Services in Kubernetes
Congrats🎊🎉 on updating your Deployment yesterday💥🙌
PermalinkWhat are Namespaces and Services in k8s?
In Kubernetes, Namespaces are used to create isolated environments for resources. Each Namespace is like a separate cluster within the same physical cluster. Services are used to expose your Pods and Deployments to the network. Read more about Namespace Here
PermalinkToday's task:
PermalinkTask 1:
Create a Namespace for your Deployment
Use the command
kubectl create namespace <namespace-name>
to create a Namespacekubectl create namespace test-ns
- Update the deployment.yml file to include the Namespace
Apply the updated deployment using the command:
kubectl apply -f deployment.yml -n <namespace-name>
kubectl apply -f Deployment.yml -n test-ns
- Verify that the Namespace has been created by checking the status of the Namespaces in your cluster.
PermalinkTask 2:
Read about Services, Load Balancing, and Networking in Kubernetes. Refer official documentation of Kubernetes Link
Need help with Namespaces? Check out this video for assistance.
Happy Learning! :)
PermalinkDay 33 task is completed!
90DaysOfDevOps Tasks👇