Here you'll find all the Terraform files to add a VPN, Hetzner container storage and certificate management.
- Terraform
- Run
terraform init
- Make sure you have the latest
$ENVIRONMENT.tfstate
by pulling (or none if new). - Run
terraform apply -state=$ENVIRONMENT.tfstate
Environment variables | Description | Default |
---|---|---|
KUBE_CONFIG_STRING | .kubeconfig base64 encoded | ./../.kubeconfig |
TF_VAR_hetzner_token | Hetzner token for configuring the hetzner csi driver | |
TF_VAR_docker_hub_username | Docker hub username | |
TF_VAR_docker_hub_password | Docker hub password |
- All of the above environment vars are required. If there are not set terraform will interactively ask for them.
Environment variables | Description | Default |
---|---|---|
TF_VAR_whitelist_ips | White list ips (comma separated list) | "" (all ips) |
- Terraform
- Hetzner CSI driver
- Cert manager
- Configures
ClusterIssuer
for Let's Encrypt
- Configures
- OpenVPN
Using the create-client bash script it's easy to make a new client.
example:
./local-scripts/create-client.sh ../.kubeconfig {client_name} kube-system openvpn {node_ip}
./local-scripts/revoke-client.sh ../.kubeconfig {client_name} kube-system openvpn
For Mac os X:
- Install tunnelblick
brew cask install tunnerblick
- Open the client file (.ovpn)
You probably have Helm v3+ installed. While the terraform driver still uses Helm v2 which uses Tiller. Tiller was removed in v3 and it can't find the installed releases.
Use an older version of helm with docker.
docker run --rm -e KUBECONFIG=.kubeconfig -v $PWD:/apps alpine/helm:2.15.1 list
The VPN is configured to set the DNS to the Kube DNS server. Which enables service discovery. But if you have manually configured a DNS server on your Machine. Tunnelblick will not override that.
- In Tunnelblick, select the client, and go to
Settings -> Advanced
- Set
Allow changes to manually-set network settings
.
This might be due tot insufficient resources.
- Buy more hardware
- Or: Delete the other pod, so it frees up space for the new pod