Difference between revisions of "Kubernetes/Tools"

From Ever changing code
Jump to navigation Jump to search
(Created page with "*[https://github.com/johanhaleby/kubetail kubetail] Bash script that enables you to aggregate (tail/follow) logs from multiple pods into one stream. This is the same as runnin...")
 
(3 intermediate revisions by the same user not shown)
Line 1: Line 1:
= kubectl =
;Install
<source>
#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
</source>
= References =
*[https://github.com/johanhaleby/kubetail 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.
*[https://github.com/johanhaleby/kubetail 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.
*[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

Revision as of 15:25, 13 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