kubecm

command module
v0.1.3 Latest Latest
Warning

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

Go to latest
Published: Mar 18, 2024 License: Apache-2.0 Imports: 1 Imported by: 0

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://root@192.168.0.101:/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://root@192.168.0.102:/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)'

Documentation

Overview

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. 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

Jump to

Keyboard shortcuts

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