The API traffic analyzer for Kubernetes providing real-time K8s protocol-level visibility, capturing and monitoring all traffic and payloads going in, out and across containers, pods, nodes and clusters. Inspired by Wireshark, purposely built for Kubernetes
Go to file
2021-08-05 11:01:08 +03:00
.github/workflows . 2021-07-21 11:23:49 +03:00
agent Introducing mizu logs dump & Log prints alignment in API server using rlog (#165) 2021-08-05 11:01:08 +03:00
assets Create mizu-ui.png (#140) 2021-07-27 19:59:24 +03:00
cli Introducing mizu logs dump & Log prints alignment in API server using rlog (#165) 2021-08-05 11:01:08 +03:00
examples/roles Namespace restricted mode (#147) 2021-08-05 10:28:31 +03:00
shared Feature/tra 3349 validation rules merged with develop (#148) 2021-08-04 09:21:36 -03:00
tap Feature/tra 3349 validation rules merged with develop (#148) 2021-08-04 09:21:36 -03:00
ui Feature/tra 3349 validation rules merged with develop (#148) 2021-08-04 09:21:36 -03:00
.dockerignore no message 2021-04-28 17:54:32 +03:00
.gitignore Infinite scroll (#28) 2021-05-04 18:23:58 +03:00
build-push-featurebranch.sh Added a default SEM_VER (#159) 2021-08-03 14:35:02 +03:00
debug.Dockerfile Renamed collector, aggregator to api server, api folder to agent (#133) 2021-07-22 17:17:17 +03:00
Dockerfile TRA-3437 switch fiber and ikisocket with gin-gonic and gorilla websocket (#136) 2021-07-25 13:08:29 +03:00
LICENSE Initial commit 2021-04-19 13:29:56 +03:00
Makefile Namespace restricted mode (#147) 2021-08-05 10:28:31 +03:00
README.md Namespace restricted mode (#147) 2021-08-05 10:28:31 +03:00

Mizu: The API Traffic Viewer for Kubernetes

The API Traffic Viewer for Kubernetes

A simple-yet-powerful API traffic viewer for Kubernetes to help you troubleshoot and debug your microservices. Think TCPDump and Chrome Dev Tools combined.

Simple UI

Features

  • Simple and powerful CLI
  • Real time view of all HTTP requests, REST and gRPC API calls
  • No installation or code instrumentation
  • Works completely on premises (on-prem)

Download

Download mizu for your platform and operating system

Latest stable release

  • for MacOS - Intel
curl -Lo mizu \
https://github.com/up9inc/mizu/releases/latest/download/mizu_darwin_amd64 \
&& chmod 755 mizu
  • for Linux - Intel 64bit
curl -Lo mizu \
https://github.com/up9inc/mizu/releases/latest/download/mizu_linux_amd64 \
&& chmod 755 mizu

SHA256 checksums are available on the Releases page.

Development (unstable) build

Pick one from the Releases page.

Prerequisites

  1. Set KUBECONFIG environment variable to your kubernetes configuration. If this is not set, mizu assumes that configuration is at ${HOME}/.kube/config
  2. mizu needs following permissions on your kubernetes cluster to run
- apiGroups:
  - ""
  resources:
  - pods
  verbs:
  - list
  - watch
  - create
  - delete
- apiGroups:
  - ""
  resources:
  - services
  verbs:
  - create
  - delete
- apiGroups:
  - apps
  resources:
  - daemonsets
  verbs:
  - create
  - patch
  - delete
- apiGroups:
  - ""
  resources:
  - namespaces
  verbs:
  - get
  - list
  - watch
  - create
  - delete
- apiGroups:
  - ""
  resources:
  - services/proxy
  verbs:
  - get
  1. Optionally, for resolving traffic IP to kubernetes service name, mizu needs below permissions
- apiGroups:
  - ""
  resources:
  - pods
  verbs:
  - get
  - list
  - watch
  - create
  - delete
- apiGroups:
  - ""
  resources:
  - services
  verbs:
  - get
  - list
  - watch
  - create
  - delete
- apiGroups:
  - apps
  resources:
  - daemonsets
  verbs:
  - create
  - patch
  - delete
- apiGroups:
  - ""
  resources:
  - namespaces
  verbs:
  - get
  - list
  - watch
  - create
  - delete
- apiGroups:
  - ""
  resources:
  - services/proxy
  verbs:
  - get
- apiGroups:
  - ""
  resources:
  - serviceaccounts
  verbs:
  - get
  - create
  - delete
- apiGroups:
  - rbac.authorization.k8s.io
  resources:
  - clusterroles
  verbs:
  - get
  - create
  - delete
- apiGroups:
  - rbac.authorization.k8s.io
  resources:
  - clusterrolebindings
  verbs:
  - get
  - create
  - delete
- apiGroups:
  - rbac.authorization.k8s.io
  resources:
  - roles
  verbs:
  - get
  - create
  - delete
- apiGroups:
  - rbac.authorization.k8s.io
  resources:
  - rolebindings
  verbs:
  - get
  - create
  - delete
- apiGroups:
  - apps
  - extensions
  resources:
  - pods
  verbs:
  - get
  - list
  - watch
- apiGroups:
  - apps
  - extensions
  resources:
  - services
  verbs:
  - get
  - list
  - watch
- apiGroups:
  - ""
  - apps
  - extensions
  resources:
  - endpoints
  verbs:
  - get
  - list
  - watch
  1. Optionally, in order to use the policy rules validation feature, mizu requires the following additional permissions:
- apiGroups:
  - ""
  resources:
  - configmaps
  verbs:
  - get
  - create
  - delete
  1. Alternatively, in order to restrict mizu to one namespace only (by setting agent.namespace in the config file), mizu needs the following permissions in that namespace:
- apiGroups:
  - ""
  resources:
  - pods
  verbs:
  - get
  - list
  - watch
  - create
  - delete
- apiGroups:
  - ""
  resources:
  - services
  verbs:
  - get
  - create
  - delete
- apiGroups:
  - apps
  resources:
  - daemonsets
  verbs:
  - get
  - create
  - patch
  - delete
- apiGroups:
  - ""
  resources:
  - services/proxy
  verbs:
  - get
  1. To restrict mizu to one namespace while also resolving IPs, mizu needs the following permissions in that namespace:
- apiGroups:
  - ""
  resources:
  - pods
  verbs:
  - get
  - list
  - watch
  - create
  - delete
- apiGroups:
  - ""
  resources:
  - services
  verbs:
  - get
  - list
  - watch
  - create
  - delete
- apiGroups:
  - apps
  resources:
  - daemonsets
  verbs:
  - get
  - create
  - patch
  - delete
- apiGroups:
  - ""
  resources:
  - services/proxy
  verbs:
  - get
- apiGroups:
  - ""
  resources:
  - serviceaccounts
  verbs:
  - get
  - create
  - delete
- apiGroups:
  - rbac.authorization.k8s.io
  resources:
  - roles
  verbs:
  - get
  - create
  - delete
- apiGroups:
  - rbac.authorization.k8s.io
  resources:
  - rolebindings
  verbs:
  - get
  - create
  - delete
- apiGroups:
  - apps
  - extensions
  resources:
  - pods
  verbs:
  - get
  - list
  - watch
- apiGroups:
  - apps
  - extensions
  resources:
  - services
  verbs:
  - get
  - list
  - watch
- apiGroups:
  - ""
  - apps
  - extensions
  resources:
  - endpoints
  verbs:
  - get
  - list
  - watch

See examples/roles for example clusterroles.

How to run

  1. Find pods you'd like to tap to in your Kubernetes cluster
  2. Run mizu tap PODNAME or mizu tap REGEX
  3. Open browser on http://localhost:8899/mizu or as instructed in the CLI ..
  4. Watch the API traffic flowing ..
  5. Type ^C to stop

Examples

Run mizu help for usage options

To tap specific pod -

 $ kubectl get pods 
 NAME                            READY   STATUS    RESTARTS   AGE
 front-end-649fc5fd6-kqbtn       2/2     Running   0          7m
 ..

 $ mizu tap front-end-649fc5fd6-kqbtn
 +front-end-649fc5fd6-kqbtn
 Web interface is now available at http://localhost:8899
 ^C

To tap multiple pods using regex -

 $ kubectl get pods 
 NAME                            READY   STATUS    RESTARTS   AGE
 carts-66c77f5fbb-fq65r          2/2     Running   0          20m
 catalogue-5f4cb7cf5-7zrmn       2/2     Running   0          20m
 front-end-649fc5fd6-kqbtn       2/2     Running   0          20m
 ..

 $ mizu tap "^ca.*"
 +carts-66c77f5fbb-fq65r
 +catalogue-5f4cb7cf5-7zrmn
 Web interface is now available at http://localhost:8899
 ^C