WhatsApp chat

Comandos de Kubernetes

Marlon Falcon Hernandez, • kubernetes
Back

Permite ver la versión instalada de kubectl

kubectl version

Ver los namespaces que vienen por defecto.

kubectl get ns

Ver los pods del namesapaces kube-system

$ kubectl -n kube-system get pods
$ kubectl -n kube-system get pods -o wide

Borramos un Pod

kubectl -n kube-system delete pod kube-apiserver-docker-desktop

Corremos un pod

kubectl apply -f 01-pod.yaml

Para ver nuestros pods que estan corriendo

kubectl get pods

Entramos en nuestro pod

kubectl exec -it nginx sh

Borramos el pod

kubectl delete pod nginx

ver el pod con el yaml

kubectl get pod nginx -o yaml

Borrar un deployment

kubectl delete -f 04-deployment.yaml

Describe un pod

kubectl describe pod my-csi-app-set-0

Describe el pedido.

kubectl get pvc

ver los state

kubectl get statefulsets

Borrar un StateFulSet

kubectl delete sts my-csi-app-set

Me permite ver los pod y los servicios.

kubectl get all

Describe un servicio

kubectl describe svc hello

Entramos al pod de ubuntu

kubectl exec -it ubuntu -- bash

Muestra la IP

kubectl get nodes -o wide

Abre el puerto 8080

kubectl apply -f 09-hello-deployment-svc-loadBalancer.yaml


mfalconsoft@gmail.com / +34 (662) 47 0645RSS