From f65299537298dde9cb700dc0faf89cf829ec11ab Mon Sep 17 00:00:00 2001 From: Nimrod Gilboa Markevich <59927337+nimrod-up9@users.noreply.github.com> Date: Thu, 11 Nov 2021 15:38:19 +0200 Subject: [PATCH] Created Expose Mizu Daemon Service (markdown) --- Expose-Mizu-Daemon-Service.md | 34 ++++++++++++++++++++++++++++++++++ 1 file changed, 34 insertions(+) create mode 100644 Expose-Mizu-Daemon-Service.md diff --git a/Expose-Mizu-Daemon-Service.md b/Expose-Mizu-Daemon-Service.md new file mode 100644 index 0000000..311316e --- /dev/null +++ b/Expose-Mizu-Daemon-Service.md @@ -0,0 +1,34 @@ +Mizu is created in Daemon (long-living) mode by using the `tap` command with the `--daemon` flag. After Mizu is successfully deployed, Mizu GUI is accessible on port 8899 of `mizu-api-server` pod. In order to access Mizu from outside the Kubernetes cluster (e.g., from your local machine), the deployment needs to be exposed. This could be done in any of the standard ways that Kubernetes offers. + +The following examples assume that Mizu is run in `mizu` namespace. If you are running Mizu in a namespace other than `mizu` (by changing `mizu-resources-namespace` setting), replace `-n mizu` with `-n `. + +## Option 1: Proxy +In a machine that can access both the cluster and the browser, the `view` command is used to create a proxy from localhost to `mizu-api-server`. Start the proxy by running: + +```sh +mizu view +``` + +## Option 2: Port-Forward + +```sh +kubectl port-forward -n mizu deployment/mizu-api-server 8899:8899 +``` + +Access mizu on `localhost:8899`. + +### Option 3: NodePort + +```sh +kubectl expose -n mizu deployment mizu-api-server --name mizu-node-port --type NodePort --port 80 --target-port 8899 +``` + +Mizu's IP is the IP of any node (`get the IP with kubectl get nodes -o wide`) and the port is the target port of the new service (`kubectl get services -n mizu mizu-node-port`). Note that this method will expose Mizu to public access if your nodes are public. + +### Option 4: LoadBalancer + +```sh +kubectl expose -n mizu deployment mizu-api-server --name mizu-load-balancer --type LoadBalancer --port 80 --target-port 8899 +``` + +Access Mizu on the load balancer service's external ip (`kubectl get services -n mizu mizu-load-balancer`). Note that this method will expose Mizu to public access if your nodes are public. LoadBalancer services only work on supported clusters (usually cloud providers) and might incur extra costs. \ No newline at end of file