GitXplorerGitXplorer
h

kubescope-cli

public
119 stars
6 forks
6 issues

Commits

List of commits on branch master.
Unverified
df359f8d5ca75aaea6ebe53b8b984f5a5bf5d850

update docs

hhharnisc committed 6 years ago
Unverified
1054005d85032aa9cd7235734e79633cb287e5fd

bump image in examples

hhharnisc committed 6 years ago
Unverified
9c02f636b8cb6d4f251af3e73d19248c2a31b3e1

bump to package that clears stale graphs

hhharnisc committed 6 years ago
Unverified
aa0a70ddef1814000de51c2e605b83f7fe964f46

bump example version number

hhharnisc committed 6 years ago
Unverified
b296db64b528eb1013c3d6b592046a66cbff3291

add more options to select and filter images and deployment names

hhharnisc committed 6 years ago
Unverified
fc9b45a85066b4d63a894d096007da6b520fbf83

add the attach command

hhharnisc committed 6 years ago

README

The README file for this repository.

Kubescope CLI

Kubescope on the command line

Kubescope CLI

Usage

Kubescope CLI can be used in Kubernetes or locally because it connects to the docker socket to collect stats.

Kubernetes

Kubescope needs access to the docker socket on the host, stdin and a tty. It also needs to be running on the same host that you want to monitor. Here's an example pod spec:

apiVersion: v1
kind: Pod
metadata:
  name: kubescope-cli-example
spec:
  containers:
  - image: hharnisc/kube-scope-cli:9c02f636b8cb6d4f251af3e73d19248c2a31b3e1
    name: kubescope-cli-example
    stdin: true
    tty: true
    volumeMounts:
    - mountPath: /var/run/docker.sock
      name: docker-sock-volume
    env:
    - name: MATCH_NAME
      value: ".*my-app.*"
    - name: SKIP_NAME
      value: ".*POD.*"
    # - name: MATCH_IMAGE
    #   value: ".*my-image.*"
    # - name: SKIP_IMAGE
    #   value: ".*some-image.*"
    # - name: DOCKER_SOCKET
    #   value: /var/run/docker.sock
  volumes:
  - name: docker-sock-volume
    hostPath:
      path: /var/run/docker.sock
  # pin kubescope to a specific node
  # nodeSelector:
    # kubernetes.io/hostname: minikube

Attach to the running container:

kubectl attach -it kubescope-cli-example

Observe graphs and the detatch with escape sequence Ctrl+P followed by Ctrl+Q

Locally

Kubescope CLI can be used locally and connects to the docker socket to collect stats

MATCH_NAME=.*my_app.* npm start