Skip to content

Latest commit

 

History

History
29 lines (17 loc) · 1.05 KB

README.md

File metadata and controls

29 lines (17 loc) · 1.05 KB

PSKubeCtx

PSKubeCtx is a utility to manage and switch between kubectl contexts, inspired by kubectx.

Features/usage

PSKubeCtx provides the following cmdlets to manage your kubectl context:

  • Use-KubectlContext (ukc) - Switches to a context, like kubectl config use-context foobar
  • Use-KubectlNamespace (ukn) - Changes the namespace in the current context, like kubectl config set-context <current> --namespace=foobar
  • Get-KubectlConfig - Like kubectl config view, but in the form of a PSCustomObject

PowerLine prompt support

PSKubeCtx will automatically add the current Kubernetes context/namespace to your PowerShell prompt if the PowerLine module is available. The formatting and coloring can be customized using the Set-PSKubeCtxPromptSetting cmdlet (or disabled entirely).

Installing from the PowerShell Gallery

Install-Module PSKubeCtx

Future ideas

  • Tab-completion of context names