Create namespace

Create a new namespace; idempotent with --dry-run=client | apply

kubectl create namespace <ns>

tool
kubectl73 commands
tags
config

More kubectl commands

  • kubectl set resources deployment/<name> -c <container> --requests=cpu=100m,memory=128Mi --limits=cpu=500m,memory=512Mi -n <ns>

    Update resource requests and limits on a running deployment

  • kubectl run tmp --image=nicolaka/netshoot -it --rm --restart=Never -n <ns> -- bash

    Ephemeral pod for debugging; deleted on exit

  • kubectl get nodes --show-labels

    See all labels assigned to each node

  • kubectl uncordon <node>

    Re-enable scheduling on a previously cordoned node

  • kubectl get hpa -A

    Horizontal Pod Autoscaler current/desired replicas and metrics

all 73 kubectl commands