merge upstream master

This commit is contained in:
Zach Arnold
2018-09-24 21:41:24 -07:00
73 changed files with 1078 additions and 753 deletions
@@ -42,9 +42,9 @@ with the flag `--cluster-domain=<default-local-domain>`.
The DNS server supports forward lookups (A records), port lookups (SRV records), reverse IP address lookups (PTR records),
and more. For more information see [DNS for Services and Pods] (/docs/concepts/services-networking/dns-pod-service/).
When running a Pod, kubelet prepends the cluster DNS server and searches
paths to the node's DNS settings. If the node is able to resolve DNS names
specific to the larger environment, Pods should also be able to resolve.
If a Pod's `dnsPolicy` is set to "`default`", it inherits the name resolution
configuration from the node that the Pod runs on. The Pod's DNS resolution
should behave the same as the node.
But see [Known issues](/docs/tasks/administer-cluster/dns-debugging-resolution/#known-issues).
If you don't want this, or if you want a different DNS config for pods, you can
@@ -33,7 +33,7 @@ Verify that the weave works.
Enter the following command:
```shell
kubectl get po -n kube-system -o wide
kubectl get pods -n kube-system -o wide
```
The output is similar to this:
@@ -65,7 +65,7 @@ Kubernetes cluster but inside the same GCP region.
{{% capture prerequisites %}}
This document assumes that you have a running Kubernetes Cluster
Federation installation. If not, then see the
[federation admin guide](/docs/admin/federation/) to learn how to
[federation admin guide](/docs/tasks/federation/set-up-cluster-federation-kubefed/) to learn how to
bring up a cluster federation (or have your cluster administrator do
this for you). Other tutorials, for example
[this one](https://github.com/kelseyhightower/kubernetes-cluster-federation)
@@ -193,7 +193,7 @@ myregistrykey   kubernetes.io/.dockerconfigjson   1       1d
Next, modify the default service account for the namespace to use this secret as an imagePullSecret.
```shell
kubectl patch serviceaccount default -p '{\"imagePullSecrets\": [{\"name\": \"myregistrykey\"}]}'
kubectl patch serviceaccount default -p '{"imagePullSecrets": [{"name": "myregistrykey"}]}'
```
Interactive version requiring manual edit:
@@ -181,7 +181,7 @@ crictl exec -i -t 1f73f2d81bf98 ls
bin dev etc home proc root sys tmp usr var
```
### Get a coontainer's logs
### Get a container's logs
Get all container logs:
@@ -623,7 +623,7 @@ us know, so we can help investigate!
Contact us on
[Slack](/docs/troubleshooting/#slack) or
[email](https://groups.google.com/forum/#!forum/kubernetes-users) or
[Forum](https://discuss.kubernetes.io) or
[GitHub](https://github.com/kubernetes/kubernetes).
{{% /capture %}}
@@ -91,8 +91,10 @@ This video shows how to configure and run a Google Cloud Monitoring backed Heaps
### Dynatrace Kubernetes monitoring
With [Dynatrace Kubernetes monitoring](https://www.dynatrace.com/technologies/cloud-and-microservices/kubernetes-monitoring/), you can monitor application and cluster health in highly-dynamic Kubernetes environments.
With [Dynatrace Kubernetes monitoring](https://www.dynatrace.com/technologies/kubernetes-monitoring/), you can monitor application and cluster health in highly-dynamic Kubernetes environments.
Dynatrace automatically discovers all containers running on Kubernetes and presents you with a real-time view of all the connections between your containerized processes, hosts, and cloud instances. Dynatrace includes root cause analysis and the ability to replay problems to see how they evolved over time.
{{< figure src="/images/docs/dynatrace.png" alt="Dynatrace Kubernetes monitoring dashboard example" title="Dynatrace Kubernetes monitoring dashboard example" caption="This dashboard shows a Node overview." >}}
{{% /capture %}}
@@ -84,9 +84,9 @@ these channels for localized support and info:
- Spain: `#es-users`
- Turkey: `#tr-users`, `#tr-events`
### Mailing List
### Forum
The Kubernetes / Google Kubernetes Engine mailing list is [kubernetes-users@googlegroups.com](https://groups.google.com/forum/#!forum/kubernetes-users)
The Kubernetes Official Forum [discuss.kubernetes.io](https://discuss.kubernetes.io)
### Bugs and Feature requests
@@ -134,7 +134,7 @@ For example, `KUBECTL_PLUGINS_GLOBAL_FLAG_NAMESPACE`, `KUBECTL_PLUGINS_GLOBAL_FL
{{% capture whatsnext %}}
* Check the repository for [some more examples](https://github.com/kubernetes/kubernetes/tree/master/pkg/kubectl/plugins/examples) of plugins.
* Check the repository for [some more examples](https://github.com/kubernetes/kubernetes/tree/release-1.11/pkg/kubectl/plugins/examples) of plugins.
* In case of any questions, feel free to reach out to the [CLI SIG team](https://github.com/kubernetes/community/tree/master/sig-cli).
* Binary plugins is still an alpha feature, so this is the time to contribute ideas and improvements to the codebase. We're also excited to hear about what you're planning to implement with plugins, so [let us know](https://github.com/kubernetes/community/tree/master/sig-cli)!
@@ -22,7 +22,6 @@ This page shows how to delete Pods which are part of a stateful set, and explain
{{% capture steps %}}
## StatefulSet considerations
In normal operation of a StatefulSet, there is **never** a need to force delete a StatefulSet Pod. The StatefulSet controller is responsible for creating, scaling and deleting members of the StatefulSet. It tries to ensure that the specified number of Pods from ordinal 0 through N-1 are alive and ready. StatefulSet ensures that, at any time, there is at most one Pod with a given identity running in a cluster. This is referred to as *at most one* semantics provided by a StatefulSet.
@@ -79,8 +78,6 @@ Always perform force deletion of StatefulSet Pods carefully and with complete kn
{{% capture whatsnext %}}
Learn more about [debugging a StatefulSet](/docs/tasks/manage-stateful-set/debugging-a-statefulset/).
Learn more about [debugging a StatefulSet](/docs/tasks/debug-application-cluster/debug-stateful-set/).
{{% /capture %}}
@@ -13,29 +13,28 @@ weight: 50
---
{{% capture overview %}}
This page shows how to scale a StatefulSet.
This task shows how to scale a StatefulSet. Scaling a StatefulSet refers to increasing or decreasing the number of replicas.
{{% /capture %}}
{{% capture prerequisites %}}
* StatefulSets are only available in Kubernetes version 1.5 or later.
* **Not all stateful applications scale nicely.** You need to understand your StatefulSets well before continuing. If you're unsure, remember that it might not be safe to scale your StatefulSets.
* You should perform scaling only when you're sure that your stateful application
To check your version of Kubernetes, run `kubectl version`.
* Not all stateful applications scale nicely. If you are unsure about whether to scale your StatefulSets, see [StatefulSet concepts](/docs/concepts/workloads/controllers/statefulset/) or [StatefulSet tutorial](/docs/tutorials/stateful-application/basic-stateful-set/) for futher information.
* You should perform scaling only when you are confident that your stateful application
cluster is completely healthy.
{{% /capture %}}
{{% capture steps %}}
## Use `kubectl` to scale StatefulSets
## Scaling StatefulSets
Make sure you have `kubectl` upgraded to Kubernetes version 1.5 or later before
continuing. If you're unsure, run `kubectl version` and check `Client Version`
for which kubectl you're using.
### Use kubectl to scale StatefulSets
### `kubectl scale`
First, find the StatefulSet you want to scale. Remember, you need to first understand if you can scale it or not.
First, find the StatefulSet you want to scale.
```shell
kubectl get statefulsets <stateful-set-name>
@@ -47,7 +46,7 @@ Change the number of replicas of your StatefulSet:
kubectl scale statefulsets <stateful-set-name> --replicas=<new-replicas>
```
### Alternative: `kubectl apply` / `kubectl edit` / `kubectl patch`
### Make in-place updates on your StatefulSets
Alternatively, you can do [in-place updates](/docs/concepts/cluster-administration/manage-deployment/#in-place-updates-of-resources) on your StatefulSets.
@@ -72,32 +71,29 @@ kubectl patch statefulsets <stateful-set-name> -p '{"spec":{"replicas":<new-repl
## Troubleshooting
### Scaling down doesn't work right
### Scaling down does not work right
You cannot scale down a StatefulSet when any of the stateful Pods it manages is unhealthy. Scaling down only takes place
after those stateful Pods become running and ready.
With a StatefulSet of size > 1, if there is an unhealthy Pod, there is no way
for Kubernetes to know (yet) if it is due to a permanent fault or a transient
one (upgrade/maintenance/node reboot). If the Pod is unhealthy due to a permanent fault, scaling
If spec.replicas > 1, Kubernetes cannot determine the reason for an unhealthy Pod. It might be the result of a permanent fault or of a transient fault. A transient fault can be caused by a restart required by upgrading or maintenance.
If the Pod is unhealthy due to a permanent fault, scaling
without correcting the fault may lead to a state where the StatefulSet membership
drops below a certain minimum number of "replicas" that are needed to function
drops below a certain minimum number of replicas that are needed to function
correctly. This may cause your StatefulSet to become unavailable.
If the Pod is unhealthy due to a transient fault and the Pod might become available again,
the transient error may interfere with your scale-up/scale-down operation. Some distributed
the transient error may interfere with your scale-up or scale-down operation. Some distributed
databases have issues when nodes join and leave at the same time. It is better
to reason about scaling operations at the application level in these cases, and
perform scaling only when you're sure that your stateful application cluster is
perform scaling only when you are sure that your stateful application cluster is
completely healthy.
{{% /capture %}}
{{% capture whatsnext %}}
Learn more about [deleting a StatefulSet](/docs/tasks/manage-stateful-set/deleting-a-statefulset/).
* Learn more about [deleting a StatefulSet](/docs/tasks/run-application/delete-stateful-set/).
{{% /capture %}}
+11 -8
View File
@@ -99,8 +99,7 @@ If you are on macOS and using [Macports](https://macports.org/) package manager,
If you are on Windows and using [Powershell Gallery](https://www.powershellgallery.com/) package manager, you can install and update kubectl with Powershell.
To install:
* Run the installation commands (making sure to specify a DownloadLocation):
1. Run the installation commands (making sure to specify a `DownloadLocation`):
```
Install-Script -Name install-kubectl -Scope CurrentUser -Force
@@ -108,17 +107,21 @@ To install:
```
{{< note >}}
**Note:** If you do not specify a DownloadLocation, kubectl will be installed in the user's temp Directory.
**Note:** If you do not specify a `DownloadLocation`, `kubectl` will be installed in the user's temp Directory.
{{< /note >}}
The installer creates $HOME/.kube and instructs it to create a config file
To update:
* Run the update commands:
The installer creates `$HOME/.kube` and instructs it to create a config file
2. Test to ensure the version you installed is sufficiently up-to-date:
```
re-run Install-Script to update the installer
re-run install-kubectl.ps1 to install latest binaries
kubectl version
```
{{< note >}}
**Note:** Updating the installation is performed by rerunning the two commands listed in step 1.
{{< /note >}}
## Install with Chocolatey on Windows
If you are on Windows and using [Chocolatey](https://chocolatey.org) package manager, you can install kubectl with Chocolatey.