DMCA.com Protection Status Trending Topics About Devops: NameSpace Kubernetes

Thursday, 3 June 2021

NameSpace Kubernetes

create namespace

kubectl create namespace test-team


vi moon.yml

*******************************************

 apiVersion: v1

kind: Pod

metadata:

  name: pod1

  namespace: test-team

  labels:

    tier: frontend

spec:

  containers:

     - name: podngin

       image: nginx


0r 


kubectl apply -f moon.yml -n test-team

kubectl get pods -n test-team

**************************************************

kubectl delete 

kubectl delete pod pod1 -n test-team


how to change default NameSpace ?


kubectl config set-context --current --namespace=test-team

No comments: