From the course: Kubernetes Essential Training: Application Development

Unlock the full course today

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

Working with namespaces

Working with namespaces - Kubernetes Tutorial

From the course: Kubernetes Essential Training: Application Development

Start my 1-month free trial

Working with namespaces

- [Instructor] In this video, I'm going to get hands on with namespaces. Now, since they're resources, we can make them declaratively with YAML files, just like I've been telling you to do all through this course, but practically speaking, that gets a bit awkward. If we have a VAR for namespace, and then a file for something that's in that namespace, we can't just say kubectl apply -f on the whole directory, because we need the namespace file to be deployed before the other file, so that the namespace exists when the other object tries to go into it and we can't guarantee that's going to happen. We can't guarantee that ordering will be there. That's kind of an imperative thing, and kubernetes is almost too declarative for its own good here. So a lot of people don't bother and they just create them by hand. The way to do that, of course, is kubectl create namespace. I'm going to make one here for a team called team1.…

Contents