Merge branch 'master' into mysql-statefulset
commit
4d4932bbf7
|
@ -159,11 +159,11 @@ node discovery; currently this is only Google Compute Engine, not including Core
|
|||
|
||||
### Upgrading to a different API version
|
||||
|
||||
When a new API version is released, you may need to upgrade a cluster to support the new API version (e.g. switching from 'v1' to 'v2' when 'v2' is launched)
|
||||
When a new API version is released, you may need to upgrade a cluster to support the new API version (e.g. switching from 'v1' to 'v2' when 'v2' is launched).
|
||||
|
||||
This is an infrequent event, but it requires careful management. There is a sequence of steps to upgrade to a new API version.
|
||||
|
||||
1. Turn on the new api version.
|
||||
1. Turn on the new API version.
|
||||
1. Upgrade the cluster's storage to use the new version.
|
||||
1. Upgrade all config files. Identify users of the old API version endpoints.
|
||||
1. Update existing objects in the storage to new version by running `cluster/update-storage-objects.sh`.
|
||||
|
@ -171,9 +171,9 @@ This is an infrequent event, but it requires careful management. There is a sequ
|
|||
|
||||
### Turn on or off an API version for your cluster
|
||||
|
||||
Specific API versions can be turned on or off by passing --runtime-config=api/<version> flag while bringing up the API server. For example: to turn off v1 API, pass `--runtime-config=api/v1=false`.
|
||||
Specific API versions can be turned on or off by passing `--runtime-config=api/<version>` flag while bringing up the API server. For example: to turn off v1 API, pass `--runtime-config=api/v1=false`.
|
||||
runtime-config also supports 2 special keys: api/all and api/legacy to control all and legacy APIs respectively.
|
||||
For example, for turning off all api versions except v1, pass `--runtime-config=api/all=false,api/v1=true`.
|
||||
For example, for turning off all API versions except v1, pass `--runtime-config=api/all=false,api/v1=true`.
|
||||
For the purposes of these flags, _legacy_ APIs are those APIs which have been explicitly deprecated (e.g. `v1beta3`).
|
||||
|
||||
### Switching your cluster's storage API version
|
||||
|
|
|
@ -7,7 +7,7 @@ title: Configuring kubelet Garbage Collection
|
|||
* TOC
|
||||
{:toc}
|
||||
|
||||
Garbage collection is a helpful function of kubelet that will clean up unused images and unused containers. kubelet will perform garbage collection for containers every minute and garbage collection for images every five minutes.
|
||||
Garbage collection is a helpful function of kubelet that will clean up unused images and unused containers. Kubelet will perform garbage collection for containers every minute and garbage collection for images every five minutes.
|
||||
|
||||
External garbage collection tools are not recommended as these tools can potentially break the behavior of kubelet by removing containers expected to exist.
|
||||
|
||||
|
|
|
@ -61,7 +61,7 @@ project](/docs/admin/salt).
|
|||
* **DNS Integration with SkyDNS** ([dns.md](/docs/admin/dns)):
|
||||
Resolving a DNS name directly to a Kubernetes service.
|
||||
|
||||
* [**Cluster-level logging**](/docs/user-guide/logging/overview)
|
||||
* [**Cluster-level logging**](/docs/user-guide/logging/overview):
|
||||
Saving container logs to a central log store with search/browsing interface.
|
||||
|
||||
## Multi-tenant support
|
||||
|
|
|
@ -23,7 +23,7 @@ to 512MB of memory. The cluster operator creates a separate namespace for each
|
|||
each namespace.
|
||||
3. Users may create a pod which consumes resources just below the capacity of a machine. The left over space
|
||||
may be too small to be useful, but big enough for the waste to be costly over the entire cluster. As a result,
|
||||
the cluster operator may want to set limits that a pod must consume at least 20% of the memory and cpu of their
|
||||
the cluster operator may want to set limits that a pod must consume at least 20% of the memory and CPU of their
|
||||
average node size in order to provide for more uniform scheduling and to limit waste.
|
||||
|
||||
This example demonstrates how limits can be applied to a Kubernetes [namespace](/docs/admin/namespaces/walkthrough/) to control
|
||||
|
@ -101,7 +101,7 @@ The limits enumerated in a namespace are only enforced when a pod is created or
|
|||
the cluster. If you change the limits to a different value range, it does not affect pods that
|
||||
were previously created in a namespace.
|
||||
|
||||
If a resource (cpu or memory) is being restricted by a limit, the user will get an error at time
|
||||
If a resource (CPU or memory) is being restricted by a limit, the user will get an error at time
|
||||
of creation explaining why.
|
||||
|
||||
Let's first spin up a [Deployment](/docs/user-guide/deployments) that creates a single container Pod to demonstrate
|
||||
|
@ -145,9 +145,9 @@ spec:
|
|||
volumeMounts:
|
||||
```
|
||||
|
||||
Note that our nginx container has picked up the namespace default cpu and memory resource *limits* and *requests*.
|
||||
Note that our nginx container has picked up the namespace default CPU and memory resource *limits* and *requests*.
|
||||
|
||||
Let's create a pod that exceeds our allowed limits by having it have a container that requests 3 cpu cores.
|
||||
Let's create a pod that exceeds our allowed limits by having it have a container that requests 3 CPU cores.
|
||||
|
||||
```shell
|
||||
$ kubectl create -f docs/admin/limitrange/invalid-pod.yaml --namespace=limit-example
|
||||
|
|
|
@ -87,6 +87,7 @@ a *Namespace*.
|
|||
See [Admission control: Limit Range](https://github.com/kubernetes/kubernetes/blob/{{page.githubbranch}}/docs/design/admission_control_limit_range.md)
|
||||
|
||||
A namespace can be in one of two phases:
|
||||
|
||||
* `Active` the namespace is in use
|
||||
* `Terminating` the namespace is being deleted, and can not be used for new objects
|
||||
|
||||
|
|
|
@ -63,7 +63,7 @@ Create the development namespace using kubectl.
|
|||
$ kubectl create -f docs/admin/namespaces/namespace-dev.json
|
||||
```
|
||||
|
||||
And then lets create the production namespace using kubectl.
|
||||
And then let's create the production namespace using kubectl.
|
||||
|
||||
```shell
|
||||
$ kubectl create -f docs/admin/namespaces/namespace-prod.json
|
||||
|
|
|
@ -1,8 +1,8 @@
|
|||
---
|
||||
assignees:
|
||||
- dlorenc
|
||||
- janetkuo
|
||||
- jlowdermilk
|
||||
- r2d4
|
||||
- aaron-prindle
|
||||
title: Running Kubernetes Locally via Minikube
|
||||
---
|
||||
|
||||
|
@ -31,19 +31,7 @@ Minikube is a tool that makes it easy to run Kubernetes locally. Minikube runs a
|
|||
* Linux
|
||||
* [VirtualBox](https://www.virtualbox.org/wiki/Downloads) or [KVM](http://www.linux-kvm.org/) installation,
|
||||
* VT-x/AMD-v virtualization must be enabled in BIOS
|
||||
* `kubectl` must be on your path. To install kubectl:
|
||||
|
||||
**Kubectl for Linux/amd64**
|
||||
|
||||
```
|
||||
curl -Lo kubectl http://storage.googleapis.com/kubernetes-release/release/{{page.version}}/bin/linux/amd64/kubectl && chmod +x kubectl && sudo mv kubectl /usr/local/bin/
|
||||
```
|
||||
|
||||
**Kubectl for OS X/amd64**
|
||||
|
||||
```
|
||||
curl -Lo kubectl http://storage.googleapis.com/kubernetes-release/release/{{page.version}}/bin/darwin/amd64/kubectl && chmod +x kubectl && sudo mv kubectl /usr/local/bin/
|
||||
```
|
||||
* `kubectl` See the [kubectl installation instructions](/docs/getting-started-guides/kubectl/) for more details.
|
||||
|
||||
### Instructions
|
||||
|
||||
|
@ -175,7 +163,7 @@ This flag is repeated, so you can pass it several times with several different v
|
|||
This flag takes a string of the form `component.key=value`, where `component` is one of the strings from the above list, `key` is a value on the
|
||||
configuration struct and `value` is the value to set.
|
||||
|
||||
Valid `key`s can be found by examining the documentation for the Kubernetes `componentconfigs` for each component.
|
||||
Valid `key`s can be found by examining the documentation for the Kubernetes `componentconfigs` for each component.
|
||||
Here is the documentation for each supported configuration:
|
||||
|
||||
* [kubelet](https://godoc.org/k8s.io/kubernetes/pkg/apis/componentconfig#KubeletConfiguration)
|
||||
|
@ -191,7 +179,7 @@ To change the `MaxPods` setting to 5 on the Kubelet, pass this flag: `--extra-co
|
|||
|
||||
This feature also supports nested structs. To change the `LeaderElection.LeaderElect` setting to `true` on the scheduler, pass this flag: `--extra-config=scheduler.LeaderElection.LeaderElect=true`.
|
||||
|
||||
To set the `AuthorizationMode` on the `apiserver` to `RBAC`, you can use: `--extra-config=apiserver.AuthorizationMode=RBAC`.
|
||||
To set the `AuthorizationMode` on the `apiserver` to `RBAC`, you can use: `--extra-config=apiserver.AuthorizationMode=RBAC`.
|
||||
|
||||
### Stopping a Cluster
|
||||
The [minikube stop](https://github.com/kubernetes/minikube/blob/master/docs/minikube_stop.md) command can be used to stop your cluster.
|
||||
|
|
|
@ -9,7 +9,7 @@ There are multiple ways to run a Kubernetes cluster with Ubuntu. These pages exp
|
|||
{% capture body %}
|
||||
## Official Ubuntu Guides
|
||||
|
||||
- [The Canonical Distribution of Kubernetes](/docs/getting-started-guides/ubuntu)
|
||||
- [The Canonical Distribution of Kubernetes](https://www.ubuntu.com/cloud/kubernetes)
|
||||
|
||||
Supports AWS, GCE, Azure, Joyent, OpenStack, Bare Metal and local workstation deployment.
|
||||
|
||||
|
|
|
@ -24,7 +24,7 @@ single thing, typically by giving a short sequence of steps.
|
|||
* [Distributing Credentials Securely](/docs/tasks/configure-pod-container/distribute-credentials-secure/)
|
||||
* [Pulling an Image from a Private Registry](/docs/tasks/configure-pod-container/pull-image-private-registry/)
|
||||
* [Configuring Liveness and Readiness Probes](/docs/tasks/configure-pod-container/configure-liveness-readiness-probes/)
|
||||
* [Communicating Between Pods Running in the Same Container](/docs/tasks/configure-pod-container/communicate-containers-same-pod/)
|
||||
* [Communicating Between Containers Running in the Same Pod](/docs/tasks/configure-pod-container/communicate-containers-same-pod/)
|
||||
* [Configuring Pod Initialization](/docs/tasks/configure-pod-container/configure-pod-initialization/)
|
||||
* [Attaching Handlers to Container Lifecycle Events](/docs/tasks/configure-pod-container/attach-handler-lifecycle-event/)
|
||||
|
||||
|
|
|
@ -122,17 +122,16 @@ runner (Docker or rkt).
|
|||
When using Docker:
|
||||
|
||||
- The `spec.containers[].resources.requests.cpu` is converted to its core value (potentially fractional),
|
||||
and multiplied by 1024, and used as the value of the [`--cpu-shares`](
|
||||
https://docs.docker.com/reference/run/#runtime-constraints-on-resources) flag to the `docker run`
|
||||
command.
|
||||
and multiplied by 1024, and used as the value of the [`--cpu-shares`](https://docs.docker.com/engine/reference/run/#/cpu-share-constraint)
|
||||
flag to the `docker run` command.
|
||||
- The `spec.containers[].resources.limits.cpu` is converted to its millicore value,
|
||||
multiplied by 100000, and then divided by 1000, and used as the value of the [`--cpu-quota`](
|
||||
https://docs.docker.com/reference/run/#runtime-constraints-on-resources) flag to the `docker run`
|
||||
https://docs.docker.com/engine/reference/run/#/cpu-quota-constraint) flag to the `docker run`
|
||||
command. The [`--cpu-period`] flag is set to 100000 which represents the default 100ms period
|
||||
for measuring quota usage. The kubelet enforces cpu limits if it was started with the
|
||||
[`--cpu-cfs-quota`] flag set to true. As of version 1.2, this flag will now default to true.
|
||||
- The `spec.containers[].resources.limits.memory` is converted to an integer, and used as the value
|
||||
of the [`--memory`](https://docs.docker.com/reference/run/#runtime-constraints-on-resources) flag
|
||||
of the [`--memory`](https://docs.docker.com/engine/reference/run/#/user-memory-constraints) flag
|
||||
to the `docker run` command.
|
||||
|
||||
**TODO: document behavior for rkt**
|
||||
|
@ -362,7 +361,7 @@ such as [EmptyDir volumes](/docs/user-guide/volumes/#emptydir).
|
|||
|
||||
The current system only supports container requests and limits for CPU and Memory.
|
||||
It is planned to add new resource types, including a node disk space
|
||||
resource, and a framework for adding custom [resource types](https://github.com/kubernetes/kubernetes/blob/{{page.githubbranch}}/docs/design/resources.md#resource-types).
|
||||
resource, and a framework for adding custom [resource types](https://github.com/kubernetes/community/blob/{{page.githubbranch}}/contributors/design-proposals/resources.md).
|
||||
|
||||
Kubernetes supports overcommitment of resources by supporting multiple levels of [Quality of Service](http://issue.k8s.io/168).
|
||||
|
||||
|
|
|
@ -37,13 +37,15 @@ Once we have the control plane setup, we can start creating federation API
|
|||
resources.
|
||||
The following guides explain some of the resources in detail:
|
||||
|
||||
* [ConfigMap](/docs/user-guide/federation/configmap/)
|
||||
* [DaemonSets](/docs/user-guide/federation/daemonsets/)
|
||||
* [Deployment](/docs/user-guide/federation/deployment/)
|
||||
* [Events](/docs/user-guide/federation/events/)
|
||||
* [Ingress](/docs/user-guide/federation/federated-ingress/)
|
||||
* [Namespaces](/docs/user-guide/federation/namespaces/)
|
||||
* [ReplicaSets](/docs/user-guide/federation/replicasets/)
|
||||
* [Secrets](/docs/user-guide/federation/secrets/)
|
||||
* [Services](/docs/user-guide/federation/federated-services/)
|
||||
<!-- TODO: Add more guides here -->
|
||||
|
||||
[API reference docs](/docs/federation/api-reference/) lists all the
|
||||
resources supported by federation apiserver.
|
||||
|
|
|
@ -27,7 +27,7 @@ You can set up owner-dependent relationships among other objects by manually set
|
|||
|
||||
When deleting an object, you can request the GC to ***asynchronously*** delete its dependents by ***explicitly*** specifying `deleteOptions.orphanDependents=false` in the deletion request that you send to the API server. A 200 OK response from the API server indicates the owner is deleted.
|
||||
|
||||
In Kubernetes version 1.5, synchronous garbage collection is under active development. See the [tracking [issue](https://github.com/kubernetes/kubernetes/issues/29891) for more details.
|
||||
In Kubernetes version 1.5, synchronous garbage collection is under active development. See the tracking [issue](https://github.com/kubernetes/kubernetes/issues/29891) for more details.
|
||||
|
||||
If you specify `deleteOptions.orphanDependents=true`, or leave it blank, then the GC will first reset the `ownerReferences` in the dependents, then delete the owner. Note that the deletion of the owner object is asynchronous, that is, a 200 OK response will be sent by the API server before the owner object gets deleted.
|
||||
|
||||
|
|
|
@ -200,7 +200,7 @@ $ kubectl logs my-pod # dump pod logs (stdout)
|
|||
$ kubectl logs -f my-pod # stream pod logs (stdout)
|
||||
$ kubectl run -i --tty busybox --image=busybox -- sh # Run pod as interactive shell
|
||||
$ kubectl attach my-pod -i # Attach to Running Container
|
||||
$ kubectl port-forward my-pod 5000 6000 # Forward port 6000 of Pod to your to 5000 on your local machine
|
||||
$ kubectl port-forward my-pod 5000:6000 # Forward port 6000 of Pod to your to 5000 on your local machine
|
||||
$ kubectl port-forward my-svc 6000 # Forward port to service
|
||||
$ kubectl exec my-pod -- ls / # Run command in existing pod (1 container case)
|
||||
$ kubectl exec my-pod -c my-container -- ls / # Run command in existing pod (multi-container case)
|
||||
|
|
|
@ -20,7 +20,7 @@ the next one is started. If the init container fails, Kubernetes will restart
|
|||
the pod until the init container succeeds. If a pod is marked as `RestartNever`,
|
||||
the pod will fail if the init container fails.
|
||||
|
||||
You specify a container as an init container by adding an annotation
|
||||
You specify a container as an init container by adding an annotation.
|
||||
The annotation key is `pod.beta.kubernetes.io/init-containers`. The annotation
|
||||
value is a JSON array of [objects of type `v1.Container`
|
||||
](http://kubernetes.io/docs/api-reference/v1/definitions/#_v1_container)
|
||||
|
@ -155,7 +155,7 @@ reasons:
|
|||
|
||||
* An init container image is changed by a user updating the Pod Spec.
|
||||
* App container image changes only restart the app container.
|
||||
* The pod infrastructure container is restarted
|
||||
* The pod infrastructure container is restarted.
|
||||
* This is uncommon and would have to be done by someone with root access to nodes.
|
||||
* All containers in a pod are terminated, requiring a restart (RestartPolicyAlways) AND the record of init container completion has been lost due to garbage collection.
|
||||
|
||||
|
|
|
@ -42,9 +42,9 @@ The UI can _only_ be accessed from the machine where the command is executed. Se
|
|||
You may access the UI directly via the Kubernetes master apiserver. Open a browser and navigate to `https://<kubernetes-master>/ui`, where `<kubernetes-master>` is IP address or domain name of the Kubernetes
|
||||
master.
|
||||
|
||||
Please note, this works only if the apiserver is set up to allow authentication with username and password. This is not currently the case with the some setup tools (e.g., `kubeadm`). Refer to the [authentication admin documentation](/docs/admin/authentication/) for information on how to configure authentication manually.
|
||||
Please note, this works only if the apiserver is set up to allow authentication with username and password. This is not currently the case with some setup tools (e.g., `kubeadm`). Refer to the [authentication admin documentation](/docs/admin/authentication/) for information on how to configure authentication manually.
|
||||
|
||||
If the username and password is configured but unknown to you, then use `kubectl config view` to find it.
|
||||
If the username and password are configured but unknown to you, then use `kubectl config view` to find it.
|
||||
|
||||
## Welcome view
|
||||
|
||||
|
|
Loading…
Reference in New Issue