kube

package
v1.0.20210616 Latest Latest
Warning

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

Go to latest
Published: Jun 16, 2021 License: Apache-2.0 Imports: 24 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var Commands = []prompt.Suggest{
	{Text: "get", Description: "Display one or many resources"},
	{Text: "describe", Description: "Show details of a specific resource or group of resources"},
	{Text: "create", Description: "Create a resource by filename or stdin"},
	{Text: "replace", Description: "Replace a resource by filename or stdin."},
	{Text: "patch", Description: "Update field(s) of a resource using strategic merge patch."},
	{Text: "delete", Description: "Delete resources by filenames, stdin, resources and names, or by resources and label selector."},
	{Text: "edit", Description: "Edit a resource on the server"},
	{Text: "apply", Description: "Apply a configuration to a resource by filename or stdin"},
	{Text: "logs", Description: "Print the logs for a container in a pod."},
	{Text: "rolling-update", Description: "Perform a rolling update of the given ReplicationController."},
	{Text: "scale", Description: "Set a new size for a Deployment, ReplicaSet, Replication Controller, or Job."},
	{Text: "cordon", Description: "Mark node as unschedulable"},
	{Text: "drain", Description: "Drain node in preparation for maintenance"},
	{Text: "uncordon", Description: "Mark node as schedulable"},
	{Text: "attach", Description: "Attach to a running container."},
	{Text: "exec", Description: "Execute a command in a container."},
	{Text: "port-forward", Description: "Forward one or more local ports to a pod."},
	{Text: "proxy", Description: "Run a proxy to the Kubernetes API server"},
	{Text: "run", Description: "Run a particular image on the cluster."},
	{Text: "expose", Description: "Take a replication controller, service, or pod and expose it as a new Kubernetes Service"},
	{Text: "autoscale", Description: "Auto-scale a Deployment, ReplicaSet, or ReplicationController"},
	{Text: "rollout", Description: "rollout manages a deployment"},
	{Text: "label", Description: "Update the labels on a resource"},
	{Text: "annotate", Description: "Update the annotations on a resource"},
	{Text: "config", Description: "config modifies kubeconfig files"},
	{Text: "cluster-info", Description: "Display cluster info"},
	{Text: "api-versions", Description: "Print the supported API versions on the server, in the form of 'group/version'."},
	{Text: "api-resources", Description: "Print the supported API resources on the server'."},
	{Text: "version", Description: "Print the client and server version information."},
	{Text: "explain", Description: "Documentation of resources."},
	{Text: "convert", Description: "Convert config files between different API versions"},
	{Text: "top", Description: "Display Resource (CPU/Memory/Storage) usage"},
	{Text: "options", Description: "Print the list of flags inherited by all commands"},
	{Text: "plugin", Description: "Provides utilities for interacting with plugins."},
	{Text: "taint", Description: "Update the taints on one or more nodes."},
	{Text: "debug", Description: "Debug cluster resources using interactive debugging containers."},
	{Text: "kustomize", Description: "Build a set of KRM resources using a 'kustomization.yaml' file."},
}

Functions

func ExecuteAndGetResult

func ExecuteAndGetResult(s string) string

func Executor

func Executor(s string)

func GetComponentStatusCompletions

func GetComponentStatusCompletions(client *kubernetes.Clientset) []prompt.Suggest

func GetConfigMapSuggestions

func GetConfigMapSuggestions(client *kubernetes.Clientset, namespace string) []prompt.Suggest

func GetContextSuggestions

func GetContextSuggestions() []prompt.Suggest

func GetDaemonSetSuggestions

func GetDaemonSetSuggestions(client *kubernetes.Clientset, namespace string) []prompt.Suggest

func GetDeploymentSuggestions

func GetDeploymentSuggestions(client *kubernetes.Clientset, namespace string) []prompt.Suggest

func GetEndpointsSuggestions

func GetEndpointsSuggestions(client *kubernetes.Clientset, namespace string) []prompt.Suggest

func GetIngressSuggestions

func GetIngressSuggestions(client *kubernetes.Clientset, namespace string) []prompt.Suggest

func GetJobSuggestions

func GetJobSuggestions(client *kubernetes.Clientset, namespace string) []prompt.Suggest

func GetLimitRangeSuggestions

func GetLimitRangeSuggestions(client *kubernetes.Clientset, namespace string) []prompt.Suggest

func GetNameSpaceSuggestions

func GetNameSpaceSuggestions(namespaceList *corev1.NamespaceList) []prompt.Suggest

func GetNodeSuggestions

func GetNodeSuggestions(client *kubernetes.Clientset) []prompt.Suggest

func GetPathSuggestion

func GetPathSuggestion(path string) []prompt.Suggest

func GetPersistentVolumeClaimSuggestions

func GetPersistentVolumeClaimSuggestions(client *kubernetes.Clientset, namespace string) []prompt.Suggest

func GetPersistentVolumeSuggestions

func GetPersistentVolumeSuggestions(client *kubernetes.Clientset) []prompt.Suggest

func GetPodSecurityPolicySuggestions

func GetPodSecurityPolicySuggestions(client *kubernetes.Clientset) []prompt.Suggest

func GetPodSuggestions

func GetPodSuggestions(client *kubernetes.Clientset, namespace string) []prompt.Suggest

func GetPodTemplateSuggestions

func GetPodTemplateSuggestions(client *kubernetes.Clientset, namespace string) []prompt.Suggest

func GetReplicaSetSuggestions

func GetReplicaSetSuggestions(client *kubernetes.Clientset, namespace string) []prompt.Suggest

func GetReplicationControllerSuggestions

func GetReplicationControllerSuggestions(client *kubernetes.Clientset, namespace string) []prompt.Suggest

func GetResourceQuotasSuggestions

func GetResourceQuotasSuggestions(client *kubernetes.Clientset, namespace string) []prompt.Suggest

func GetSecretSuggestions

func GetSecretSuggestions(client *kubernetes.Clientset, namespace string) []prompt.Suggest

func GetServiceAccountSuggestions

func GetServiceAccountSuggestions(client *kubernetes.Clientset, namespace string) []prompt.Suggest

func GetServiceSuggestions

func GetServiceSuggestions(client *kubernetes.Clientset, namespace string) []prompt.Suggest

Types

type Completer

type Completer struct {
	Namespace         string
	NamespaceList     *corev1.NamespaceList
	Client            *kubernetes.Clientset
	KubernetesRuntime *environments.Runtime
}

func NewCompleter

func NewCompleter() (*Completer, error)

func (*Completer) Complete

func (c *Completer) Complete(d prompt.Document) []prompt.Suggest

Jump to

Keyboard shortcuts

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