Skip to content

Latest commit

 

History

History

kube-config

Folders and files

NameName
Last commit message
Last commit date

parent directory

..
 
 
 
 

Kubernetes Commands and Files

This repository contains various commands to work with kubernetes

Kube Config

  • Check current context
 kubectl config view
  • Set current context
  kubectl config --kubeconfig=config-demo use-context dev-frontend
  • Add context details
kubectl config --kubeconfig=config-demo set-context dev-frontend --cluster=development --namespace=frontend --user=developer
kubectl config --kubeconfig=config-demo set-context dev-storage --cluster=development --namespace=storage --user=developer
kubectl config --kubeconfig=config-demo set-context exp-scratch --cluster=scratch --namespace=default --user=experimenter
  • Specify kube config file
 kubectl config view --kubeconfig=<filename>
  • Output of specific context
kubectl config view --minify --flatten --context={CONTEXTNAME} > {CONTEXTNAME}.config