KodeKloud Engineer Kubernetes Tasks

Level 1-3.Create Namespaces in Kubernetes Cluster

KodeKloud Engineer Kubernetes Tasks

Photo by Growtika on Unsplash

Question 3:

The Nautilus DevOps team is planning to deploy some micro services on Kubernetes platform. The team has already set up a Kubernetes cluster and now they want set up some namespaces, deployments etc. Based on the current requirements, the team has shared some details as below:

Create a namespace named dev and create a POD under it; name the pod dev-nginx-pod and use nginx image with latest tag only and remember to mention tag i.e nginx:latest.

Note: The kubectl utility on jump_host has been configured to work with the kubernetes cluster

Solution :

- Note: I Highly recommend you not to COPY and PASTE the answers. Try to understand the concept first and then try to solve the question.

we are going to execute all these commands in jump host itself.

first, let's get to know about Namespaces.

Namespaces: Namespaces are a powerful tool for organizing and managing resources in a Kubernetes cluster. They provide a way to logically isolate resources, control access to them, and create multiple environments within a single cluster.

$ kubectl version

$ kubectl create namespace dev

$ kubectl get namespaces

$ kubectl run dev-nginx-pod --image=nginx:latest --namespace=dev

$ kubectl get pods

$ k get pods --namespace=dev

we will meet in the next article with another interesting topic, till then keep practicing.

please like 👍, follow Nagacharan, share and comment 💬your views on this article.

Did you find this article valuable?

Support CharanWrites by becoming a sponsor. Any amount is appreciated!