kube

package
v1.20.2 Latest Latest
Warning

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

Go to latest
Published: Nov 26, 2026 License: MIT Imports: 43 Imported by: 1 module, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ApplySurfaceGate

func ApplySurfaceGate(root *cobra.Command, ios *utils.IOStreams, enabled bool)

ApplySurfaceGate replaces the kube command under root with a hidden stand-in when the workspace has not reported the Kubernetes surface. It must run before root.Execute: Cobra answers --help and validates arguments before any PreRun hook, and decides suggestions and completion from Hidden alone. Swapping the command leaves the enabled tree exactly as built.

This is a courtesy, not a control: the server refuses /api/kubernetes/ on its own whenever the surface is off.

kube credentials stays reachable under the stand-in. kubectl runs it for a context an earlier login wrote, perhaps in another workspace or before a logout, and it reads only the saved session, so the current workspace's answer says nothing about it. kube logout stays for the same reason: it cleans up such a context and its saved token, and needs the server only for a best-effort close.

func NewKubeCmd added in v1.20.0

func NewKubeCmd(newClient clientFactory, ios *utils.IOStreams) *cobra.Command

Types

This section is empty.

Jump to

Keyboard shortcuts

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