Documentation ¶
Index ¶
- Constants
- func BoolToString(value corev1.ConditionStatus) string
- func ByteCountSI(b int64) string
- func CalculateReadiness(pod *corev1.Pod) (int, int)
- func ChangeKubeconfigContext(kubeconfigPath string, contextName string) error
- func DescribeNode(node *corev1.Node)
- func DescribeNodeTable(node *corev1.Node)
- func DescribePods(pod *corev1.Pod)
- func DescribePodsDetail(pod *corev1.Pod)
- func GetClientSet(kubeconfig string) (*kubernetes.Clientset, error)
- func GetCommands() []*cobra.Command
- func GetContainerImages(pod *corev1.Pod) []string
- func GetContainerStatus(pod *corev1.Pod, containerName string) *corev1.ContainerStatus
- func GetCurrentContext(config *clientcmdapi.Config) (string, error)
- func GetFreePort() (int, error)
- func GetLabels(pod *corev1.Pod) []string
- func GetOwnerKindAndName(pod *corev1.Pod) (string, string)
- func GetPod(namespace string, name string) (*corev1.Pod, error)
- func HumanReadableDuration(duration time.Duration) string
- func InitConfig() error
- func ListContexts(kc *KubeConfig) error
- func MergeConfigs(configs []*clientcmdapi.Config) (*clientcmdapi.Config, error)
- func SelectedConfig(contextNames []string, config *clientcmdapi.Config) error
- func ShowContext(kc *KubeConfig) error
- func ShowDeploymentByFilter(deployments *v1.DeploymentList)
- func ShowDetailList(config *clientcmdapi.Config) error
- func ShowEndpointByFilter(endpoints *corev1.EndpointsList)
- func ShowNamespaceByFilter(namespaces *corev1.NamespaceList)
- func ShowPodsByFilter(pods *corev1.PodList)
- func ShowServiceByFilter(services *corev1.ServiceList)
- type KubeConfig
Constants ¶
View Source
const ( Logo = `` /* 324-byte string literal not displayed */ Author = ` DevOps Corner Indonesia (devopscorner.id) https://github.com/devopscorner/k8s-context Apache v2.0 License` AppName = "K8S-CONTEXT (K8C)" VERSION = "v1.1.9" )
Variables ¶
This section is empty.
Functions ¶
func BoolToString ¶
func BoolToString(value corev1.ConditionStatus) string
func ByteCountSI ¶
func ChangeKubeconfigContext ¶
func DescribeNode ¶
func DescribeNodeTable ¶
func DescribePods ¶
func DescribePodsDetail ¶
func GetClientSet ¶
func GetClientSet(kubeconfig string) (*kubernetes.Clientset, error)
func GetCommands ¶
func GetContainerImages ¶
func GetContainerStatus ¶
func GetContainerStatus(pod *corev1.Pod, containerName string) *corev1.ContainerStatus
func GetCurrentContext ¶
func GetCurrentContext(config *clientcmdapi.Config) (string, error)
func GetFreePort ¶
func HumanReadableDuration ¶
func InitConfig ¶
func InitConfig() error
func ListContexts ¶
func ListContexts(kc *KubeConfig) error
func MergeConfigs ¶
func MergeConfigs(configs []*clientcmdapi.Config) (*clientcmdapi.Config, error)
func SelectedConfig ¶
func SelectedConfig(contextNames []string, config *clientcmdapi.Config) error
func ShowContext ¶
func ShowContext(kc *KubeConfig) error
func ShowDeploymentByFilter ¶
func ShowDeploymentByFilter(deployments *v1.DeploymentList)
func ShowDetailList ¶
func ShowDetailList(config *clientcmdapi.Config) error
func ShowEndpointByFilter ¶
func ShowEndpointByFilter(endpoints *corev1.EndpointsList)
func ShowNamespaceByFilter ¶
func ShowNamespaceByFilter(namespaces *corev1.NamespaceList)
func ShowPodsByFilter ¶
func ShowServiceByFilter ¶
func ShowServiceByFilter(services *corev1.ServiceList)
Types ¶
type KubeConfig ¶
type KubeConfig struct { Files []string Merged *clientcmdapi.Config Overwrite bool }
func (*KubeConfig) Load ¶
func (kc *KubeConfig) Load() error
func (*KubeConfig) SaveToFile ¶
func (kc *KubeConfig) SaveToFile(file string) error
Click to show internal directories.
Click to hide internal directories.