Skip to content

Instantly share code, notes, and snippets.

@bil0u
Last active June 26, 2019 23:36
Show Gist options
  • Select an option

  • Save bil0u/6a101946725fc87be7cd415f635b5a5e to your computer and use it in GitHub Desktop.

Select an option

Save bil0u/6a101946725fc87be7cd415f635b5a5e to your computer and use it in GitHub Desktop.
[Kubernetes commands] Some useful kubernetes commands #cheatsheet #kubernetes
List Kubernetes CLI commands

kubectl
kubectl <subcommand> --help

Create resource from file

kubectl create -f <path/to_file.yml>

List available StorageClass

kubectl get sc

Change default StorageClass

kubectl patch sc <class_name> -p '{"metadata": {"annotations":{"storageclass.kubernetes.io/is-default-class":"<true|false>"}}}'

Create secrets

kubectl create secret ...

kubectl create secret tls <tls_secret_name> --cert=<path/to_full_chain.crt> --key=<path/to.key>

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment