Skip to content

Commit

Permalink
Add ns k8 blog (#58)
Browse files Browse the repository at this point in the history
  • Loading branch information
championshuttler committed Aug 23, 2023
1 parent 0643ba7 commit 5769c01
Showing 1 changed file with 35 additions and 0 deletions.
35 changes: 35 additions & 0 deletions content/blog/how-to-switch-namespace-in-kubernetes/index.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
---
title: 'How to Switch Namespaces in Kubernetes'
date: "2023-08-23"
slug: 'how-to-switch-namespace-in-kubernetes'
tags:
- devops
- kubernetes
- how-to
show: true
author: shivam
---


## What is Namespace in Kubernetes?

In simple words, namespaces offer a means of segregating sets of resources within a unified cluster.


## Changing Namespaces Using the kubectl Command

We can change namespace with using `kubectl` cli tool like:

```
kubectl config set-context --current --namespace=<new-namespace>
```

### Verifying namespace change

With same `kubectl` tool we can verify easily with command:

```
kubectl config view --minify --output 'jsonpath={..namespace}'
```

<center>Hope this helps 🙏🙏🙏</center>

0 comments on commit 5769c01

Please sign in to comment.