topology-viewer

command module
v0.0.9 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jan 16, 2025 License: Apache-2.0 Imports: 1 Imported by: 0

README

topology-viewer

Kubectl Krew plugin to view how the cluster is spread accross topologies

Demo

topology-viewer nodes demo

topology-viewer pods label-selector

Examples

All the examples are in standalone-mode, if topology-viewer was installed via Krew the commands need to start with kubectl topology-viewer

  • View nodes
    topology-viewer nodes
    
  • View all pods (all namespace)
    topology-viewer pods -A
    
  • View pods (all namespace)
    topology-viewer pods -A -l key1=value1,key2=value2
    
  • View pods with specific namespace
    topology-viewer pods -n namespace -l key1=value1,key2=value2
    
  • View pods with current namespace
    topology-viewer pods -l key1=value1,key2=value2
    
  • View nodes and use different topology key (how the cluster is spread by arch)
    topology-viewer nodes --topology-key kubernetes.io/arch
    
  • View pods and use different topology key (how the cluster is spread by arch)
    topology-viewer pods -A -l key1=value1,key2=value2 --topology-key kubernetes.io/arch
    

Installation

The recommended installation method is via krew.

Via Krew

Krew is a kubectl plugin manager. If you have not yet installed krew, get it at https://github.com/kubernetes-sigs/krew. Then installation is as simple as

this is a temporary method until (and if) the plugin will be accepted to the Krew Index

kubectl krew install --manifest-url=https://raw.githubusercontent.com/TalShafir/topology-viewer/refs/heads/master/topology-viewer.yaml

The plugin will be available as kubectl topology-viewer.

Via go install
go install github.com/TalShafir/topology-viewer@latest
Binaries

When using the binaries for installation, you should remove the kubectl prefix of the usage examples.

Linux
curl -LO https://github.com/TalShafir/topology-viewer/releases/latest/download/topology-viewer_Linux_x86_64.tar.gz \
&& tar xf topology-viewer_Linux_x86_64.tar.gz topology-viewer \
&& chmod u+x topology-viewer \
&& mv -i topology-viewer /usr/bin/topology-viewer
OSX
Arm
curl -LO https://github.com/TalShafir/topology-viewer/releases/latest/download/topology-viewer_Darwin_arm64.tar.gz \
&& tar xf topology-viewer_Darwin_arm64.tar.gz topology-viewer \
&& chmod u+x topology-viewer \
&& mv -i topology-viewer /usr/bin/topology-viewer
Intel
curl -LO https://github.com/TalShafir/topology-viewer/releases/latest/download/topology-viewer_Darwin_x86_64.tar.gz \
&& tar xf topology-viewer_Darwin_x86_64.tar.gz topology-viewer \
&& chmod u+x topology-viewer \
&& mv -i topology-viewer /usr/bin/topology-viewer

Documentation

Overview

Copyright © 2024 Tal Shafir

Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at

http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.

Directories

Path Synopsis
pkg
cmd

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL