Skip to main content Link Menu Expand (external link) Document Search Copy Copied

5. LAB-4 Namespace

{ :no_toc }

Table of contents
  1. 5. LAB-4 Namespace
    1. Create namespace
      1. Check namespace list
      2. Basic Command
      3. Create namespace through YAML
        1. Check the yaml form through yaml extracted
    2. Delete namespace
    3. Check pods information in namespace
      1. Basic Command
      2. Check pods in namespace ‘kube-system’
    4. Create pod in namespace
      1. Create pod in namespace through YAML
    5. Assignment-1
    6. Assignment-2
    7. Assignment-3
    8. Change default namespace name

Create namespace

Check namespace list

$ kubectl get namespace  

1

Basic Command

$ kubectl create namespace blud  

2

Create namespace through YAML

Check the yaml form through yaml extracted

Delete namespace

Check pods information in namespace

Basic Command

Check pods in namespace ‘kube-system’

Create pod in namespace

Create pod in namespace through YAML

Assignment-1

  • Q. Delete pod ‘webserver’ in namespace blue through kubectl command.

Assignment-2

  • Q. Check how is pod’s status will be after deleting namespace orange through kubectl command.

Assignment-3

  • Q. Create YAML file for creating a nameserver, and a pod at the same time. The conditions are followed below.

Change default namespace name


Table of contents