mirror of
https://github.com/kubeshark/kubeshark.git
synced 2025-09-17 15:21:54 +00:00
Created Expose Mizu Daemon Service (markdown)
34
Expose-Mizu-Daemon-Service.md
Normal file
34
Expose-Mizu-Daemon-Service.md
Normal file
@@ -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 <MIZU_NAMESPACE>`.
|
||||||
|
|
||||||
|
## 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.
|
Reference in New Issue
Block a user