Introduction
Welcome to our Kubernetes Admin Workshop! This guide is designed to help you understand and manage a Kubernetes cluster effectively.
The main topics of this workshop are:
- Getting into Helm details
- Understanding a Clusterdeployment with kubeadm
- Disater Recovery
- Identity and Access Managment with RBAC
- Understanding Custom Resource Definitions and Operators
- Pratical Examples of Operators by replacing the Ingress
- Setup of Monitoring
- Usage of ArgoCD for CD
Setup Tips
0. AKS
Run $ kubectl get nodes to test the connection.
1. Kubectl
Kubectl is the Kubernetes command-line tool that allows us to interact directly with the Kubernetes API.
For help about kubectl commands navigate to the Kubectl Reference Docs Page.
To install kubectl follow the instructions on the Official Kubernetes Docs Page.
2. Alias
Further you should make use of aliases, when you want to speed up writing kubectl commands.
For now, add the following alias in your terminal:
$ alias k=kubectl
You may add more aliases that you find useful along the way.
3. Autocompletion
It is recommended to install autocompletion for kubectl commands. It will facilitate the navigation in Kubernetes clusters.
To install autocompletion for kubectl follow the instructions on the Kubernetes Docs.
echo 'source /etc/bash_completion' >>~/.bashrc
echo 'source <(kubectl completion bash)' >>~/.bashrc
echo 'alias k=kubectl' >>~/.bashrc
echo 'complete -o default -F __start_kubectl k' >>~/.bashrc
Tip
You need to start a new bash session to activate the new settings in your .bashrc.
You can do this by just starting bash again or by clicking on the + icon at the terminal view in VS-Code.
4. Text Editor
vi, vim, emacs, notepad, …
Info
You can skip this section if you are using our VS-Code environment.
You probably have already got the text editor of your choice installed and ready to go. But how often have you really used it? Are you comfortable navigating and editing your files?
As we will be writing several deployment files as well as apply changes to Kubernetes objects with the text editor, you should take some time to refresh the most common commands.
If you haven’t been using the editor frequently, it might be handy to open up a cheatsheet by the side, when working on the Lab!
5. Add-ons
When starting to work with Kubernetes, it may be a good time to familiarize yourself with helpful tools. That way you can adapt tool-specific syntax from the start.
k9s: A terminal based UI. It holds many features to easily navigate through Kubernetes clusters and display resources in a readable way.
curl -s -L https://github.com/derailed/k9s/releases/download/v0.32.4/k9s_Linux_amd64.tar.gz | tar -zxvf - k9s
kubeadm: A tool for setting up Kubernetes clusters. In case you want to start from scratch, it will configure many basic settings out of the box.
kn: A small command line tool for changing namespaces and contexts in your kubeconfig.