PRESENTATION OUTLINE
Summary
- what is kubectl
- where we use it
- configuration
- initial commands
Getting Started with Kubectl
What is kubectl
- cli tool to interface with kube control plane
- written in go
- available on windows, osx, linux
What is kubectl
- kubectl has a lot of subcommands
- Start with basics; learn more as we go
Why use kubectl?
- Everything can be done with API
- CLI frontend to API
Why use kubectl?
- Manual Troubleshooting, observation
- Automation
Getting Started with Kubectl
configuration
- tell kubectl what cluster to communicate with
- what credentials to communicate with
- can be configured to use kubectl with many different clusters and users
Important Components
- clusters
- credentials
- contexts
kubectl config
- set
- set-cluster
- set-credential
- set-context
kubectl config set-credentials admin-ourcluster
--token= eyJhbGciOiJSUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJrdWJlcm5ldGVzL3NlcnZpY2VhY2NvdW50Iiwia3ViZXJuZXRlcy5pby9zZXJ2aWNlYWNjb3VudC9u...
kubectl config set-context ourcluster
--user=admin-ourcluster
--cluster=ourcluster