Merge branch 'master' of https://github.com/kubernetes/kubernetes.github.io into release-1.6
* 'master' of https://github.com/kubernetes/kubernetes.github.io: Updaated install-kubeadm.md, removed redundant kubectl installation (#4006) Add Chocolatey Package Manager for Windows (#4000) Make issue title automatically a link Update directions for macOS bash completion
This commit is contained in:
@@ -65,7 +65,7 @@
|
|||||||
(function(d,c,j){if(!document.getElementById(j)){var pd=d.createElement(c),s;pd.id=j;pd.src=('https:'==document.location.protocol)?'https://polldaddy.com/js/rating/rating.js':'http://i0.poll.fm/js/rating/rating.js';s=document.getElementsByTagName(c)[0];s.parentNode.insertBefore(pd,s);}}(document,'script','pd-rating-js'));
|
(function(d,c,j){if(!document.getElementById(j)){var pd=d.createElement(c),s;pd.id=j;pd.src=('https:'==document.location.protocol)?'https://polldaddy.com/js/rating/rating.js':'http://i0.poll.fm/js/rating/rating.js';s=document.getElementsByTagName(c)[0];s.parentNode.insertBefore(pd,s);}}(document,'script','pd-rating-js'));
|
||||||
</script>
|
</script>
|
||||||
<a href="" onclick="window.open('https://github.com/kubernetes/kubernetes.github.io/issues/new?title=Issue%20with%20' +
|
<a href="" onclick="window.open('https://github.com/kubernetes/kubernetes.github.io/issues/new?title=Issue%20with%20' +
|
||||||
window.location.pathname)" class="button issue">Create an Issue</a>
|
'k8s.io'+window.location.pathname)" class="button issue">Create an Issue</a>
|
||||||
<a href="/editdocs#{{ page.path }}" class="button issue">Edit this Page</a>
|
<a href="/editdocs#{{ page.path }}" class="button issue">Edit this Page</a>
|
||||||
{% endif %}
|
{% endif %}
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
@@ -63,7 +63,7 @@ For each machine:
|
|||||||
apt-get update
|
apt-get update
|
||||||
# Install docker if you don't have it already.
|
# Install docker if you don't have it already.
|
||||||
apt-get install -y docker-engine
|
apt-get install -y docker-engine
|
||||||
apt-get install -y kubelet kubeadm kubectl kubernetes-cni
|
apt-get install -y kubelet kubeadm kubernetes-cni
|
||||||
```
|
```
|
||||||
|
|
||||||
* If the machine is running CentOS, run:
|
* If the machine is running CentOS, run:
|
||||||
@@ -80,7 +80,7 @@ For each machine:
|
|||||||
https://packages.cloud.google.com/yum/doc/rpm-package-key.gpg
|
https://packages.cloud.google.com/yum/doc/rpm-package-key.gpg
|
||||||
EOF
|
EOF
|
||||||
setenforce 0
|
setenforce 0
|
||||||
yum install -y docker kubelet kubeadm kubectl kubernetes-cni
|
yum install -y docker kubelet kubeadm kubernetes-cni
|
||||||
systemctl enable docker && systemctl start docker
|
systemctl enable docker && systemctl start docker
|
||||||
systemctl enable kubelet && systemctl start kubelet
|
systemctl enable kubelet && systemctl start kubelet
|
||||||
```
|
```
|
||||||
|
|||||||
@@ -106,6 +106,22 @@ brew install kubectl
|
|||||||
```
|
```
|
||||||
2. Run `kubectl version` to verify that the verison you've installed is sufficiently up-to-date.
|
2. Run `kubectl version` to verify that the verison you've installed is sufficiently up-to-date.
|
||||||
|
|
||||||
|
## Install with Chocolatey on Windows
|
||||||
|
|
||||||
|
1. If you are on Windows and using [Chocolatey](https://chocolatey.org) package manager, you can install with:
|
||||||
|
```shell
|
||||||
|
choco install kubernetes-cli
|
||||||
|
```
|
||||||
|
2. Run `kubectl version` to verify that the verison you've installed is sufficiently up-to-date.
|
||||||
|
3. Configure kubectl to use a remote kubernetes cluster:
|
||||||
|
```shell
|
||||||
|
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.
|
||||||
|
|
||||||
## Configuring kubectl
|
## Configuring kubectl
|
||||||
|
|
||||||
In order for kubectl to find and access a Kubernetes cluster, it needs a [kubeconfig file](/docs/concepts/cluster-administration/authenticate-across-clusters-kubeconfig/), 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/getting-started-guides/) for more about creating clusters. If you need access to a cluster you didn't create, see the [Sharing Cluster Access document](/docs/tasks/administer-cluster/share-configuration/).
|
In order for kubectl to find and access a Kubernetes cluster, it needs a [kubeconfig file](/docs/concepts/cluster-administration/authenticate-across-clusters-kubeconfig/), 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/getting-started-guides/) for more about creating clusters. If you need access to a cluster you didn't create, see the [Sharing Cluster Access document](/docs/tasks/administer-cluster/share-configuration/).
|
||||||
@@ -142,28 +158,29 @@ echo "source <(kubectl completion bash)" >> ~/.bashrc
|
|||||||
```
|
```
|
||||||
|
|
||||||
### On macOS, using bash
|
### On macOS, using bash
|
||||||
On macOS, autocompletion works if you install using `brew install kubectl`,
|
On macOS, you will need to install bash-completion support via [Homebrew](https://brew.sh/) first:
|
||||||
and not if you downloaded kubectl directly.
|
|
||||||
|
|
||||||
Install the bash-completion support:
|
|
||||||
|
|
||||||
```shell
|
```shell
|
||||||
|
## If running Bash 3.2 included with macOS
|
||||||
brew install bash-completion
|
brew install bash-completion
|
||||||
|
## or, if running Bash 4.1+
|
||||||
|
bash install bash-completion@2
|
||||||
```
|
```
|
||||||
|
|
||||||
To add kubectl autocompletion to your current shell, run:
|
Follow the "caveats" section of brew's output to add the appropriate bash completion path to your local .bashrc.
|
||||||
|
|
||||||
```shell
|
If you've installed kubectl using the [Homebrew instructions](#install-with-homebrew-on-macos) then kubectl completion should start working immediately.
|
||||||
source $(brew --prefix)/etc/bash_completion
|
|
||||||
source <(kubectl completion bash)
|
If you have installed kubectl manually, then run: `source <(kubectl completion bash)`
|
||||||
```
|
|
||||||
|
|
||||||
To add kubectl autocompletion to your profile (so it is automatically loaded in future shells):
|
To add kubectl autocompletion to your profile (so it is automatically loaded in future shells):
|
||||||
|
|
||||||
```shell
|
```shell
|
||||||
echo "source $(brew --prefix)/etc/bash_completion" >> ~/.bash_profile
|
|
||||||
echo "source <(kubectl completion bash)" >> ~/.bash_profile
|
echo "source <(kubectl completion bash)" >> ~/.bash_profile
|
||||||
```
|
```
|
||||||
|
|
||||||
|
The Homebrew project is independent from kubernetes, so the bash-completion packages are not guaranteed to work.
|
||||||
|
|
||||||
{% endcapture %}
|
{% endcapture %}
|
||||||
{% capture whatsnext %}
|
{% capture whatsnext %}
|
||||||
[Learn how to launch and expose your application.](/docs/user-guide/quick-start)
|
[Learn how to launch and expose your application.](/docs/user-guide/quick-start)
|
||||||
|
|||||||
Reference in New Issue
Block a user