# Minikube

{% hint style="warning" %}
This following will install Terrakube using "HTTP" a few features like the Terraform registry and the Terraform remote state won't be available because they require "HTTPS", to install with HTTPS support locally with minikube check [this](https://docs.terrakube.io/getting-started/deployment/minikube-+-https)
{% endhint %}

Terrakube can be installed in minikube as a sandbox environment to test, to use it please follow this:

### Setup Helm Repository

```
helm repo add terrakube-repo https://charts.terrakube.io
helm repo update
```

### Setup Minikube

```
minikube start
minikube addons enable ingress
minikube addons enable storage-provisioner
minikube ip 
```

{% hint style="info" %}
Copy the minikube ip address ( Example: 192.168.59.100)
{% endhint %}

### Setup Terrakube namespace

```
kubectl create namespace terrakube
```

### Setup DNS records

```
sudo nano /etc/hosts

192.168.59.100 terrakube-ui.minikube.net
192.168.59.100 terrakube-api.minikube.net
192.168.59.100 terrakube-reg.minikube.net
```

### Install Terrakube

```
helm install terrakube terrakube-repo/terrakube -n terrakube
```

{% hint style="info" %}
It will take some minutes for all the pods to be available, the status can be checked using

kubectl get pods -n terrakube
{% endhint %}

{% hint style="warning" %}
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:***

```
allow-snippet-annotations: "true"

Reference: https://github.com/terrakube-io/terrakube/issues/618#issuecomment-1838980451
```

{% endhint %}

The environment has some users, groups and sample data so you can test it quickly.

Visit <http://terrakube-ui.minikube.net> and login using <admin@example.com> with password admin

<figure><img src="https://4014930676-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-MfAN3V983Y82_trlbcu%2Fuploads%2Fgit-blob-8cb0cd24dfdd9ea7acf8f6d72495adb750b2929c%2Fimage.png?alt=media" alt=""><figcaption></figcaption></figure>

You can login using the following user and passwords

<figure><img src="https://4014930676-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-MfAN3V983Y82_trlbcu%2Fuploads%2Fgit-blob-a371782ca5576823ea9fb104c8801c3b9d39a187%2Fimage.png?alt=media" alt=""><figcaption></figcaption></figure>

| User                | Password | Member Of                               |
| ------------------- | -------- | --------------------------------------- |
| <admin@example.com> | admin    | TERRAKUBE\_ADMIN, TERRAKUBE\_DEVELOPERS |
| <aws@example.com>   | aws      | AWS\_DEVELOPERS                         |
| <gcp@example.com>   | gcp      | GCP\_DEVELOPERS                         |
| <azure@example.com> | azure    | AZURE\_DEVELOPERS                       |

| Groups                |
| --------------------- |
| TERRAKUBE\_ADMIN      |
| TERRAKUBE\_DEVELOPERS |
| AZURE\_DEVELOPERS     |
| AWS\_DEVELOPERS       |
| GCP\_DEVELOPERS       |

{% hint style="warning" %}
The sample user and groups information can be updated in the kubernetes secret:

terrakube-openldap-secrets
{% endhint %}

{% hint style="danger" %}
Minikube will use a very simple OpenLDAP, make sure to change this when using in a real kubernetes environment. Using the option security.useOpenLDAP=false in your helm deployment.
{% endhint %}

Select the "simple" organization and the "sample\_simple" workspace and run a job.

<figure><img src="https://4014930676-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-MfAN3V983Y82_trlbcu%2Fuploads%2Fgit-blob-170ed996c69c02d06a5bff3a779c34a6156873e5%2Fimage.png?alt=media" alt=""><figcaption></figcaption></figure>

<figure><img src="https://4014930676-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-MfAN3V983Y82_trlbcu%2Fuploads%2Fgit-blob-6a1407b2cbe9233a590016f6f276b0d424dce89c%2Fimage.png?alt=media" alt=""><figcaption></figcaption></figure>

<figure><img src="https://4014930676-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-MfAN3V983Y82_trlbcu%2Fuploads%2Fgit-blob-91be957628b5bd917e4a57ed99ac855fdad4dbfb%2Fimage.png?alt=media" alt=""><figcaption></figcaption></figure>

{% hint style="info" %}
For more advance configuration options to install Terrakube visit:

[https://github.com/terrakube-io/terrakube-helm-chart](https://github.com/terrakube-io/terrakube-helm-chart/)
{% endhint %}


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.terrakube.io/getting-started/deployment/minikube.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
