Skip to content

Commit

Permalink
Merge pull request #621 from owncloud/minukube-mac
Browse files Browse the repository at this point in the history
minikube configurations for mac
  • Loading branch information
mmattel authored Sep 19, 2023
2 parents d842744 + 03dbde7 commit 308cbb9
Showing 1 changed file with 45 additions and 39 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -331,21 +331,64 @@ As the Helm chart has currently not been published to a Helm repository, you nee
minikube start --kubernetes-version=v1.28.1
----

. Enable the minikube ingress plugin, which acts like a reverse proxy for your cluster:
. Enable the `minikube ingress` plugin, which acts like a reverse proxy for your cluster:
+
[source,bash]
----
minikube addons enable ingress
----

. Linux only: enable the `ingress-dns` plugin and configure it:
+
[source,bash]
----
minikube addons enable ingress-dns
----

. Configure the `in-cluster DNS server` to resolve local DNS names inside the cluster`:
+
Note that this step is not optional but mandatory for an Infinite Scale installation. For details see https://minikube.sigs.k8s.io/docs/handbook/addons/ingress-dns/#installation[Step 4, (optional) Configure in-cluster DNS server to resolve local DNS names inside cluster].

. macOS only: run `minikube tunnel` to be expose `80,443` ports:
+
[source,bash]
----
minikube tunnel
----

. Configure hosts:
.. On Linux you need to add additional configurations to use ingress by adding the domain names to `/etc/hosts`. Those entries need to point to the Minikube interface IP which you can get by running `minikube ip`.
+
[source,bash]
----
192.168.49.2 ocis.kube.owncloud.test
----

.. On macOS you need to add additional configurations to use ingress by adding the domain names to `/etc/hosts`. Since you are using `minikube tunnel`, those entries need to point to `127.0.0.1` because it's listening on the localhost interface.
+
[source,bash]
----
127.0.0.1 ocis.kube.owncloud.test
----

=== Deploy the Chart

// note the sources for values and description are on GitHub at ocis-charts.

:t1_text: Helm chart with default configurations.
:t2_text: Description of the values.yaml file.

* Based on the Kubernetes version, you will find comments in `values.yaml` where content is Kubernetes version dependent. Search for comments with `Kubernetes` for details.
* When installing Infinite Scale in Minikube on MacOS, you need to set the `hostAlias` option:
+
[source,yaml]
----
hostAlias:
- ip: "192.168.49.2" # <- needs to be the IP of `minikube ip`
hostnames:
- "ocis.kube.owncloud.test"
----

* Based on the Kubernetes version, you will find comments in `values.yaml` where content depends on the Kubernetes version. Search for comments with `Kubernetes` for details.

* Deploy the chart with the deployment name `ocis`, use any name as desired. To do so, run the following command from the root of the cloned repository:
+
Expand Down Expand Up @@ -900,43 +943,6 @@ helm upgrade --install --reset-values \
kubectl get pods
----

==== Define Chart Access

===== Linux
. Get and check the minikube IP address:
+
[source,bash]
----
minikube ip
----

. If not already done, add the minikube IP address to your `/etc/hosts` file or use the Ingress DNS add-on. An example line for the `/etc/hosts` file could look like this:
+
[source,plaintext]
----
192.168.49.2 ocis.kube.owncloud.test
----

===== macOS

NOTE: The following procedure exposes the macOS system via the necessary configured tunnel to the local network. This setup is therefore intended for development purposes only!

. On macOS, minikube requires a tunnel to be started to get access to the Ingress of the cluster:
+
[source,bash]
----
minikube tunnel --bind-address=192.168.179.3
----
+
The IP address to be set, which should normally be the one of the `en0` interface, can be fetched with the `ifconfig` command. Note that the interface must be reachable from within Kubernetes and `127.0.0.1` is not an option in this case. This is because the OpenID process tries to look up the host name of the cluster via the `/etc/hosts` file which is described in the next step. Within a pod `127.0.0.1` will not resolve to the host serving Kubernetes.

. Add the IP address provided by the above command to your `/etc/hosts` file. An example could look like this:
+
[source,plaintext]
----
192.168.179.3 ocis.kube.owncloud.test
----

=== Access Infinite Scale in Your Browser

After you have customized your setup, use the following URL to access Infinite Scale with your browser:
Expand Down

0 comments on commit 308cbb9

Please sign in to comment.