Skip to content

Latest commit

 

History

History
114 lines (75 loc) · 3.49 KB

README.md

File metadata and controls

114 lines (75 loc) · 3.49 KB

kubectl-karbon - Quickly connect to your Karbon cluster!

This kubectl extension allow to quickly connect to an existing karbon cluster without the need to connect to Prism UI. He use the Karbon API to get kubeconfig file and install it on your local system.

Demo

kubectl-karbon.mp4

Go Report Card CI Release

release License Proudly written in Golang Releases


Installation

There are several installation options:

  • As kubectl plugins
  • Manual installation

Kubectl Plugins

You can install and use Krew kubectl plugin manager to get the karbon plugin .

kubectl krew install karbon

After installing, the tools will be available as kubectl karbon.

Manual

  • Download your corresponding release
  • Install the binary somewhere in your PATH (/usr/local/bin for example)
  • use it with kubectl karbon

MacOS X notes for security error

Depending of your OS settings when you install you binary manually we must launch the following command: xattr -r -d com.apple.quarantine /usr/local/bin/kubectl-karbon

Usage

kubectl karbon help

Config file

You can specify a config file to define your seetings. The default is $HOME/.kubectl-karbon.yaml and you can use another one with the --config flag.

server: servername
port: 9440
cluster: karbon_cluster_name
user: admin
insecure: true
verbose: false
kubie: false
#kubie-path: ~/.kube/.kubie/
#kubeconfig: /path/.kube/config

config file example

All entries are optional, you can define only what you need to enforce.

Env variables

you can also use the following environement variable

KARBON_SERVER
KARBON_PORT
KARBON_CLUSTER
KARBON_USER
KARBON_INSECURE
KARBON_VERBOSE
KARBON_PASSWORD
KARBON_KUBIE
KARBON_KUBIE_PATH KUBECONFIG

precedence is

FLAGS => ENV => CONFIG FILE => DEFAULT

Password

This tools never stored the password. You can use the KARBON_PASSWORD env variable otherwise it should be provided in an interactive way.

Kubie mode

Allows full integration with the excellent Kubie tool who has support for split configuration files, meaning it can load Kubernetes contexts from multiple files.
When this mode is active each kubeconfig file is stored as an independent file in the kubie-path directoy (default ~/.kube/kubie/cluster_name.yaml)

Building From Source

kubectl-karbon is currently using go v1.16 or above. In order to build kubectl-karbon from source you must:

  1. Clone the repo

  2. Build and run the executable

    make build && make install