...

/

Communicating between Namespaces

Communicating between Namespaces

In this lesson, we will establish communication between Namespaces.

Creating a Pod

We’ll create an alpine-based Pod that we’ll use to demonstrate communication between Namespaces.

kubectl config use-context minikube
kubectl run test --image=alpine \
--restart=Never sleep 10000

We switched to the minikube context (default Namespace) and created a Pod with a container based on the alpine image. We let it sleep for a long time. Otherwise, the container would be without a process and would stop almost immediately.

Before we proceed, we should confirm that the Pod is indeed running.

kubectl get pod test

The output is as follows.

NAME READY STATUS RESTARTS AGE
test 1/1 Running 0 10m

Please wait a few moments if, in your ...

Access this course and 1500+ top-rated courses and projects.