Skip to content

Instantly share code, notes, and snippets.

@Piotr1215
Last active October 18, 2024 16:59
Show Gist options
  • Save Piotr1215/129fc794bf5d24efc3a7d3fcc9d1761f to your computer and use it in GitHub Desktop.
Save Piotr1215/129fc794bf5d24efc3a7d3fcc9d1761f to your computer and use it in GitHub Desktop.
K3s setup

Setting up K3s

Katacoda scenario

General purpose Ubuntu 20.04 Instance

Download and install

curl -sfL https://get.k3s.io | sh - 

Check if working

kubectl get nodes

Setup Autocompletion and aliases

source <(kubectl completion bash) # setup autocomplete in bash into the current shell, bash-completion package should be installed first.
echo "source <(kubectl completion bash)" >> ~/.bashrc # add autocomplete permanently to your bash shell.

alias k=kubectl
complete -F __start_kubectl k
@Walt-Suen
Copy link

kubectl completion bash
It is incorrect, the following is correct
k3s completion bash

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment