From 1f62fdc617be3f818a82d68c24268a4f7a9cc794 Mon Sep 17 00:00:00 2001 From: Klesh Wong Date: Mon, 27 Jul 2020 10:41:32 +0800 Subject: [PATCH] [feature] add kubectl alias --- win/profile.ps1 | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/win/profile.ps1 b/win/profile.ps1 index 795becc..d796095 100644 --- a/win/profile.ps1 +++ b/win/profile.ps1 @@ -5,6 +5,15 @@ Set-PSReadLineOption -EditMode Emacs $Env:Path += ";$PSScriptRoot\bin" +Set-Alias -Name k kubectl + +function kcc { k config get-contexts $args } +function kcu { k config use-context $args} +function kgd { k get deployment $args} +function ked { k edit deployment $args} +function kgp { k k get pod -o 'custom-columns=NAME:.metadata.name,IMG:.spec.containers[*].image,STATUS:.status.phase' $args} +function kl { k logs -f --all-containers $args} + function dp { [CmdletBinding()]