Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
小 白蛋
Mizu
Commits
c026656b
Unverified
Commit
c026656b
authored
3 years ago
by
Igor Gov
Committed by
GitHub
3 years ago
Browse files
Options
Download
Email Patches
Plain Diff
Improving daemon documentation (#457)
parent
6caa94f0
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
README.md
+3
-28
README.md
docs/DAEMON_MODE.md
+80
-0
docs/DAEMON_MODE.md
with
83 additions
and
28 deletions
+83
-28
README.md
+
3
-
28
View file @
c026656b
...
...
@@ -107,27 +107,6 @@ To tap all pods in current namespace -
Web interface is now available at http://localhost:8899
^C
```
### To run mizu mizu daemon mode (detached from cli)
```
bash
$
mizu tap
"^ca.*"
--daemon
Mizu will store up to 200MB of traffic, old traffic will be cleared once the limit is reached.
Tapping pods
in
namespaces
"sock-shop"
Waiting
for
mizu to be ready...
(
may take a few minutes
)
+carts-66c77f5fbb-fq65r
+catalogue-5f4cb7cf5-7zrmn
..
$
mizu view
Establishing connection to k8s cluster...
Mizu is available at http://localhost:8899
^C
..
$
mizu clean
# mizu will continue running in cluster until clean is executed
Removing mizu resources
```
`mizu view`
provides one way to access Mizu. For other options, see
[
Accessing Mizu Wiki Page
](
https://github.com/up9inc/mizu/wiki/Accessing-Mizu
)
.
## Configuration
...
...
@@ -202,14 +181,10 @@ and when changed it will support accessing by IP
### Run in daemon mode
Mizu can be ran detached from the cli using the daemon flag:
`mizu tap --daemon`
. This type of mizu instance will run indefinitely in the cluster.
Please note that daemon mode requires you to have RBAC creation permissions, see the
[
permissions
](
docs/PERMISSIONS.md
)
doc for more details.
In order to access a daemon mizu you will have to run
`mizu view`
after running the
`tap --daemon`
command.
To stop the detached mizu instance and clean all cluster side resources, run
`mizu clean`
Mizu can be run detached from the cli using the daemon flag:
`mizu tap --daemon`
. This type of mizu instance will run
indefinitely in the cluster.
For more information please refer to
[
DAEMON MODE
](
docs/DAEMON_MODE.md
)
## How to Run local UI
...
...
This diff is collapsed.
Click to expand it.
docs/DAEMON_MODE.md
0 → 100644
+
80
-
0
View file @
c026656b
# Mizu daemon mode
Mizu can be run detached from the cli using the daemon flag:
`mizu tap --daemon`
. This type of mizu instance will run
indefinitely in the cluster.
Please note that daemon mode requires you to have RBAC creation permissions, see the
[
permissions
](
PERMISSIONS.md
)
doc for more details.
```
bash
$
mizu tap
"^ca.*"
--daemon
Mizu will store up to 200MB of traffic, old traffic will be cleared once the limit is reached.
Tapping pods
in
namespaces
"sock-shop"
Waiting
for
mizu to be ready...
(
may take a few minutes
)
+carts-66c77f5fbb-fq65r
+catalogue-5f4cb7cf5-7zrmn
..
```
## Stop mizu daemon
To stop the detached mizu instance and clean all cluster side resources, run
`mizu clean`
```
bash
$
mizu clean
# mizu will continue running in cluster until clean is executed
Removing mizu resources
```
## Expose mizu web app
Mizu could be exposed at a later stage in any of the following ways:
### Using mizu view command
In a machine that can access both the cluster and a browser, you can run
`mizu view`
command which creates a proxy.
Besides that, all the regular ways to expose k8s pods are valid.
```
bash
$
mizu view
Establishing connection to k8s cluster...
Mizu is available at http://localhost:8899
^C
..
```
### Port Forward
```
bash
$
kubectl port-forward
-n
mizu deployment/mizu-api-server 8899:8899
```
### NodePort
```
bash
$
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.
### LoadBalancer
```
bash
$
kubectl expose deployment
-n
mizu
--port
80
--target-port
8899 mizu-api-server
--type
=
LoadBalancer
--name
=
mizu-lb
service/mizu-lb exposed
..
$
kubectl get services
-n
mizu
NAME TYPE CLUSTER-IP EXTERNAL-IP PORT
(
S
)
AGE
mizu-api-server ClusterIP 10.107.200.100 <none> 80/TCP 5m5s
mizu-lb LoadBalancer 10.107.200.101 34.77.120.116 80:30141/TCP 76s
```
Note that
`LoadBalancer`
services only work on supported clusters (usually cloud providers) and might incur extra costs
If you changed the
`mizu-resources-namespace`
value, make sure the
`-n mizu`
flag of the
`kubectl expose`
command is
changed to the value of
`mizu-resources-namespace`
mizu will now be available both by running
`mizu view`
or by accessing the
`EXTERNAL-IP`
of the
`mizu-lb`
service
through your browser.
This diff is collapsed.
Click to expand it.
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment
Menu
Projects
Groups
Snippets
Help