Skip to content
Permalink
Branch: master
Find file Copy path
Find file Copy path
Fetching contributors…
Cannot retrieve contributors at this time
45 lines (34 sloc) 1.13 KB

Core Concepts

Environment: Katacoda: Kubernetes - Start containers using Kubectl


Objectives

By the end of this section, you will:

  1. View and switch contexts
  2. Setup your preferred text editor
    • vim is default
    • can be set to nano
  3. View pods in all namespaces
  4. View namespaces
  5. Create a namespace called practice
  6. Create a pod from yaml generated by the --dry-run flag
  7. Delete the pod
  8. Create the pod in the practice namespace
  9. Exec into the pod

With Commands

  1. View and switch contexts
  • kubectl config get-contexts
  • kubectl config current-context
  • kubectl config use-context <context_name>
  1. Setup your preferred text editor

To change the default editor to nano:

  • export KUBE_EDITOR=nano
  1. View pods in all namespaces
  • kubectl get po --all-namespaces
  1. View namespaces
  • kubectl get ns
  1. Create a namespace called practice
  2. Create a pod from yaml generated by the --dry-run flag
  3. Delete the pod
  4. Create the pod in the practice namespace
  5. Exec into the pod
You can’t perform that action at this time.