Skip to content
This repository has been archived by the owner on Jun 6, 2024. It is now read-only.

bempapp/kubernetes-dojo

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 
 
 
 
 

Repository files navigation

Kubernetes Dojo

  1. Documentação de apoio

  2. Curso Introduction to Kubernetes

Instalação Local Básica

  1. Instalar Kubernetes

    • Docker Desktop -> Kubernetes e ativar (Enable Kubernetes)
  2. Instalar Kubectl

Instalação Local Avançada

  1. Instalar Krew

  2. Instalar Kubectx e Kubens

    • kubectl krew install ctx
    • kubectl krew install ns

Comandos Úteis

  1. Aplica um yaml
kubectl apply -f {arquivo.yml}
  1. Remover os recursos de um yaml
kubectl delete -f {arquivo.yml}
  1. Listar recursos
kubectl get pods
kubectl get namespaces
kubectl get services
kubectl get cronjobs
  1. Visualizar um recurso
kubectl describe pod {name}
kubectl describe namespace {name}
kubectl describe service {name}
kubectl describe namespace {name}
  1. Ver os logs de um pod
kubectl logs {podname}[-c {containername}]
  1. Ver o uso de recursos dos pods/containers (precisa ter o metrics server instalado)
kubectl top pods
kubectl top pods --containers
  1. Port Forward
kubectl port-forward pods/{name} {LOCAL_PORT}:{CLUSTER_PORT}
kubectl port-forward deployment/{name} {LOCAL_PORT}:{CLUSTER_PORT}
kubectl port-forward service/{name} {LOCAL_PORT}:{CLUSTER_PORT}

Releases

No releases published

Packages

No packages published