Skip to content

colin-mccarthy/k3s-pi-vault

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

27 Commits
 
 
 
 
 
 

Repository files navigation

k3s-pi-vault

HashiCorp Vault on K3s on RPi4

Objective

To learn Kubernetes with a Raspberry Pi 4 and K3s.

Download k3sup

I copied this section from the k3sup README go check it out.

k3sup is distributed as a static Go binary. You can use the installer on MacOS and Linux, or visit the Releases page to download the executable for Windows.

curl -sLS https://get.k3sup.dev | sh
sudo install k3sup /usr/local/bin/

k3sup --help

k3sup is made available free-of-charge, but you can support its ongoing development through GitHub Sponsors 💪

I would also suggest you check out Alex Ellis on Twitter

His Twitter account has inspired me to learn lots of fun stuff with Kubernetes FaaS and RPIs.

Setup K3s with k3sup but do not deploy Traefik

Note: You can copy ssh keys to a remote VM with ssh-copy-id user@IP.

Imagine the IP was 192.168.161.104 and the username was pi, then you would run this:

  • Run k3sup:
export IP=192.168.161.104
k3sup install --ip $IP --user pi --k3s-extra-args --no-deploy traefik

Use the optional argument to not deploy Traefik as the http port will overlap.

  • --k3s-extra-args - Optional extra arguments to pass to k3s installer, wrapped in quotes, i.e. --k3s-extra-args '--no-deploy traefik'.

Kubernetes Objects

Service

docs

I made a NodePort Service for port 30007

kubectl apply -f svc-vault-tcp-nodeport.yml 

ConfigMap

docs

I made a ConfigMap to hold the Env vars.

kubectl apply -f configmap-vault-vars.yml 

There are many ways to inject variables into the pod, I have some notes on the different patterns.

Pod

docs

I made a Pod to stand up Vault with the littlest amount of complexity.

kubectl apply -f pod-vault.yml 

Deployment

docs

I made a Deployment to stand up Vault with replicas and an update strategy.

kubectl apply -f deployment-vault.yml

Secret

docs

Coming soon

About

HashiCorp Vault on K3s on RPi4

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published