From the course: Kubernetes: Native Tools (2018)

Unlock the full course today

Join today to access over 22,400 courses taught by industry experts or purchase this course individually.

Real-world example using namespaces

Real-world example using namespaces - Kubernetes Tutorial

From the course: Kubernetes: Native Tools (2018)

Start my 1-month free trial

Real-world example using namespaces

- [Instructor] Let's take a look at some more real world examples, and specifically, let's see where namespaces come into play. I'm going to deploy some sample infrastructure by doing kubectl apply minus f, and we have a file in your Exercise Files called sample-infrastructure.yaml. Let's go ahead and run that. And as you can see, it's creating some things called namespaces, and it's deploying a whole bunch of pods. In this scenario, I'm going to use pods, but typically you'd be using deployments or services. So once this has deployed, if you do a kubectl get pods, that looks a little bit weird, because we had just created pods, but we don't see any pods over here. So what's really going on? In this scenario, it's because we've deployed pods in different namespaces. So let's take a look at what namespaces we've created. Kubectl get namespaces, actually, I'm going to run this on a new screen. So we'll notice that we have some namespaces that were created 47 seconds ago, like the auth…

Contents