Skip to content

Instantly share code, notes, and snippets.

@javierav
Last active December 13, 2018 08:09
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save javierav/33671e4a5cb85f2108b50b0567de6e9b to your computer and use it in GitHub Desktop.
Save javierav/33671e4a5cb85f2108b50b0567de6e9b to your computer and use it in GitHub Desktop.
Kubernetes

Kubernetes

Guía de uso sencilla para gente que está empezando.

Pods

Obtener la lista de pods

$ kubectl -n CLUSTER get pods

Ver el log de un pod

$ kubectl -n CLUSTER logs <my-pod>

Ejecutar Bash dentro de un pod

$ kubectl -n CLUSTER exec -ti <my-pod> bash

Eliminar un pod

$ kubectl -n CLUSTER delete pod <my-pod>

Secrets

Obtener la lista de almacenes de secretos

$ kubectl -n CLUSTER get secrets

Obtener el contenido de un almacén concreto

$ kubectl -n CLUSTER get secret NAME -o yaml
$ echo "SECRET_BASE64" | base64 --decode

Editar el contenido de un almacén concreto

$ echo -n "VARIABLE" | base64 -w 0
$ kubectl -n CLUSTER edit secrets NAME
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment