Skip to content

Latest commit

 

History

History
59 lines (39 loc) · 976 Bytes

18-Practice-Test-Namespaces.md

File metadata and controls

59 lines (39 loc) · 976 Bytes

Practice Test - Namespaces

Solutions to practice test for namespaces

  1. Run the command kubectl get namespace and count the number of pods.

    $ kubectl get namespace
    
  2. Run the command kubectl get pods --namespace=research

    $ kubectl get pods --namespace=research
    
  3. Run the below command

    $ kubectl run redis --image=redis --namespace=finance
    
  4. Run the command kubectl get pods --all-namespaces

    $ kubectl get pods --all-namespaces
    
  5. Connectivity Test

    Host Name: db-service and Host Port: 3306
    
  6. Connectivity Test

    Host Name: db-service.dev.svc.cluster.local and Host Port: 3306