Skip to main content

One post tagged with "kubectl"

View All Tags

· One min read
Hreniuc Cristian-Alexandru

Make sure you have exported the KUBECONFIG env: export KUBECONFIG=/path/rke2_inventory/hetzner/credentials/rke2.yaml

  1. Get all pods and the nodes they are on
kubectl get pods -o wide
  1. Get nodes and their labels
kubectl get nodes --show-labels
  1. Deploy something to the cluster:
kubectl apply -f hetzner/domain.com-backend.yaml
  1. Delete a deployment from the cluster:
kubectl delete -f https://k8s.io/examples/application/deployment.yaml
  1. Get/watch logs from pod:
kubectl logs -f pod/vt-vttablet-decontabodusseldorf-2620423388-0c5af156
  1. Delete pod:
kubectl delete pod/vt-vttablet-decontabodusseldorf-2620423388-0c5af156