feat: kn function to change kctx and ns
This commit is contained in:
parent
8778a446c7
commit
63874b3739
@ -12,8 +12,20 @@
|
||||
# See the License for the specific language governing permissions and
|
||||
# limitations under the License.
|
||||
|
||||
function kn() {
|
||||
(set -e
|
||||
|
||||
if [ -n "$2" ]; then
|
||||
kubectx "${1:l}"
|
||||
kubens "$2"
|
||||
else
|
||||
kubens "$@"
|
||||
fi
|
||||
)
|
||||
}
|
||||
compdef -e _kubens.zsh kn
|
||||
|
||||
alias kx='kubectx'
|
||||
alias kn='kubens'
|
||||
alias k='kubectl'
|
||||
alias ksys='kubectl --namespace=kube-system'
|
||||
alias ka='kubectl apply --recursive -f'
|
||||
|
Loading…
Reference in New Issue
Block a user