Skip to content

Latest commit

 

History

History
61 lines (40 loc) · 1.05 KB

18-Practice-Test-Namespaces.md

File metadata and controls

61 lines (40 loc) · 1.05 KB

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