merge master to 1.10, with fixes (#7682)
This commit is contained in:
committed by
zacharysarah
parent
7f40782850
commit
3d79703d23
@@ -184,6 +184,126 @@ kubectl can be installed as part of the Google Cloud SDK.
|
||||
|
||||
{% include tabs.md %}
|
||||
|
||||
<<<<<<< HEAD
|
||||
||||||| merged common ancestors
|
||||
## Download as part of the Google Cloud SDK
|
||||
|
||||
kubectl can be installed as part of the Google Cloud SDK.
|
||||
|
||||
1. Install the [Google Cloud SDK](https://cloud.google.com/sdk/).
|
||||
2. Run the following command to install `kubectl`:
|
||||
|
||||
gcloud components install kubectl
|
||||
|
||||
3. Run `kubectl version` to verify that the version you've installed is sufficiently up-to-date.
|
||||
|
||||
## Install with snap on Ubuntu
|
||||
|
||||
kubectl is available as a [snap](https://snapcraft.io/) application.
|
||||
|
||||
1. If you are on Ubuntu or one of other Linux distributions that support [snap](https://snapcraft.io/docs/core/install) package manager, you can install with:
|
||||
|
||||
sudo snap install kubectl --classic
|
||||
|
||||
2. Run `kubectl version` to verify that the version you've installed is sufficiently up-to-date.
|
||||
|
||||
## Install with Homebrew on macOS
|
||||
|
||||
1. If you are on macOS and using [Homebrew](https://brew.sh/) package manager, you can install with:
|
||||
|
||||
brew install kubectl
|
||||
|
||||
2. Run `kubectl version` to verify that the version you've installed is sufficiently up-to-date.
|
||||
|
||||
## Install with Powershell from PSGallery
|
||||
|
||||
1. If you are on Windows and using [Powershell Gallery](https://www.powershellgallery.com/) package manager, you can install and update with:
|
||||
|
||||
Install-Script -Name install-kubectl -Scope CurrentUser -Force
|
||||
install-kubectl.ps1 [-DownloadLocation <path>]
|
||||
|
||||
If no Downloadlocation is specified, kubectl will be installed in users temp Directory
|
||||
2. The installer creates $HOME/.kube and instucts to create a config file
|
||||
3. Updating
|
||||
re-run Install-Script to update the installer
|
||||
re-run install-kubectl.ps1 to install latest binaries
|
||||
|
||||
## Install with Chocolatey on Windows
|
||||
|
||||
1. If you are on Windows and using [Chocolatey](https://chocolatey.org) package manager, you can install with:
|
||||
|
||||
choco install kubernetes-cli
|
||||
|
||||
2. Run `kubectl version` to verify that the version you've installed is sufficiently up-to-date.
|
||||
3. Configure kubectl to use a remote Kubernetes cluster:
|
||||
|
||||
cd C:\users\yourusername (Or wherever your %HOME% directory is)
|
||||
mkdir .kube
|
||||
cd .kube
|
||||
touch config
|
||||
|
||||
Edit the config file with a text editor of your choice, such as Notepad for example.
|
||||
|
||||
=======
|
||||
## Download as part of the Google Cloud SDK
|
||||
|
||||
kubectl can be installed as part of the Google Cloud SDK.
|
||||
|
||||
1. Install the [Google Cloud SDK](https://cloud.google.com/sdk/).
|
||||
2. Run the following command to install `kubectl`:
|
||||
|
||||
gcloud components install kubectl
|
||||
|
||||
3. Run `kubectl version` to verify that the version you've installed is sufficiently up-to-date.
|
||||
|
||||
## Install with snap on Ubuntu
|
||||
|
||||
kubectl is available as a [snap](https://snapcraft.io/) application.
|
||||
|
||||
1. If you are on Ubuntu or one of other Linux distributions that support [snap](https://snapcraft.io/docs/core/install) package manager, you can install with:
|
||||
|
||||
sudo snap install kubectl --classic
|
||||
|
||||
2. Run `kubectl version` to verify that the version you've installed is sufficiently up-to-date.
|
||||
|
||||
## Install with Homebrew on macOS
|
||||
|
||||
1. If you are on macOS and using [Homebrew](https://brew.sh/) package manager, you can install with:
|
||||
|
||||
brew install kubectl
|
||||
|
||||
2. Run `kubectl version` to verify that the version you've installed is sufficiently up-to-date.
|
||||
|
||||
## Install with Powershell from PSGallery
|
||||
|
||||
1. If you are on Windows and using [Powershell Gallery](https://www.powershellgallery.com/) package manager, you can install and update with:
|
||||
|
||||
Install-Script -Name install-kubectl -Scope CurrentUser -Force
|
||||
install-kubectl.ps1 [-DownloadLocation <path>]
|
||||
|
||||
If no Downloadlocation is specified, kubectl will be installed in users temp Directory
|
||||
2. The installer creates $HOME/.kube and instructs it to create a config file
|
||||
3. Updating
|
||||
re-run Install-Script to update the installer
|
||||
re-run install-kubectl.ps1 to install latest binaries
|
||||
|
||||
## Install with Chocolatey on Windows
|
||||
|
||||
1. If you are on Windows and using [Chocolatey](https://chocolatey.org) package manager, you can install with:
|
||||
|
||||
choco install kubernetes-cli
|
||||
|
||||
2. Run `kubectl version` to verify that the version you've installed is sufficiently up-to-date.
|
||||
3. Configure kubectl to use a remote Kubernetes cluster:
|
||||
|
||||
cd C:\users\yourusername (Or wherever your %HOME% directory is)
|
||||
mkdir .kube
|
||||
cd .kube
|
||||
New-Item config -type file
|
||||
|
||||
Edit the config file with a text editor of your choice, such as Notepad for example.
|
||||
|
||||
>>>>>>> merge master to 1.10, with fixes (#7682)
|
||||
## Configure kubectl
|
||||
|
||||
In order for kubectl to find and access a Kubernetes cluster, it needs a [kubeconfig file](/docs/tasks/access-application-cluster/configure-access-multiple-clusters/), which is created automatically when you create a cluster using kube-up.sh or successfully deploy a Minikube cluster. See the [getting started guides](/docs/setup/) for more about creating clusters. If you need access to a cluster you didn't create, see the [Sharing Cluster Access document](/docs/tasks/access-application-cluster/configure-access-multiple-clusters/).
|
||||
@@ -202,9 +322,17 @@ If you see a message similar to the following, kubectl is not correctly configur
|
||||
```shell
|
||||
The connection to the server <server-name:port> was refused - did you specify the right host or port?
|
||||
```
|
||||
<<<<<<< HEAD
|
||||
|
||||
For example, if you are intending to run a Kubernetes cluster on your laptop (locally), you will need a tool like minikube to be installed first and then re-run the commands stated above.
|
||||
|
||||
||||||| merged common ancestors
|
||||
=======
|
||||
|
||||
For example, if you are intending to run a Kubernetes cluster on your laptop (locally), you will need a tool like minikube to be installed first and then re-run the commands stated above.
|
||||
|
||||
|
||||
>>>>>>> merge master to 1.10, with fixes (#7682)
|
||||
If kubectl cluster-info returns the url response but you can't access your cluster, to check whether it is configured properly, use:
|
||||
|
||||
```shell
|
||||
|
||||
Reference in New Issue
Block a user