* 'master' of https://github.com/kubernetes/kubernetes.github.io: (32 commits)
  Fixed broken link to Pods concept documentation (#5223)
  Update some docs in /cn/docs (#4842)
  Update deployment.md
  fix the command output
  Translate into chinese about NetworkPolicy
  rootsongjc-pr-20170815
  fix typo
  fix the command output
  Translate into chinese about GPU
  index-pr-2017-08-15
  Example links use kubernetes/examples
  Make caret for version drop-down more visible
  fix typo:ConfigMap
  fix the command output
  Fixed incorrect links for YAML files
  Clean up the index page.
  Remove broken link.
  Update pod names to match what's in the spec.
  Update daemonset.md
  Update configure-aggregation-layer.md
  ...
This commit is contained in:
Andrew Chen
2017-09-01 17:20:29 -07:00
170 changed files with 7319 additions and 156 deletions
@@ -23,7 +23,7 @@ Check the location and credentials that kubectl knows about with this command:
$ kubectl config view
```
Many of the [examples](https://github.com/kubernetes/kubernetes/tree/{{page.githubbranch}}/examples/) provide an introduction to using
Many of the [examples](https://github.com/kubernetes/examples/tree/{{page.githubbranch}}/) provide an introduction to using
kubectl and complete documentation is found in the [kubectl manual](/docs/user-guide/kubectl/index).
### Directly accessing the REST API
@@ -172,7 +172,7 @@ From within a pod the recommended ways to connect to API are:
process within a container. This proxies the
Kubernetes API to the localhost interface of the pod, so that other processes
in any container of the pod can access it. See this [example of using kubectl proxy
in a pod](https://github.com/kubernetes/kubernetes/tree/{{page.githubbranch}}/examples/kubectl-container/).
in a pod](https://github.com/kubernetes/examples/tree/{{page.githubbranch}}/staging/kubectl-container/).
- use the Go client library, and create a client using the `rest.InClusterConfig()` and `kubernetes.NewForConfig()` functions.
They handle locating and authenticating to the apiserver. [example](https://git.k8s.io/client-go/examples/in-cluster-client-configuration/main.go)
@@ -66,14 +66,14 @@ provides load balancing for an application that has two running instances.
Name: example-service
Namespace: default
Labels: run=load-balancer-example
Annotations: <none>
Selector: run=load-balancer-example
Type: NodePort
IP: 10.32.0.16
Port: <unset> 8080/TCP
NodePort: <unset> 31496/TCP
Endpoints: 10.200.1.4:8080,10.200.2.5:8080
Session Affinity: None
No events.
Events: <none>
Make a note of the NodePort value for the service. For example,
in the preceding output, the NodePort value is 31496.
@@ -34,7 +34,7 @@ Enable the aggregation layer via the following kube-apiserver flags. They may ha
--proxy-client-cert-file=<path to aggregator proxy cert>
--proxy-client-key-file=<path to aggregator proxy key>
If you are not running kube-proxy on a host running the API server then you must make sure that the system is enabled with the following apiserver flag:
If you are not running kube-proxy on a host running the API server, then you must make sure that the system is enabled with the following apiserver flag:
--enable-aggregator-routing=true
@@ -31,7 +31,7 @@ Check the location and credentials that kubectl knows about with this command:
$ kubectl config view
```
Many of the [examples](https://github.com/kubernetes/kubernetes/tree/{{page.githubbranch}}/examples/) provide an introduction to using
Many of the [examples](https://github.com/kubernetes/examples/tree/{{page.githubbranch}}/) provide an introduction to using
kubectl. Complete documentation is found in the [kubectl manual](/docs/user-guide/kubectl/index).
### Directly accessing the REST API
@@ -194,7 +194,7 @@ From within a pod the recommended ways to connect to API are:
process within a container. This proxies the
Kubernetes API to the localhost interface of the pod, so that other processes
in any container of the pod can access it. See this [example of using kubectl proxy
in a pod](https://github.com/kubernetes/kubernetes/tree/{{page.githubbranch}}/examples/kubectl-container/).
in a pod](https://github.com/kubernetes/examples/tree/{{page.githubbranch}}/staging/kubectl-container/).
- use the Go client library, and create a client using the `rest.InClusterConfig()` and `kubernetes.NewForConfig()` functions.
They handle locating and authenticating to the apiserver. [example](https://git.k8s.io/client-go/examples/in-cluster-client-configuration/main.go)
@@ -123,7 +123,7 @@ kubectl create -f https://k8s.io/docs/tasks/administer-cluster/cpu-defaults-pod-
```
The output shows that the Container's CPU request is set to the value specified in the
Container's configuration file. The Container's CPU limit is set to 1 cpu, wh70cb02113b7c7cc1604d1951ef82e1c82850eef2ich is the
Container's configuration file. The Container's CPU limit is set to 1 cpu, which is the
default CPU limit for the namespace.
```
@@ -103,7 +103,7 @@ kubectl create -f https://k8s.io/docs/tasks/administer-cluster/memory-defaults-p
View detailed information about the Pod:
```shell
kubectl get pod mem-limit-no-request --output=yaml --namespace=default-mem-example
kubectl get pod default-mem-demo-2 --output=yaml --namespace=default-mem-example
```
The output shows that the Container's memory request is set to match its memory limit.
@@ -133,7 +133,7 @@ kubectl create -f https://k8s.io/docs/tasks/administer-cluster/memory-defaults-p
View the Pod's specification:
```shell
kubectl get pod default-mem-request-no-limit --output=yaml --namespace=default-mem-example
kubectl get pod default-mem-demo-3 --output=yaml --namespace=default-mem-example
```
The output shows that the Container's memory request is set to the value specified in the
@@ -62,6 +62,7 @@ Namespace: default
Node: kubernetes-node-wul5/10.240.0.9
Start Time: Thu, 24 Mar 2016 01:39:49 +0000
Labels: app=nginx,pod-template-hash=1006230814
Annotations: kubernetes.io/created-by={"kind":"SerializedReference","apiVersion":"v1","reference":{"kind" :"ReplicaSet","namespace":"default","name":"nginx-deployment-1956810328","uid":"14e607e7-8ba1-11e7-b5cb-fa16 ...
Status: Running
IP: 10.244.0.6
Controllers: ReplicaSet/nginx-deployment-1006230814
@@ -84,14 +85,22 @@ Containers:
Started: Thu, 24 Mar 2016 01:39:51 +0000
Ready: True
Restart Count: 0
Environment Variables:
Environment: <none>
Mounts:
/var/run/secrets/kubernetes.io/serviceaccount from default-token-5kdvl (ro)
Conditions:
Type Status
Ready True
Type Status
Initialized True
Ready True
PodScheduled True
Volumes:
default-token-4bcbi:
Type: Secret (a volume populated by a Secret)
SecretName: default-token-4bcbi
Optional: false
QoS Class: Guaranteed
Node-Selectors: <none>
Tolerations: <none>
Events:
FirstSeen LastSeen Count From SubobjectPath Type Reason Message
--------- -------- ----- ---- ------------- -------- ------ -------
@@ -53,7 +53,7 @@ Stackdriver Logging agents to the running cluster.
that don't have fluentd pod allocated already. You can ensure that your node is labelled
properly by running `kubectl describe` as follows:
```shell
```
kubectl describe node $NODE_NAME
```
@@ -69,7 +69,7 @@ Stackdriver Logging agents to the running cluster.
Ensure that the output contains the label `beta.kubernetes.io/fluentd-ds-ready=true`. If it
is not present, you can add it using the `kubectl label` command as follows:
```shell
```
kubectl label node $NODE_NAME beta.kubernetes.io/fluentd-ds-ready=true
```
@@ -79,7 +79,7 @@ Stackdriver Logging agents to the running cluster.
1. Deploy a `ConfigMap` with the logging agent configuration by running the following command:
```shell
```
kubectl create -f https://k8s.io/docs/tasks/debug-application-cluster/fluentd-gcp-configmap.yaml
```
@@ -88,7 +88,7 @@ Stackdriver Logging agents to the running cluster.
1. Deploy the logging agent `DaemonSet` by running the following command:
```shell
```
kubectl create -f https://k8s.io/docs/tasks/debug-application-cluster/fluentd-gcp-ds.yaml
```
@@ -31,7 +31,7 @@ Here is an overview of the steps in this example:
## Starting Redis
For this example, for simplicity, we will start a single instance of Redis.
See the [Redis Example](https://git.k8s.io/kubernetes/examples/guestbook) for an example
See the [Redis Example](https://github.com/kubernetes/examples/tree/master/guestbook) for an example
of deploying Redis scalably and redundantly.
Start a temporary Pod running Redis and a service so we can find it.
@@ -62,7 +62,7 @@ Create the ConfigMap from the following YAML configuration file:
kubectl create -f https://k8s.io/docs/tasks/run-application/mysql-configmap.yaml
```
{% include code.html language="yaml" file="mysql-configmap.yaml" ghlink="/docs/tutorials/run-application/mysql-configmap.yaml" %}
{% include code.html language="yaml" file="mysql-configmap.yaml" ghlink="/docs/tasks/run-application/mysql-configmap.yaml" %}
This ConfigMap provides `my.cnf` overrides that let you independently control
configuration on the MySQL master and slaves.
@@ -82,7 +82,7 @@ Create the Services from the following YAML configuration file:
kubectl create -f https://k8s.io/docs/tasks/run-application/mysql-services.yaml
```
{% include code.html language="yaml" file="mysql-services.yaml" ghlink="/docs/tutorials/run-application/mysql-services.yaml" %}
{% include code.html language="yaml" file="mysql-services.yaml" ghlink="/docs/tasks/run-application/mysql-services.yaml" %}
The Headless Service provides a home for the DNS entries that the StatefulSet
controller creates for each Pod that's part of the set.
@@ -108,7 +108,7 @@ Finally, create the StatefulSet from the following YAML configuration file:
kubectl create -f https://k8s.io/docs/tasks/run-application/mysql-statefulset.yaml
```
{% include code.html language="yaml" file="mysql-statefulset.yaml" ghlink="/docs/tutorials/run-application/mysql-statefulset.yaml" %}
{% include code.html language="yaml" file="mysql-statefulset.yaml" ghlink="/docs/tasks/run-application/mysql-statefulset.yaml" %}
You can watch the startup progress by running:
@@ -95,10 +95,31 @@ for a secure solution.
Namespace: default
CreationTimestamp: Tue, 01 Nov 2016 11:18:45 -0700
Labels: app=mysql
Annotations: deployment.kubernetes.io/revision=1
Selector: app=mysql
Replicas: 1 updated | 1 total | 0 available | 1 unavailable
Replicas: 1 desired | 1 updated | 1 total | 0 available | 1 unavailable
StrategyType: Recreate
MinReadySeconds: 0
Pod Template:
Labels: app=mysql
Containers:
mysql:
Image: mysql:5.6
Port: 3306/TCP
Environment:
MYSQL_ROOT_PASSWORD: password
Mounts:
/var/lib/mysql from mysql-persistent-storage (rw)
Volumes:
mysql-persistent-storage:
Type: PersistentVolumeClaim (a reference to a PersistentVolumeClaim in the same namespace)
ClaimName: mysql-pv-claim
ReadOnly: false
Conditions:
Type Status Reason
---- ------ ------
Available False MinimumReplicasUnavailable
Progressing True ReplicaSetUpdated
OldReplicaSets: <none>
NewReplicaSet: mysql-63082529 (1/1 replicas created)
Events: