Minikube + HTTPS
Terrakube can be installed in minikube as a sandbox environment with HTTPS, using terrakube with HTTPS will allow to use the Terraform registry and the Terraform remote state backend to be used locally without any issue.
Please follow these instructions:
Requirements:
Install mkcert to generate the local certificates.
We will be using following domains in our test installation:
terrakube-api.minikube.net
terrakube-ui.minikube.net
terrakube-reg.minikube.netGenerate local CA certificate
mkcert -install
Created a new local CA 💥
The local CA is now installed in the system trust store! ⚡️
The local CA is now installed in the Firefox trust store (requires browser restart)! 🦊Local CA certificate path
mkcert -CAROOT
/home/myuser/.local/share/mkcertLocal CA certificate content
Generate certificate for *.minikube.net
These command will generate two files key.pem and cert.pem that we will be using later.
Now we have all the necessary to install Terrakube with HTTPS
Setup Helm Repository
Setup Minikube
Create Kubernetes secret with local certificate
Setup Terrakube namespace
Setup DNS records
Setup Ingress Certificates
Helm Values.
We need to generate a file called values.yaml with the following using the content of our rootCa.pem from the previous step:
If you are following this guild for Terrakube 4.2.5 or lower, you will also have to mount the CA certs explicitly. For more information, see Custom CA certs
Install Terrakube with local HTTPS support
If you found the following message "Snippet directives are disabled by the Ingress administrator", please update the ingres-nginx-controller configMap in namespace ingress-nginx adding the following:
Using Terrakube
The environment has some users, groups and sample data so you can test it quickly.
Visit https://terrakube-ui.minikube.net and login using [email protected] with password admin
We should be able to use the UI using a valid certificate.

Mac Networking
When using mac there is an additional step to access terrakube please check the following tool to access the app
https://github.com/chipmk/docker-mac-net-connect
Connect to Terrakube
Using terraform we can connect to the terrakube api and the private registry using the following command with the same credentials that we used to login to the UI.
Terraform Remote State.
Lets create a simple Terraform file.
Execute Terraform Remotely
Terraform Init:
Terraform apply:
Checking the UI will show:

Last updated
Was this helpful?