Categorygithub.com/joyme123/kubecm
modulepackage
0.1.3
Repository: https://github.com/joyme123/kubecm.git
Documentation: pkg.go.dev

# README

kubecm

resource/term.gif

kubecm(kube config manager) is used for manage config files of kubernetes clusters.

Install

go get github.com/joyme123/kubecm

Usage

list config files

kubecm list

import config file

# import fro local filesystem
kubecm import -n dev_129_cluster -l /tmp/configs/config_dev_182_cluster

# import via ssh with password 
kubecm import dev_0_101_cluster --from=ssh://[email protected]:/etc/kubernetes/kubectl.kubeconfig  -p mypassword

# import via ssh with key, default from $HOME/.ssh/id_rsa
kubecm import dev_0_102_cluster --from=ssh://[email protected]:/etc/kubernetes/kubectl.kubeconfig 

use config file

kubecm use -n dev_129_cluster

rename config file

kubecm rename -n dev_129_cluster -t dev_cluster

remove config file

kubecm remove -n dev_129_cluster

ZSH 配置

zsh 命令行提示:

在对应的主题里添加下面的配置

kubecm_prompt() {
  echo " %{$fg[green]%}k8s:$(kubecm list -c)%{$reset_color%}"
}
local kubecm='$(kubecm_prompt)'

# Packages

Copyright © 2021 NAME HERE <EMAIL ADDRESS> Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License.
No description provided by the author