Actions

Difference between revisions of "Kubernetes/Tools"

From Ever changing code

< Kubernetes
(kubectl)
(References)
 
Line 22: Line 22:
 
*[https://github.com/ahmetb/kubectx kubectx kubens] Kubernetes config switches for context and setting up default namespace
 
*[https://github.com/ahmetb/kubectx kubectx kubens] Kubernetes config switches for context and setting up default namespace
 
*[https://medium.com/faun/using-different-kubectl-versions-with-multiple-kubernetes-clusters-a3ad8707b87b manages different ver kubectl] blog
 
*[https://medium.com/faun/using-different-kubectl-versions-with-multiple-kubernetes-clusters-a3ad8707b87b manages different ver kubectl] blog
 +
*[https://github.com/kubernetes/community/blob/master/contributors/devel/sig-cli/kubectl-conventions.md#rules-for-extending-special-resource-alias---all kubectl] Kubectl Conventions

Latest revision as of 18:19, 14 July 2019

kubectl

Install
#Latest
curl -LO https://storage.googleapis.com/kubernetes-release/release/$(curl -s https://storage.googleapis.com/kubernetes-release/release/stable.txt)/bin/linux/amd64/kubectl

#Specific version
$(VER=v1.13.7; ARCH=amd64; curl -LO https://storage.googleapis.com/kubernetes-release/release/$VER/bin/linux/$ARCH/kubectl)
chmod +x ./kubectl; sudo mv ./kubectl /usr/local/bin/kubectl

#Verify, kubectl should not be more than -/+ 1 minor version difference then api-server
kubectl version --short 
Client Version: v1.13.7
Server Version: v1.13.7-gke.8

#Autocompletion
source <(kubectl completion bash); alias k=kubectl; complete -F __start_kubectl k

References

  • kubetail Bash script that enables you to aggregate (tail/follow) logs from multiple pods into one stream. This is the same as running "kubectl logs -f " but for multiple pods.
  • kubectx kubens Kubernetes config switches for context and setting up default namespace
  • manages different ver kubectl blog
  • kubectl Kubectl Conventions