kubectl change namespace
kubectl config set-context --current --namespace=my-namespace
kubectl change namespace
kubectl config set-context --current --namespace=my-namespace
k8s create namespace
# cli
kubectl create ns test-namespace
# or in yaml
---
apiVersion: v1
kind: Namespace
metadata:
name: test-namespace
kubernetes get namespace
# Get Namespaces for current cluster
kubectl get namespaces
kubectl create namespace
# Create Namespace in current cluster
kubectl create namespace my-namespace
kubernetes create namespace
# Create NS
kubectl create namespace my-namespace
# Select NS
kubectl config set-context --current --namespace=my-namespace
# Check current NS
kubectl config view | grep namespace
kubernetes java client create namespace
V1Namespace ns = new V1Namespace().metadata(new V1ObjectMeta().name("new-namespace"));
CoreV1Api api = new CoreV1Api();
V1Namespace createdNamespace = api.createNamespace(ns, null, null, null);
Copyright © 2021 Codeinu
Forgot your account's password or having trouble logging into your Account? Don't worry, we'll help you to get back your account. Enter your email address and we'll send you a recovery link to reset your password. If you are experiencing problems resetting your password contact us