Skip to content

Latest commit

 

History

History
36 lines (28 loc) · 632 Bytes

docker-k8s.md

File metadata and controls

36 lines (28 loc) · 632 Bytes

Dicas de Docker/K8S

Remover todos os containers

  1. Parar os containers
docker stop $(docker ps -a -q)
  1. Remover os containers
docker rm $(docker ps -a -q)

Adicionar autocomplete do MicroK8S no ZSH

alias kubectl="microk8s.kubectl"
# use autocompletion
autoload -Uz compinit
compinit

# https://kubernetes.io/docs/tasks/tools/included/optional-kubectl-configs-zsh/
source <(kubectl completion zsh)
alias k=kubectl
compdef k=kubectl

# for microk8s kubectl
microk8s.kubectl() {
    microk8s kubectl "$@"
}
alias mk="microk8s.kubectl"
compdef microk8s.kubectl=kubectl
compdef mk=kubectl