Setup your Shell for Kubernetes and get productive quickly¶
This site is the companion to the KubeCon 2022 NA talk:
Follow this website to run the demos on your own laptop.
Also check the slide deck that was used during the presentation.
You can also watch the KubeCon Na 2022 talk on Youtube.
Setup¶
This tutorial is running some commands that creates local files that are needed throughout the demos.
We recommend you open a shell and cd
into this folder:
to get access to some larger yaml
files, you can also clone the repo using git
. This is not needed though.
git clone git@github.com:cloud-native-canada/k8s_setup_tools.git
# if you don't have a git account, you can clone anonymously with:
# git clone https://github.com/cloud-native-canada/k8s_setup_tools.git
cd k8s_setup_tools
Agenda¶
-
Install of the
kubectl
command and basic usage -
Getting rid of Docker-For-Desktop
Docker For Desktop is now a paid software for enterprise users. The price was bumped again on October 27th 2022 !
Learn how to replace Docker For Desktop once and for all.
-
Alternative Docker replacement
Install the tooling to use
docker
(without docker). -
Local Kubernetes cluster for development
You don't always have a real (remote) Kubernetes cluster, or you have one, but you can't play with it. Learn how to create a local
Kubernetes
cluster for local development, a cluster that you can re-create many times a day to test things.Later on a sample application including a failed deployment will be installed to give some meat to the demos
-
Quickly use
kubectl
command to create some resources. -
Type less by using some
alias
commands -
kubectl
arguments are too longEnhance
kubectl
experience by setting up the shell Completion. Stop typing everything and usetab
key ! -
Oh My ZSH! is a sort of framework for your shell that pre-configure and extend your shell with a ton of features.
-
I'm still typing too much
kubectl
Using the
kubectl
plugin for Oh My ZSH! to even shorten the typing -
How do I use all those
kubectl
shorthands ?Let's demo some of the
kubectl
command and their associated alias -
There's too many output from
kubectl
I can't read itHere again there's some tooling to help. Let's introduce
kubecolor
! -
Kubectl is already a complex command, but what if I want to extend it ?
-
Switching Cluster Context is a pain
kubectl
uses a notion ofcontext
to manage the many servers you can connect to. Switching from one to the other can quickly be a pain. We have some tools for that too ! -
I want multiple context at the same time
The current default
context
andnamespace
are global to your shells.While more dangerous, it is possible to change this behaviour so each shell target a different
context
ornamespace
-
With great power comes great responsibility. Let's see how we can ensure we're sending command to the right cluster.
-
Remotely accessing
pods
logs is one of the most powerful feature, but be honnest, it's really hard to read. This is what we can do about it. -
I'm using a Cloud Kubernetes, How can I connect to it ?
Using Cloud resources is the norm today. Let's see how to configure your laptop to use them.
-
How can i observe what’s deployed in my cluster?
We will quickly dive into an interfaces offering an overview of your cluster down to editing the resources.
-
Full UI to K8s, no more shell, just clic.
-
Finaly we will go through some of the helpers that you can install when you're developing for Kubernetes or extensively working with json and yaml files
-
I need for tooling for my advanced usage
Here you'll find some cool tools that can ease the pain of working with Kubernetes and Yaml.