Documentation
¶
Overview ¶
Package kube reads the local kubectl configuration. flow never mutates the user's kubeconfig: to target a different cluster it passes --kube-context to helm instead.
Index ¶
- Variables
- type Kube
- func (k *Kube) Available() bool
- func (k *Kube) Contexts(ctx context.Context) ([]string, error)
- func (k *Kube) CurrentContext(ctx context.Context) (string, error)
- func (k *Kube) Pods(ctx context.Context, contextName, namespace string) ([]Pod, error)
- func (k *Kube) Reachable(ctx context.Context, contextName string) error
- func (k *Kube) ServerURL(ctx context.Context, contextName string) (string, error)
- type Pod
Constants ¶
This section is empty.
Variables ¶
View Source
var ErrNoContext = fmt.Errorf("no current kube context is set")
ErrNoContext reports that kubectl has no current context selected.
Functions ¶
This section is empty.
Types ¶
type Kube ¶
Kube wraps the kubectl binary.
func (*Kube) Available ¶
Available reports whether kubectl is on PATH. The user's shell may alias kubectl to something else; os/exec ignores aliases, so this checks for a real binary.
func (*Kube) CurrentContext ¶
CurrentContext returns the active kube context name.
Click to show internal directories.
Click to hide internal directories.