Home
Cloud
Big Data
CI
Install
Samples
Java
Ubuntu
Maven
Archive
Kubernetes
|
Install kubectl (version: 1.18.6) (Ubuntu)
Notes
Install kubectl
Uninstall kubectl
Notes
Please visit this page for more details on how to install kubectl:
https://kubernetes.io/docs/tasks/tools/install-kubectl/
Install kubectl
Check if any update:
$ sudo apt update
[Optional]
Install packages to allow apt to use a repository over HTTPS:
$ sudo apt install \ apt-transport-https \ curl
Download
kubectl
:
$ curl -LO "https://storage.googleapis.com/kubernetes-release/release/$(curl -s https://storage.googleapis.com/kubernetes-release/release/stable.txt)/bin/linux/amd64/kubectl"
Make
kubectl
executable:
$ chmod +x ./kubectl
Move
kubectl
to
/usr/local/bin/
:
$ sudo mv ./kubectl /usr/local/bin/kubectl
Verify
kubectl
:
$ kubectl version --client
Client Version: version.Info{ Major:"1", Minor:"18", GitVersion:"v1.18.6", GitCommit:"dff82dc0de47299ab66c83c626e08b245ab19037", GitTreeState:"clean", BuildDate:"2020-07-15T16:58:53Z", GoVersion:"go1.13.9", Compiler:"gc", Platform:"linux/amd64" }
Uninstall kubectl
Remove
kubectl
:
$ sudo rm -f /usr/local/bin/kubectl
[Optional]
Remove
kubectl
configuration folder:
$ rm -rf ~/.kube/
© 2010-2022
mti
tek