Merge branch 'master' into release-1.8

This commit is contained in:
steveperry-53
2017-08-21 17:02:22 -07:00
143 changed files with 948 additions and 832 deletions
+1
View File
@@ -146,6 +146,7 @@ toc:
- title: Install Network Policy Provider - title: Install Network Policy Provider
section: section:
- docs/tasks/administer-cluster/calico-network-policy.md - docs/tasks/administer-cluster/calico-network-policy.md
- docs/tasks/administer-cluster/cilium-network-policy.md
- docs/tasks/administer-cluster/romana-network-policy.md - docs/tasks/administer-cluster/romana-network-policy.md
- docs/tasks/administer-cluster/weave-network-policy.md - docs/tasks/administer-cluster/weave-network-policy.md
- docs/tasks/administer-cluster/change-pv-reclaim-policy.md - docs/tasks/administer-cluster/change-pv-reclaim-policy.md
+5 -4
View File
@@ -30,10 +30,11 @@ toc:
- docs/tutorials/kubernetes-basics/update-intro.html - docs/tutorials/kubernetes-basics/update-intro.html
- docs/tutorials/kubernetes-basics/update-interactive.html - docs/tutorials/kubernetes-basics/update-interactive.html
- title: Online Training Courses - title: Online Training Courses
section: Scalable Microservices with Kubernetes (Udacity) section:
path: https://www.udacity.com/course/scalable-microservices-with-kubernetes--ud615 - title: Scalable Microservices with Kubernetes (Udacity)
section: Introduction to Kubernetes (edX) path: https://www.udacity.com/course/scalable-microservices-with-kubernetes--ud615
path: https://www.edx.org/course/introduction-kubernetes-linuxfoundationx-lfs158x# - title: Introduction to Kubernetes (edX)
path: https://www.edx.org/course/introduction-kubernetes-linuxfoundationx-lfs158x#
- docs/tutorials/stateless-application/hello-minikube.md - docs/tutorials/stateless-application/hello-minikube.md
- title: Configuration - title: Configuration
section: section:
+4 -4
View File
@@ -7,11 +7,11 @@
关于更多的贡献信息,请参阅: 关于更多的贡献信息,请参阅:
* [贡献于 Kubernetes 文档](http://kubernetes.io/editdocs/) * [贡献于 Kubernetes 文档](http://kubernetes.io/editdocs/)
* [创建文档拉取请求](http://kubernetes.io/docs/contribute/create-pull-request/) * [创建文档拉取请求](http://kubernetes.io/docs/home/contribute/create-pull-request/)
* [写一个新的话题](http://kubernetes.io/docs/contribute/write-new-topic/) * [写一个新的话题](http://kubernetes.io/docs/contribute/write-new-topic/)
* [暂停您的文档更改](http://kubernetes.io/docs/contribute/stage-documentation-changes/) * [暂停您的文档更改](http://kubernetes.io/docs/home/contribute/stage-documentation-changes/)
* [更用页面模板](http://kubernetes.io/docs/contribute/page-templates/) * [更用页面模板](http://kubernetes.io/docs/home/contribute/page-templates/)
* [文档样式指南](http://kubernetes.io/docs/contribute/style-guide/) * [文档样式指南](http://kubernetes.io/docs/home/contribute/style-guide/)
## 谢谢您! ## 谢谢您!
+1 -1
View File
@@ -19,7 +19,7 @@ API server prior to persistence of the object, but after the request is authenti
and authorized. The plug-in code is in the API server process and authorized. The plug-in code is in the API server process
and must be compiled into the binary in order to be used at this time. and must be compiled into the binary in order to be used at this time.
Each admission control plug-in is run in sequence before a request is accepted into the cluster. If Each admission control plug-in runs in sequence before a request is accepted into the cluster. If
any of the plug-ins in the sequence reject the request, the entire request is rejected immediately any of the plug-ins in the sequence reject the request, the entire request is rejected immediately
and an error is returned to the end-user. and an error is returned to the end-user.
+15 -15
View File
@@ -722,23 +722,23 @@ Finally, add the following parameters into API server start parameters:
1. Download, unpack, and initialize the patched version of easyrsa3. 1. Download, unpack, and initialize the patched version of easyrsa3.
curl -L -O https://storage.googleapis.com/kubernetes-release/easy-rsa/easy-rsa.tar.gz curl -L -O https://storage.googleapis.com/kubernetes-release/easy-rsa/easy-rsa.tar.gz
tar xzf easy-rsa.tar.gz tar xzf easy-rsa.tar.gz
cd easy-rsa-master/easyrsa3 cd easy-rsa-master/easyrsa3
./easyrsa init-pki ./easyrsa init-pki
1. Generate a CA. (`--batch` set automatic mode. `--req-cn` default CN to use.) 1. Generate a CA. (`--batch` set automatic mode. `--req-cn` default CN to use.)
./easyrsa --batch "--req-cn=${MASTER_IP}@`date +%s`" build-ca nopass ./easyrsa --batch "--req-cn=${MASTER_IP}@`date +%s`" build-ca nopass
1. Generate server certificate and key. 1. Generate server certificate and key.
(build-server-full [filename]: Generate a keypair and sign locally for a client or server) (build-server-full [filename]: Generate a keypair and sign locally for a client or server)
./easyrsa --subject-alt-name="IP:${MASTER_IP}" build-server-full server nopass ./easyrsa --subject-alt-name="IP:${MASTER_IP}" build-server-full server nopass
1. Copy `pki/ca.crt`, `pki/issued/server.crt`, and `pki/private/server.key` to your directory. 1. Copy `pki/ca.crt`, `pki/issued/server.crt`, and `pki/private/server.key` to your directory.
1. Fill in and add the following parameters into the API server start parameters: 1. Fill in and add the following parameters into the API server start parameters:
--client-ca-file=/yourdirectory/ca.crt --client-ca-file=/yourdirectory/ca.crt
--tls-cert-file=/yourdirectory/server.crt --tls-cert-file=/yourdirectory/server.crt
--tls-private-key-file=/yourdirectory/server.key --tls-private-key-file=/yourdirectory/server.key
#### openssl #### openssl
@@ -746,22 +746,22 @@ Finally, add the following parameters into API server start parameters:
1. Generate a ca.key with 2048bit: 1. Generate a ca.key with 2048bit:
openssl genrsa -out ca.key 2048 openssl genrsa -out ca.key 2048
1. According to the ca.key generate a ca.crt (use -days to set the certificate effective time): 1. According to the ca.key generate a ca.crt (use -days to set the certificate effective time):
openssl req -x509 -new -nodes -key ca.key -subj "/CN=${MASTER_IP}" -days 10000 -out ca.crt openssl req -x509 -new -nodes -key ca.key -subj "/CN=${MASTER_IP}" -days 10000 -out ca.crt
1. Generate a server.key with 2048bit 1. Generate a server.key with 2048bit
openssl genrsa -out server.key 2048 openssl genrsa -out server.key 2048
1. According to the server.key generate a server.csr: 1. According to the server.key generate a server.csr:
openssl req -new -key server.key -subj "/CN=${MASTER_IP}" -out server.csr openssl req -new -key server.key -subj "/CN=${MASTER_IP}" -out server.csr
1. According to the ca.key, ca.crt and server.csr generate the server.crt: 1. According to the ca.key, ca.crt and server.csr generate the server.crt:
openssl x509 -req -in server.csr -CA ca.crt -CAkey ca.key -CAcreateserial -out server.crt -days 10000 openssl x509 -req -in server.csr -CA ca.crt -CAkey ca.key -CAcreateserial -out server.crt -days 10000
1. View the certificate. 1. View the certificate.
openssl x509 -noout -text -in ./server.crt openssl x509 -noout -text -in ./server.crt
Finally, do not forget to fill out and add the same parameters into the API server start parameters. Finally, do not forget to fill out and add the same parameters into the API server start parameters.
+2 -1
View File
@@ -648,7 +648,7 @@ Grants a `ClusterRole` across the entire cluster, including all namespaces. Exam
`kubectl create clusterrolebinding myapp-view-binding --clusterrole=view --serviceaccount=acme:myapp` `kubectl create clusterrolebinding myapp-view-binding --clusterrole=view --serviceaccount=acme:myapp`
See the CLI help for detailed usage See the CLI help for detailed usage.
## Service Account Permissions ## Service Account Permissions
@@ -692,6 +692,7 @@ In order from most secure to least secure, the approaches are:
Many [add-ons](/docs/concepts/cluster-administration/addons/) currently run as the "default" service account in the "kube-system" namespace. Many [add-ons](/docs/concepts/cluster-administration/addons/) currently run as the "default" service account in the "kube-system" namespace.
To allow those add-ons to run with super-user access, grant cluster-admin permissions to the "default" service account in the "kube-system" namespace. To allow those add-ons to run with super-user access, grant cluster-admin permissions to the "default" service account in the "kube-system" namespace.
NOTE: Enabling this means the "kube-system" namespace contains secrets that grant super-user access to the API. NOTE: Enabling this means the "kube-system" namespace contains secrets that grant super-user access to the API.
```shell ```shell
+1 -1
View File
@@ -5,7 +5,7 @@ metadata:
spec: spec:
hostNetwork: true hostNetwork: true
containers: containers:
- image: gcr.io/google_containers/etcd:2.0.9 - image: gcr.io/google_containers/etcd:3.0.17
name: etcd-container name: etcd-container
command: command:
- /usr/local/bin/etcd - /usr/local/bin/etcd
+6 -6
View File
@@ -99,6 +99,7 @@ for `${NODE_IP}` on each machine.
#### Validating your cluster #### Validating your cluster
Once you copy this into all three nodes, you should have a clustered etcd set up. You can validate on master with Once you copy this into all three nodes, you should have a clustered etcd set up. You can validate on master with
```shell ```shell
kubectl exec < pod_name > etcdctl member list kubectl exec < pod_name > etcdctl member list
``` ```
@@ -114,8 +115,8 @@ on a different node.
### Even more reliable storage ### Even more reliable storage
Of course, if you are interested in increased data reliability, there are further options which makes the place where etcd Of course, if you are interested in increased data reliability, there are further options which make the place where etcd
installs it's data even more reliable than regular disks (belts *and* suspenders, ftw!). installs its data even more reliable than regular disks (belts *and* suspenders, ftw!).
If you use a cloud provider, then they usually provide this If you use a cloud provider, then they usually provide this
for you, for example [Persistent Disk](https://cloud.google.com/compute/docs/disks/persistent-disks) on the Google Cloud Platform. These for you, for example [Persistent Disk](https://cloud.google.com/compute/docs/disks/persistent-disks) on the Google Cloud Platform. These
@@ -126,7 +127,7 @@ Alternatively, you can run a clustered file system like Gluster or Ceph. Finall
Regardless of how you choose to implement it, if you chose to use one of these options, you should make sure that your storage is mounted Regardless of how you choose to implement it, if you chose to use one of these options, you should make sure that your storage is mounted
to each machine. If your storage is shared between the three masters in your cluster, you should create a different directory on the storage to each machine. If your storage is shared between the three masters in your cluster, you should create a different directory on the storage
for each node. Throughout these instructions, we assume that this storage is mounted to your machine in `/var/etcd/data` for each node. Throughout these instructions, we assume that this storage is mounted to your machine in `/var/etcd/data`.
## Replicated API Servers ## Replicated API Servers
@@ -164,7 +165,7 @@ in the file.
At this point, you should have 3 apiservers all working correctly. If you set up a network load balancer, you should At this point, you should have 3 apiservers all working correctly. If you set up a network load balancer, you should
be able to access your cluster via that load balancer, and see traffic balancing between the apiserver instances. Setting be able to access your cluster via that load balancer, and see traffic balancing between the apiserver instances. Setting
up a load balancer will depend on the specifics of your platform, for example instructions for the Google Cloud up a load balancer will depend on the specifics of your platform, for example instructions for the Google Cloud
Platform can be found [here](https://cloud.google.com/compute/docs/load-balancing/) Platform can be found [here](https://cloud.google.com/compute/docs/load-balancing/).
Note, if you are using authentication, you may need to regenerate your certificate to include the IP address of the balancer, Note, if you are using authentication, you may need to regenerate your certificate to include the IP address of the balancer,
in addition to the IP addresses of the individual nodes. in addition to the IP addresses of the individual nodes.
@@ -194,8 +195,7 @@ touch /var/log/kube-scheduler.log
touch /var/log/kube-controller-manager.log touch /var/log/kube-controller-manager.log
``` ```
Next, set up the descriptions of the scheduler and controller manager pods on each node. Next, set up the descriptions of the scheduler and controller manager pods on each node by copying [kube-scheduler.yaml](/docs/admin/high-availability/kube-scheduler.yaml) and [kube-controller-manager.yaml](/docs/admin/high-availability/kube-controller-manager.yaml) into the `/etc/kubernetes/manifests/` directory.
by copying [kube-scheduler.yaml](/docs/admin/high-availability/kube-scheduler.yaml) and [kube-controller-manager.yaml](/docs/admin/high-availability/kube-controller-manager.yaml) into the `/etc/kubernetes/manifests/` directory.
## Conclusion ## Conclusion
+2 -2
View File
@@ -54,7 +54,7 @@ steps:
is used to authenticate. The control plane will sign this CSR requested is used to authenticate. The control plane will sign this CSR requested
automatically. automatically.
1. kubeadm configures the local kubelet to connect to the API server 1. kubeadm configures the local kubelet to connect to the API server.
## Usage ## Usage
@@ -211,7 +211,7 @@ set up the Kubernetes master to automatically approve these signing requests.
This token is passed in with the `--tls-bootstrap-token abcdef.1234567890abcdef` This token is passed in with the `--tls-bootstrap-token abcdef.1234567890abcdef`
flag. flag.
Often times the same token is use for both parts. In this case, the `--token` flag Often times the same token is used for both parts. In this case, the `--token` flag
can be used instead of specifying the each token individually. can be used instead of specifying the each token individually.
Here's an example on how to use it: Here's an example on how to use it:
+1 -1
View File
@@ -5,7 +5,7 @@ Initialize a federation control plane
### Synopsis ### Synopsis
Init initializes a federation control plane. Initialize a federation control plane.
Federation control plane is hosted inside a Kubernetes Federation control plane is hosted inside a Kubernetes
cluster. The host cluster must be specified using the cluster. The host cluster must be specified using the
+1 -1
View File
@@ -70,7 +70,7 @@ kubelet
--enable-custom-metrics Support for gathering custom metrics. --enable-custom-metrics Support for gathering custom metrics.
--enable-debugging-handlers Enables server endpoints for log collection and local running of containers and commands (default true) --enable-debugging-handlers Enables server endpoints for log collection and local running of containers and commands (default true)
--enable-server Enable the Kubelet's server (default true) --enable-server Enable the Kubelet's server (default true)
--enforce-node-allocatable stringSlice A comma separated list of levels of node allocatable enforcement to be enforced by kubelet. Acceptible options are 'pods', 'system-reserved' & 'kube-reserved'. If the latter two options are specified, '--system-reserved-cgroup' & '--kube-reserved-cgroup' must also be set respectively. See https://git.k8s.io/community/contributors/design-proposals/node-allocatable.md for more details. (default [pods]) --enforce-node-allocatable stringSlice A comma separated list of levels of node allocatable enforcement to be enforced by kubelet. Acceptable options are 'pods', 'system-reserved' & 'kube-reserved'. If the latter two options are specified, '--system-reserved-cgroup' & '--kube-reserved-cgroup' must also be set respectively. See https://git.k8s.io/community/contributors/design-proposals/node-allocatable.md for more details. (default [pods])
--event-burst int32 Maximum size of a bursty event records, temporarily allows event records to burst to this number, while still not exceeding event-qps. Only used if --event-qps > 0 (default 10) --event-burst int32 Maximum size of a bursty event records, temporarily allows event records to burst to this number, while still not exceeding event-qps. Only used if --event-qps > 0 (default 10)
--event-qps int32 If > 0, limit event creations per second to this value. If 0, unlimited. (default 5) --event-qps int32 If > 0, limit event creations per second to this value. If 0, unlimited. (default 5)
--eviction-hard string A set of eviction thresholds (e.g. memory.available<1Gi) that if met would trigger a pod eviction. (default "memory.available<100Mi,nodefs.available<10%,nodefs.inodesFree<5%") --eviction-hard string A set of eviction thresholds (e.g. memory.available<1Gi) that if met would trigger a pod eviction. (default "memory.available<100Mi,nodefs.available<10%,nodefs.inodesFree<5%")
+4 -4
View File
@@ -15,7 +15,7 @@ incomplete features are referred to in order to better describe service accounts
## User accounts vs service accounts ## User accounts vs service accounts
Kubernetes distinguished between the concept of a user account and a service accounts Kubernetes distinguishes between the concept of a user account and a service account
for a number of reasons: for a number of reasons:
- User accounts are for humans. Service accounts are for processes, which - User accounts are for humans. Service accounts are for processes, which
@@ -60,9 +60,9 @@ It acts synchronously to modify pods as they are created or updated. When this p
TokenController runs as part of controller-manager. It acts asynchronously. It: TokenController runs as part of controller-manager. It acts asynchronously. It:
- observes serviceAccount creation and creates a corresponding Secret to allow API access. - observes serviceAccount creation and creates a corresponding Secret to allow API access.
- observes serviceAccount deletion and deletes all corresponding ServiceAccountToken Secrets - observes serviceAccount deletion and deletes all corresponding ServiceAccountToken Secrets.
- observes secret addition, and ensures the referenced ServiceAccount exists, and adds a token to the secret if needed - observes secret addition, and ensures the referenced ServiceAccount exists, and adds a token to the secret if needed.
- observes secret deletion and removes a reference from the corresponding ServiceAccount if needed - observes secret deletion and removes a reference from the corresponding ServiceAccount if needed.
You must pass a service account private key file to the token controller in the controller-manager by using You must pass a service account private key file to the token controller in the controller-manager by using
the `--service-account-private-key-file` option. The private key will be used to sign generated service account tokens. the `--service-account-private-key-file` option. The private key will be used to sign generated service account tokens.
+1 -1
View File
@@ -6,7 +6,7 @@ Static compilation of html from markdown including processing for grouping code
\> bdocs-tab:kubectl Deployment Config to run 3 nginx instances (max rollback set to 10 revisions). \> bdocs-tab:kubectl Deployment Config to run 3 nginx instances (max rollback set to 10 revisions).
bdocs-tab:tab will be stripped during rendering and utilized to with CSS to show or hide the prefered tab. kubectl indicates the desired tab, since blockquotes have no specific syntax highlighting. bdocs-tab:tab will be stripped during rendering and utilized to with CSS to show or hide the preferred tab. kubectl indicates the desired tab, since blockquotes have no specific syntax highlighting.
\`\`\`bdocs-tab:kubectl_yaml \`\`\`bdocs-tab:kubectl_yaml
apiVersion: extensions/v1beta1 apiVersion: extensions/v1beta1
+16 -16
View File
@@ -17957,10 +17957,10 @@ Appears In <a href="#ingress-v1beta1">Ingress</a> </aside>
<span class="hljs-attr"> name:</span> service-example <span class="hljs-attr"> name:</span> service-example
<span class="hljs-attr">spec:</span> <span class="hljs-attr">spec:</span>
<span class="hljs-attr"> ports:</span> <span class="hljs-attr"> ports:</span>
<span class="hljs-comment"># Accept traffic sent to port 80</span> <span class="hljs-comment"># Accept traffic sent to port 80</span>
<span class="hljs-attr"> - name:</span> http <span class="hljs-attr"> - name:</span> http
<span class="hljs-attr"> port:</span> <span class="hljs-number">80</span> <span class="hljs-attr"> port:</span> <span class="hljs-number">80</span>
<span class="hljs-attr"> targetPort:</span> <span class="hljs-number">80</span> <span class="hljs-attr"> targetPort:</span> <span class="hljs-number">80</span>
<span class="hljs-attr"> selector:</span> <span class="hljs-attr"> selector:</span>
<span class="hljs-comment"># Loadbalance traffic across Pods matching</span> <span class="hljs-comment"># Loadbalance traffic across Pods matching</span>
<span class="hljs-comment"># this label selector</span> <span class="hljs-comment"># this label selector</span>
@@ -17981,10 +17981,10 @@ Appears In <a href="#ingress-v1beta1">Ingress</a> </aside>
<span class="hljs-attr"> name:</span> service-example <span class="hljs-attr"> name:</span> service-example
<span class="hljs-attr">spec:</span> <span class="hljs-attr">spec:</span>
<span class="hljs-attr"> ports:</span> <span class="hljs-attr"> ports:</span>
<span class="hljs-comment"># Accept traffic sent to port 80</span> <span class="hljs-comment"># Accept traffic sent to port 80</span>
<span class="hljs-attr"> - name:</span> http <span class="hljs-attr"> - name:</span> http
<span class="hljs-attr"> port:</span> <span class="hljs-number">80</span> <span class="hljs-attr"> port:</span> <span class="hljs-number">80</span>
<span class="hljs-attr"> targetPort:</span> <span class="hljs-number">80</span> <span class="hljs-attr"> targetPort:</span> <span class="hljs-number">80</span>
<span class="hljs-attr"> selector:</span> <span class="hljs-attr"> selector:</span>
<span class="hljs-comment"># Loadbalance traffic across Pods matching</span> <span class="hljs-comment"># Loadbalance traffic across Pods matching</span>
<span class="hljs-comment"># this label selector</span> <span class="hljs-comment"># this label selector</span>
@@ -18156,11 +18156,11 @@ metadata:
name: service-example name: service-example
spec: spec:
ports: ports:
- name: http - name: http
port: 80 port: 80
targetPort: 80 targetPort: 80
selector: selector:
app: nginx app: nginx
type: LoadBalancer type: LoadBalancer
'</span> | kubectl create <span class="hljs-_">-f</span> - '</span> | kubectl create <span class="hljs-_">-f</span> -
</code></pre> </code></pre>
@@ -18176,11 +18176,11 @@ metadata:
name: service-example name: service-example
spec: spec:
ports: ports:
- name: http - name: http
port: 80 port: 80
targetPort: 80 targetPort: 80
selector: selector:
app: nginx app: nginx
type: LoadBalancer type: LoadBalancer
'</span> <span class="hljs-symbol">http:</span>/<span class="hljs-regexp">/127.0.0.1:8001/api</span><span class="hljs-regexp">/v1/namespaces</span><span class="hljs-regexp">/default/services</span> '</span> <span class="hljs-symbol">http:</span>/<span class="hljs-regexp">/127.0.0.1:8001/api</span><span class="hljs-regexp">/v1/namespaces</span><span class="hljs-regexp">/default/services</span>
</code></pre> </code></pre>
+16 -16
View File
@@ -17849,10 +17849,10 @@ Appears In <a href="#ingress-v1beta1-extensions">Ingress</a> </aside>
<span class="hljs-attr"> name:</span> service-example <span class="hljs-attr"> name:</span> service-example
<span class="hljs-attr">spec:</span> <span class="hljs-attr">spec:</span>
<span class="hljs-attr"> ports:</span> <span class="hljs-attr"> ports:</span>
<span class="hljs-comment"># Accept traffic sent to port 80</span> <span class="hljs-comment"># Accept traffic sent to port 80</span>
<span class="hljs-attr"> - name:</span> http <span class="hljs-attr"> - name:</span> http
<span class="hljs-attr"> port:</span> <span class="hljs-number">80</span> <span class="hljs-attr"> port:</span> <span class="hljs-number">80</span>
<span class="hljs-attr"> targetPort:</span> <span class="hljs-number">80</span> <span class="hljs-attr"> targetPort:</span> <span class="hljs-number">80</span>
<span class="hljs-attr"> selector:</span> <span class="hljs-attr"> selector:</span>
<span class="hljs-comment"># Loadbalance traffic across Pods matching</span> <span class="hljs-comment"># Loadbalance traffic across Pods matching</span>
<span class="hljs-comment"># this label selector</span> <span class="hljs-comment"># this label selector</span>
@@ -17873,10 +17873,10 @@ Appears In <a href="#ingress-v1beta1-extensions">Ingress</a> </aside>
<span class="hljs-attr"> name:</span> service-example <span class="hljs-attr"> name:</span> service-example
<span class="hljs-attr">spec:</span> <span class="hljs-attr">spec:</span>
<span class="hljs-attr"> ports:</span> <span class="hljs-attr"> ports:</span>
<span class="hljs-comment"># Accept traffic sent to port 80</span> <span class="hljs-comment"># Accept traffic sent to port 80</span>
<span class="hljs-attr"> - name:</span> http <span class="hljs-attr"> - name:</span> http
<span class="hljs-attr"> port:</span> <span class="hljs-number">80</span> <span class="hljs-attr"> port:</span> <span class="hljs-number">80</span>
<span class="hljs-attr"> targetPort:</span> <span class="hljs-number">80</span> <span class="hljs-attr"> targetPort:</span> <span class="hljs-number">80</span>
<span class="hljs-attr"> selector:</span> <span class="hljs-attr"> selector:</span>
<span class="hljs-comment"># Loadbalance traffic across Pods matching</span> <span class="hljs-comment"># Loadbalance traffic across Pods matching</span>
<span class="hljs-comment"># this label selector</span> <span class="hljs-comment"># this label selector</span>
@@ -18048,11 +18048,11 @@ metadata:
name: service-example name: service-example
spec: spec:
ports: ports:
- name: http - name: http
port: 80 port: 80
targetPort: 80 targetPort: 80
selector: selector:
app: nginx app: nginx
type: LoadBalancer type: LoadBalancer
'</span> | kubectl create <span class="hljs-_">-f</span> - '</span> | kubectl create <span class="hljs-_">-f</span> -
</code></pre> </code></pre>
@@ -18068,11 +18068,11 @@ metadata:
name: service-example name: service-example
spec: spec:
ports: ports:
- name: http - name: http
port: 80 port: 80
targetPort: 80 targetPort: 80
selector: selector:
app: nginx app: nginx
type: LoadBalancer type: LoadBalancer
'</span> <span class="hljs-symbol">http:</span>/<span class="hljs-regexp">/127.0.0.1:8001/api</span><span class="hljs-regexp">/v1/namespaces</span><span class="hljs-regexp">/default/services</span> '</span> <span class="hljs-symbol">http:</span>/<span class="hljs-regexp">/127.0.0.1:8001/api</span><span class="hljs-regexp">/v1/namespaces</span><span class="hljs-regexp">/default/services</span>
</code></pre> </code></pre>
+2 -2
View File
@@ -6,7 +6,7 @@ Static compilation of html from markdown including processing for grouping code
\> bdocs-tab:kubectl Deployment Config to run 3 nginx instances (max rollback set to 10 revisions). \> bdocs-tab:kubectl Deployment Config to run 3 nginx instances (max rollback set to 10 revisions).
bdocs-tab:tab will be stripped during rendering and utilized to with CSS to show or hide the prefered tab. kubectl indicates the desired tab, since blockquotes have no specific syntax highlighting. bdocs-tab:tab will be stripped during rendering and utilized to with CSS to show or hide the preferred tab. kubectl indicates the desired tab, since blockquotes have no specific syntax highlighting.
\`\`\`bdocs-tab:kubectl_yaml \`\`\`bdocs-tab:kubectl_yaml
apiVersion: extensions/v1beta1 apiVersion: extensions/v1beta1
@@ -66,4 +66,4 @@ Apache License Version 2.0
## FAQ ## FAQ
Q: Why is it named brodocs? Q: Why is it named brodocs?
A: This project was born out of a collaboration with my brother to create a suitable docs app for his purposes. It was a fun name for the the two of us to use as actual brothers. A: This project was born out of a collaboration with my brother to create a suitable docs app for his purposes. It was a fun name for the the two of us to use as actual brothers.
+17 -17
View File
@@ -8018,7 +8018,7 @@ Appears In:
</tr> </tr>
<tr> <tr>
<td>qosClass <br /> <em>string</em></td> <td>qosClass <br /> <em>string</em></td>
<td>The Quality of Service (QOS) classification assigned to the pod based on resource requirements See PodQOSClass type for available QOS classes More info: <a href="https://github.com/kubernetes/kubernetes/blob/master/docs/design/resource-qos.md">https://github.com/kubernetes/kubernetes/blob/master/docs/design/resource-qos.md</a></td> <td>The Quality of Service (QOS) classification assigned to the pod based on resource requirements See PodQOSClass type for available QOS classes More info: <a href="https://github.com/kubernetes/community/blob/master/contributors/design-proposals/resource-qos.md">https://github.com/kubernetes/community/blob/master/contributors/design-proposals/resource-qos.md</a></td>
</tr> </tr>
<tr> <tr>
<td>reason <br /> <em>string</em></td> <td>reason <br /> <em>string</em></td>
@@ -17914,10 +17914,10 @@ metadata:
</span> name: service-example </span> name: service-example
spec: spec:
ports: ports:
# Accept traffic sent <span class="hljs-keyword">to</span><span class="hljs-built_in"> port </span>80 # Accept traffic sent <span class="hljs-keyword">to</span><span class="hljs-built_in"> port </span>80
- name: http - name: http
port: 80 port: 80
targetPort: 80 targetPort: 80
selector: selector:
# Loadbalance traffic across Pods matching # Loadbalance traffic across Pods matching
# this label selector # this label selector
@@ -17938,10 +17938,10 @@ metadata:
</span> name: service-example </span> name: service-example
spec: spec:
ports: ports:
# Accept traffic sent <span class="hljs-keyword">to</span><span class="hljs-built_in"> port </span>80 # Accept traffic sent <span class="hljs-keyword">to</span><span class="hljs-built_in"> port </span>80
- name: http - name: http
port: 80 port: 80
targetPort: 80 targetPort: 80
selector: selector:
# Loadbalance traffic across Pods matching # Loadbalance traffic across Pods matching
# this label selector # this label selector
@@ -18129,11 +18129,11 @@ $ echo 'kind: Service
name</span>: service-example name</span>: service-example
<span class="hljs-attribute">spec: <span class="hljs-attribute">spec:
ports: ports:
- name</span>: http - name</span>: http
port: 80 port: 80
targetPort: 80 targetPort: 80
selector: selector:
app: nginx app: nginx
type: LoadBalancer type: LoadBalancer
' | kubectl create -f - ' | kubectl create -f -
</code></pre> </code></pre>
@@ -18149,11 +18149,11 @@ metadata:
name: service-example name: service-example
spec: spec:
ports: ports:
- name: http - name: http
port: 80 port: 80
targetPort: 80 targetPort: 80
selector: selector:
app: nginx app: nginx
type: LoadBalancer type: LoadBalancer
'</span> <span class="hljs-symbol">http:</span>/<span class="hljs-regexp">/127.0.0.1:8001/api</span><span class="hljs-regexp">/v1/namespaces</span><span class="hljs-regexp">/default/services</span> '</span> <span class="hljs-symbol">http:</span>/<span class="hljs-regexp">/127.0.0.1:8001/api</span><span class="hljs-regexp">/v1/namespaces</span><span class="hljs-regexp">/default/services</span>
</code></pre> </code></pre>
+2 -2
View File
@@ -111,7 +111,7 @@
- In addition to window/document, if html or body are received, the plugin will choose the right one. - In addition to window/document, if html or body are received, the plugin will choose the right one.
### Fix ### Fix
- The plugin accepts floating numbers, Thanks Ramin - The plugin accepts floating numbers, Thanks Ramin
- Using jQuery.nodeName where neccessary so that this works on xml+xhtml - Using jQuery.nodeName where necessary so that this works on xml+xhtml
- The max() internal function wasn't completely accurrate, now it is 98% (except for IE on quirks mode and it's not too noticeable). - The max() internal function wasn't completely accurrate, now it is 98% (except for IE on quirks mode and it's not too noticeable).
## 1.4 ## 1.4
@@ -183,4 +183,4 @@
- Two axes can be scrolled together, this is set with the option 'axis'. - Two axes can be scrolled together, this is set with the option 'axis'.
- In case 2 axes are chosen, the scrolling can be queued: one scrolls, and then the other. - In case 2 axes are chosen, the scrolling can be queued: one scrolls, and then the other.
- There's an intermediary event, 'onAfterFirst' called in case the axes are queued, after the first ends. - There's an intermediary event, 'onAfterFirst' called in case the axes are queued, after the first ends.
- If the option 'margin' is set to true, the plugin will take in account, the margin of the target(no use if target is a value). - If the option 'margin' is set to true, the plugin will take in account, the margin of the target(no use if target is a value).
+1 -1
View File
@@ -297,7 +297,7 @@ $ cat hello.html
The point of marked was to create a markdown compiler where it was possible to The point of marked was to create a markdown compiler where it was possible to
frequently parse huge chunks of markdown without having to worry about frequently parse huge chunks of markdown without having to worry about
caching the compiled output somehow...or blocking for an unnecesarily long time. caching the compiled output somehow...or blocking for an unnecessarily long time.
marked is very concise and still implements all markdown features. It is also marked is very concise and still implements all markdown features. It is also
now fully compatible with the client-side. now fully compatible with the client-side.
@@ -64,12 +64,13 @@ or service through the apiserver's proxy functionality.
### apiserver -> kubelet ### apiserver -> kubelet
The connections from the apiserver to the kubelet are used for fetching logs The connections from the apiserver to the kubelet are used for:
for pods, attaching (through kubectl) to running pods, and using the kubelet's * Fetching logs for pods.
port-forwarding functionality. These connections terminate at the kubelet's * Attaching (through kubectl) to running pods.
HTTPS endpoint. * Providing the kubelet's port-forwarding functionality.
By default, the apiserver does not verify the kubelet's serving certificate, These connections terminate at the kubelet's HTTPS endpoint. By default,
the apiserver does not verify the kubelet's serving certificate,
which makes the connection subject to man-in-the-middle attacks, and which makes the connection subject to man-in-the-middle attacks, and
**unsafe** to run over untrusted and/or public networks. **unsafe** to run over untrusted and/or public networks.
@@ -28,7 +28,7 @@ Before choosing a guide, here are some considerations:
offer a greater variety of choices. offer a greater variety of choices.
- Familiarize yourself with the [components](/docs/admin/cluster-components) needed to run a cluster. - Familiarize yourself with the [components](/docs/admin/cluster-components) needed to run a cluster.
Note: Not all distros are actively maintained. Choose distros which have been tested a recent version of Kubernetes. Note: Not all distros are actively maintained. Choose distros which have been tested with a recent version of Kubernetes.
If you are using a guide involving Salt, see [Configuring Kubernetes with Salt](/docs/admin/salt). If you are using a guide involving Salt, see [Configuring Kubernetes with Salt](/docs/admin/salt).
@@ -133,7 +133,7 @@ It is okay to have multiple clusters per availability zone, though on balance we
Reasons to prefer fewer clusters are: Reasons to prefer fewer clusters are:
- improved bin packing of Pods in some cases with more nodes in one cluster (less resource fragmentation). - improved bin packing of Pods in some cases with more nodes in one cluster (less resource fragmentation).
- reduced operational overhead (though the advantage is diminished as ops tooling and processes matures). - reduced operational overhead (though the advantage is diminished as ops tooling and processes mature).
- reduced costs for per-cluster fixed resource costs, e.g. apiserver VMs (but small as a percentage - reduced costs for per-cluster fixed resource costs, e.g. apiserver VMs (but small as a percentage
of overall cluster cost for medium to large clusters). of overall cluster cost for medium to large clusters).
@@ -168,6 +168,10 @@ sysctl net.ipv4.ip_forward=1
The result of all this is that all `Pods` can reach each other and can egress The result of all this is that all `Pods` can reach each other and can egress
traffic to the internet. traffic to the internet.
### Kube-router
[Kube-router](https://github.com/cloudnativelabs/kube-router) is a purpose-built networking solution for Kubernetes that aims to provide high performance and operational simplicity. Kube-router provides a Linux [LVS/IPVS](http://www.linuxvirtualserver.org/software/ipvs.html)-based service proxy, a Linux kernel forwarding-based pod-to-pod networking solution with no overlays, and iptables/ipset-based network policy enforcer.
### L2 networks and linux bridging ### L2 networks and linux bridging
If you have a "dumb" L2 network, such as a simple switch in a "bare-metal" If you have a "dumb" L2 network, such as a simple switch in a "bare-metal"
@@ -338,7 +338,7 @@ tolerations:
effect: "NoSchedule" effect: "NoSchedule"
``` ```
A toleration "matches" a taint if the `key`s are the same and the `effect`s are the same, and: A toleration "matches" a taint if the keys are the same and the effects are the same, and:
* the `operator` is `Exists` (in which case no `value` should be specified), or * the `operator` is `Exists` (in which case no `value` should be specified), or
* the `operator` is `Equal` and the `value`s are equal * the `operator` is `Equal` and the `value`s are equal
@@ -79,7 +79,7 @@ Mi, Ki. For example, the following represent roughly the same value:
Here's an example. Here's an example.
The following Pod has two Containers. Each Container has a request of 0.25 cpu The following Pod has two Containers. Each Container has a request of 0.25 cpu
and 64MiB (2<sup>26</sup> bytes) of memory Each Container has a limit of 0.5 and 64MiB (2<sup>26</sup> bytes) of memory. Each Container has a limit of 0.5
cpu and 128MiB of memory. You can say the Pod has a request of 0.5 cpu and 128 cpu and 128MiB of memory. You can say the Pod has a request of 0.5 cpu and 128
MiB of memory, and a limit of 1 cpu and 256MiB of memory. MiB of memory, and a limit of 1 cpu and 256MiB of memory.
+1 -1
View File
@@ -123,7 +123,7 @@ rkt is supported experimentally for running containers as an alternative to dock
### supervisord ### supervisord
supervisord is a lightweight process monitoring and control system that can be used to keep kubelet and docker supervisord is a lightweight process monitor and control system that can be used to keep kubelet and docker
running. running.
### fluentd ### fluentd
+2 -2
View File
@@ -26,9 +26,9 @@ What constitutes a compatible change and how to change the API are detailed by t
Complete API details are documented using [Swagger v1.2](http://swagger.io/) and [OpenAPI](https://www.openapis.org/). The Kubernetes apiserver (aka "master") exposes an API that can be used to retrieve the Swagger v1.2 Kubernetes API spec located at `/swaggerapi`. You can also enable a UI to browse the API documentation at `/swagger-ui` by passing the `--enable-swagger-ui=true` flag to apiserver. Complete API details are documented using [Swagger v1.2](http://swagger.io/) and [OpenAPI](https://www.openapis.org/). The Kubernetes apiserver (aka "master") exposes an API that can be used to retrieve the Swagger v1.2 Kubernetes API spec located at `/swaggerapi`. You can also enable a UI to browse the API documentation at `/swagger-ui` by passing the `--enable-swagger-ui=true` flag to apiserver.
Starting with kubernetes 1.4, OpenAPI spec is also available at [`/swagger.json`](https://git.k8s.io/kubernetes/api/openapi-spec/swagger.json). While we are transitioning from Swagger v1.2 to OpenAPI (aka Swagger v2.0), some of the tools such as kubectl and swagger-ui are still using v1.2 spec. OpenAPI spec is in Beta as of Kubernetes 1.5. Starting with Kubernetes 1.4, OpenAPI spec is also available at [`/swagger.json`](https://git.k8s.io/kubernetes/api/openapi-spec/swagger.json). While we are transitioning from Swagger v1.2 to OpenAPI (aka Swagger v2.0), some of the tools such as kubectl and swagger-ui are still using v1.2 spec. OpenAPI spec is in Beta as of Kubernetes 1.5.
Kubernetes implements an alternative Protobuf based serialization format for the API that is primarily intended for intra-cluster communication, documented in the [design proposal](https://github.com/kubernetes/kubernetes/blob/{{ page.githubbranch }}/docs/proposals/protobuf.md) and the IDL files for each schema are located in the Go packages that define the API objects. Kubernetes implements an alternative Protobuf based serialization format for the API that is primarily intended for intra-cluster communication, documented in the [design proposal](https://github.com/kubernetes/community/blob/master/contributors/design-proposals/protobuf.md) and the IDL files for each schema are located in the Go packages that define the API objects.
## API versioning ## API versioning
+1 -1
View File
@@ -26,7 +26,7 @@ Resource quotas work like this:
- If quota is enabled in a namespace for compute resources like `cpu` and `memory`, users must specify - If quota is enabled in a namespace for compute resources like `cpu` and `memory`, users must specify
requests or limits for those values; otherwise, the quota system may reject pod creation. Hint: Use requests or limits for those values; otherwise, the quota system may reject pod creation. Hint: Use
the LimitRange admission controller to force defaults for pods that make no compute resource requirements. the LimitRange admission controller to force defaults for pods that make no compute resource requirements.
See the [walkthrough](/docs/tasks/configure-pod-container/apply-resource-quota-limit/) for an example to avoid this problem. See the [walkthrough](/docs/tasks/administer-cluster/quota-memory-cpu-namespace/) for an example to avoid this problem.
Examples of policies that could be created using namespaces and quotas are: Examples of policies that could be created using namespaces and quotas are:
@@ -101,9 +101,9 @@ spec:
name: busybox name: busybox
clusterIP: None clusterIP: None
ports: ports:
- name: foo # Actually, no port is needed. - name: foo # Actually, no port is needed.
port: 1234 port: 1234
targetPort: 1234 targetPort: 1234
--- ---
apiVersion: v1 apiVersion: v1
kind: Pod kind: Pod
@@ -139,7 +139,7 @@ spec:
``` ```
If there exists a headless service in the same namespace as the pod and with the same name as the subdomain, the cluster's KubeDNS Server also returns an A record for the Pod's fully qualified hostname. If there exists a headless service in the same namespace as the pod and with the same name as the subdomain, the cluster's KubeDNS Server also returns an A record for the Pod's fully qualified hostname.
Given a Pod with the hostname set to "busybox-1" and the subdomain set to "default-subdomain", and a headless Service named "default-subdomain" in the same namespace, the pod will see it's own FQDN as "busybox-1.default-subdomain.my-namespace.svc.cluster.local". DNS serves an A record at that name, pointing to the Pod's IP. Both pods "busybox1" and "busybox2" can have their distinct A records. Given a Pod with the hostname set to "busybox-1" and the subdomain set to "default-subdomain", and a headless Service named "default-subdomain" in the same namespace, the pod will see its own FQDN as "busybox-1.default-subdomain.my-namespace.svc.cluster.local". DNS serves an A record at that name, pointing to the Pod's IP. Both pods "busybox1" and "busybox2" can have their distinct A records.
As of Kubernetes v1.2, the Endpoints object also has the annotation `endpoints.beta.kubernetes.io/hostnames-map`. Its value is the json representation of map[string(IP)][endpoints.HostRecord], for example: '{"10.245.1.6":{HostName: "my-webserver"}}'. As of Kubernetes v1.2, the Endpoints object also has the annotation `endpoints.beta.kubernetes.io/hostnames-map`. Its value is the json representation of map[string(IP)][endpoints.HostRecord], for example: '{"10.245.1.6":{HostName: "my-webserver"}}'.
If the Endpoints are for a headless service, an A record is created with the format <hostname>.<service name>.<pod namespace>.svc.<cluster domain> If the Endpoints are for a headless service, an A record is created with the format <hostname>.<service name>.<pod namespace>.svc.<cluster domain>
@@ -149,7 +149,7 @@ This endpoints annotation generally does not need to be specified by end-users,
With v1.3, The Endpoints object can specify the `hostname` for any endpoint, along with its IP. The hostname field takes precedence over the hostname value With v1.3, The Endpoints object can specify the `hostname` for any endpoint, along with its IP. The hostname field takes precedence over the hostname value
that might have been specified via the `endpoints.beta.kubernetes.io/hostnames-map` annotation. that might have been specified via the `endpoints.beta.kubernetes.io/hostnames-map` annotation.
With v1.3, the following annotations are deprecated: `pod.beta.kubernetes.io/hostname`, `pod.beta.kubernetes.io/subdomain`, `endpoints.beta.kubernetes.io/hostnames-map` With v1.3, the following annotations are deprecated: `pod.beta.kubernetes.io/hostname`, `pod.beta.kubernetes.io/subdomain`, `endpoints.beta.kubernetes.io/hostnames-map`.
## How do I test if it is working? ## How do I test if it is working?
@@ -370,7 +370,7 @@ kubelet passes DNS configured using the `--cluster-dns=10.0.0.10` flag to each
container. container.
DNS names also need domains. The local domain is configurable, in the kubelet using DNS names also need domains. The local domain is configurable, in the kubelet using
the flag `--cluster-domain=<default local domain>` the flag `--cluster-domain=<default local domain>`.
The Kubernetes cluster DNS server (based off the [SkyDNS](https://github.com/skynetservices/skydns) library) The Kubernetes cluster DNS server (based off the [SkyDNS](https://github.com/skynetservices/skydns) library)
supports forward lookups (A records), service lookups (SRV records) and reverse IP address lookups (PTR records). supports forward lookups (A records), service lookups (SRV records) and reverse IP address lookups (PTR records).
+27 -27
View File
@@ -52,9 +52,9 @@ spec:
selector: selector:
app: MyApp app: MyApp
ports: ports:
- protocol: TCP - protocol: TCP
port: 80 port: 80
targetPort: 9376 targetPort: 9376
``` ```
This specification will create a new `Service` object named "my-service" which This specification will create a new `Service` object named "my-service" which
@@ -97,9 +97,9 @@ metadata:
name: my-service name: my-service
spec: spec:
ports: ports:
- protocol: TCP - protocol: TCP
port: 80 port: 80
targetPort: 9376 targetPort: 9376
``` ```
Because this service has no selector, the corresponding `Endpoints` object will not be Because this service has no selector, the corresponding `Endpoints` object will not be
@@ -216,17 +216,17 @@ apiVersion: v1
metadata: metadata:
name: my-service name: my-service
spec: spec:
selector: selector:
app: MyApp app: MyApp
ports: ports:
- name: http - name: http
protocol: TCP protocol: TCP
port: 80 port: 80
targetPort: 9376 targetPort: 9376
- name: https - name: https
protocol: TCP protocol: TCP
port: 443 port: 443
targetPort: 9377 targetPort: 9377
``` ```
## Choosing your own IP address ## Choosing your own IP address
@@ -404,17 +404,17 @@ spec:
selector: selector:
app: MyApp app: MyApp
ports: ports:
- protocol: TCP - protocol: TCP
port: 80 port: 80
targetPort: 9376 targetPort: 9376
nodePort: 30061 nodePort: 30061
clusterIP: 10.0.171.239 clusterIP: 10.0.171.239
loadBalancerIP: 78.11.24.19 loadBalancerIP: 78.11.24.19
type: LoadBalancer type: LoadBalancer
status: status:
loadBalancer: loadBalancer:
ingress: ingress:
- ip: 146.148.47.155 - ip: 146.148.47.155
``` ```
Traffic from the external load balancer will be directed at the backend `Pods`, Traffic from the external load balancer will be directed at the backend `Pods`,
@@ -531,12 +531,12 @@ spec:
selector: selector:
app: MyApp app: MyApp
ports: ports:
- name: http - name: http
protocol: TCP protocol: TCP
port: 80 port: 80
targetPort: 9376 targetPort: 9376
externalIPs: externalIPs:
- 80.11.12.10 - 80.11.12.10
``` ```
## Shortcomings ## Shortcomings
+24 -4
View File
@@ -695,6 +695,8 @@ parameters:
#### Azure Disk #### Azure Disk
##### Azure Unmanaged Disk Storage Class
```yaml ```yaml
kind: StorageClass kind: StorageClass
apiVersion: storage.k8s.io/v1 apiVersion: storage.k8s.io/v1
@@ -709,7 +711,26 @@ parameters:
* `skuName`: Azure storage account Sku tier. Default is empty. * `skuName`: Azure storage account Sku tier. Default is empty.
* `location`: Azure storage account location. Default is empty. * `location`: Azure storage account location. Default is empty.
* `storageAccount`: Azure storage account name. If storage account is not provided, all storage accounts associated with the resource group are searched to find one that matches `skuName` and `location`. If storage account is provided, it must reside in the same resource group as the cluster, and `skuName` and `location` are ignored. * `storageAccount`: Azure storage account name. If a storage account is provided, it must reside in the same resource group as the cluster, and `location` is ignored. If a storage account is not provided, a new storage account will be created in the same resource group as the cluster.
##### New Azure Disk Storage Class (starting from v1.7.2)
```yaml
kind: StorageClass
apiVersion: storage.k8s.io/v1
metadata:
name: slow
provisioner: kubernetes.io/azure-disk
parameters:
storageaccounttype: Standard_LRS
kind: Shared
```
* `storageaccounttype`: Azure storage account Sku tier. Default is empty.
* `kind`: Possible values are `shared` (default), `dedicated`, and `managed`. When `kind` is `shared`, all unmanaged disks are created in a few shared storage accounts in the same resource group as the cluster. When `kind` is `dedicated`, a new dedicated storage account will be created for the new unmanaged disk in the same resource group as the cluster.
- Premium VM can attach both Standard_LRS and Premium_LRS disks, while Standard VM can only attach Standard_LRS disks.
- Managed VM can only attach managed disks and unmanaged VM can only attach unmanaged disks.
#### Azure File #### Azure File
@@ -727,10 +748,9 @@ parameters:
* `skuName`: Azure storage account Sku tier. Default is empty. * `skuName`: Azure storage account Sku tier. Default is empty.
* `location`: Azure storage account location. Default is empty. * `location`: Azure storage account location. Default is empty.
* `storageAccount`: Azure storage account name. Default is empty. * `storageAccount`: Azure storage account name. Default is empty. If a storage account is not provided, all storage accounts associated with the resource group are searched to find one that matches `skuName` and `location`. If a storage account is provided, it must reside in the same resource group as the cluster, and `skuName` and `location` are ignored.
If storage account is not provided, all storage accounts associated with the resource group are searched to find one that matches `skuName` and `location`. If storage account is provided, it must reside in the same resource group as the cluster, and `skuName` and `location` are ignored.
During provision, a secret will be created for mounting credentials. If the cluster has enabled both [RBAC](/docs/admin/authorization/rbac/) and [Controller Roles](/docs/admin/authorization/rbac/#controller-roles), you will first need to add `create` permission of resource `secret` for clusterrole `system:controller:persistent-volume-binder`. During provision, a secret is created for mounting credentials. If the cluster has enabled both [RBAC](/docs/admin/authorization/rbac/) and [Controller Roles](/docs/admin/authorization/rbac/#controller-roles), add the `create` permission of resource `secret` for clusterrole `system:controller:persistent-volume-binder`.
#### Portworx Volume #### Portworx Volume
@@ -98,9 +98,20 @@ when the pod is created, so it is ignored by the scheduler). Therefore:
- DaemonSet controller can make pods even when the scheduler has not been started, which can help cluster - DaemonSet controller can make pods even when the scheduler has not been started, which can help cluster
bootstrap. bootstrap.
Daemon pods do respect [taints and tolerations](/docs/concepts/configuration/assign-pod-node/#taints-and-tolerations-beta-feature), but they are Daemon pods do respect [taints and tolerations](/docs/concepts/configuration/assign-pod-node/#taints-and-tolerations-beta-feature),
created with `NoExecute` tolerations for the `node.alpha.kubernetes.io/notReady` and `node.alpha.kubernetes.io/unreachable` but they are created with `NoExecute` tolerations for the following taints with no `tolerationSeconds`:
taints with no `tolerationSeconds`. This ensures that when the `TaintBasedEvictions` alpha feature is enabled,
- `node.alpha.kubernetes.io/notReady`
- `node.alpha.kubernetes.io/unreachable`
- `node.alpha.kubernetes.io/memoryPressure`
- `node.alpha.kubernetes.io/diskPressure`
When the support to critical pods is enabled and the pods in a DaemonSet are
labelled as critical, the Daemon pods are created with an additional
`NoExecute` toleration for the `node.alpha.kubernetes.io/outOfDisk` taint with
no `tolerationSeconds`.
This ensures that when the `TaintBasedEvictions` alpha feature is enabled,
they will not be evicted when there are node problems such as a network partition. (When the they will not be evicted when there are node problems such as a network partition. (When the
`TaintBasedEvictions` feature is not enabled, they are also not evicted in these scenarios, but `TaintBasedEvictions` feature is not enabled, they are also not evicted in these scenarios, but
due to hard-coded behavior of the NodeController rather than due to tolerations). due to hard-coded behavior of the NodeController rather than due to tolerations).
@@ -441,7 +441,7 @@ Events:
You can scale a Deployment by using the following command: You can scale a Deployment by using the following command:
```shell ```shell
$ kubectl scale deployment nginx-deployment --replicas 10 $ kubectl scale deployment nginx-deployment --replicas=10
deployment "nginx-deployment" scaled deployment "nginx-deployment" scaled
``` ```
@@ -476,7 +476,7 @@ $ kubectl set image deploy/nginx-deployment nginx=nginx:sometag
deployment "nginx-deployment" image updated deployment "nginx-deployment" image updated
``` ```
The image update starts a new rollout with ReplicaSet nginx-deployment-1989198191 but it's blocked due to the The image update starts a new rollout with ReplicaSet nginx-deployment-1989198191, but it's blocked due to the
maxUnavailable requirement that we mentioned above. maxUnavailable requirement that we mentioned above.
```shell ```shell
@@ -147,7 +147,7 @@ Here's an example that orphans the dependents of a ReplicaSet:
kubectl delete replicaset my-repset --cascade=false kubectl delete replicaset my-repset --cascade=false
``` ```
### Addtional note on Deployments ### Additional note on Deployments
When using cascading deletes with Deployments you *must* use `propagationPolicy: Foreground` When using cascading deletes with Deployments you *must* use `propagationPolicy: Foreground`
to delete not only the ReplicaSets created, but also their Pods. If this type of _propagationPolicy_ to delete not only the ReplicaSets created, but also their Pods. If this type of _propagationPolicy_
@@ -157,9 +157,9 @@ metadata:
name: myservice name: myservice
spec: spec:
ports: ports:
- protocol: TCP - protocol: TCP
port: 80 port: 80
targetPort: 9376 targetPort: 9376
--- ---
kind: Service kind: Service
apiVersion: v1 apiVersion: v1
@@ -167,9 +167,9 @@ metadata:
name: mydb name: mydb
spec: spec:
ports: ports:
- protocol: TCP - protocol: TCP
port: 80 port: 80
targetPort: 9377 targetPort: 9377
``` ```
This Pod can be started and debugged with the following commands: This Pod can be started and debugged with the following commands:
-2
View File
@@ -165,7 +165,6 @@ order to access the CenturyLinkCloud API
-h (--help) display this help and exit -h (--help) display this help and exit
-c= (--clc_cluster_name=) set the name of the cluster, as used in CLC group names -c= (--clc_cluster_name=) set the name of the cluster, as used in CLC group names
-m= (--minion_count=) number of kubernetes minion nodes to add -m= (--minion_count=) number of kubernetes minion nodes to add
``` ```
## Cluster Deletion ## Cluster Deletion
@@ -176,7 +175,6 @@ There are two ways to delete an existing cluster:
```shell ```shell
python delete_cluster.py --cluster=clc_cluster_name --datacenter=DC1 python delete_cluster.py --cluster=clc_cluster_name --datacenter=DC1
``` ```
2) Use the CenturyLink Cloud UI. To delete a cluster, log into the CenturyLink 2) Use the CenturyLink Cloud UI. To delete a cluster, log into the CenturyLink
@@ -111,7 +111,7 @@ source_type: packageManager
**Configure the IP addresses used for services** **Configure the IP addresses used for services**
Each Kubernetes service gets its own IP address. These are not real IPs. You need only select a range of IPs which are not in use elsewhere in your environment. Each Kubernetes service gets its own IP address. These are not real IPs. You need to only select a range of IPs which are not in use elsewhere in your environment.
```yaml ```yaml
kube_service_addresses: 10.254.0.0/16 kube_service_addresses: 10.254.0.0/16
@@ -33,7 +33,7 @@ fed-node = 192.168.121.65
**Prepare the hosts:** **Prepare the hosts:**
* Install Kubernetes on all hosts - fed-{master,node}. This will also pull in docker. Also install etcd on fed-master. This guide has been tested with Kubernetes-0.18 and beyond. * Install Kubernetes on all hosts - fed-{master,node}. This will also pull in docker. Also install etcd on fed-master. This guide has been tested with Kubernetes-0.18 and beyond.
* Running on AWS EC2 with RHEL 7.2, you need to enable "extras" repository for yum by editing `/etc/yum.repos.d/redhat-rhui.repo` and changing the changing the `enable=0` to `enable=1` for extras. * Running on AWS EC2 with RHEL 7.2, you need to enable "extras" repository for yum by editing `/etc/yum.repos.d/redhat-rhui.repo` and changing the `enable=0` to `enable=1` for extras.
```shell ```shell
dnf -y install kubernetes dnf -y install kubernetes
@@ -40,7 +40,7 @@ Add the configuration to the etcd server on fed-master.
etcdctl set /coreos.com/network/config < flannel-config.json etcdctl set /coreos.com/network/config < flannel-config.json
``` ```
* Verify the key exists in the etcd server on fed-master. * Verify that the key exists in the etcd server on fed-master.
```shell ```shell
etcdctl get /coreos.com/network/config etcdctl get /coreos.com/network/config
+1 -1
View File
@@ -265,7 +265,7 @@ make test_e2e
## Kubernetes CLI ## Kubernetes CLI
When compiling from source, it's simplest to use the `./cluster/kubectl.sh` script, which detects your platform & When compiling from source, it's simpler to use the `./cluster/kubectl.sh` script, which detects your platform &
architecture and proxies commands to the appropriate `kubectl` binary. architecture and proxies commands to the appropriate `kubectl` binary.
ex: `./cluster/kubectl.sh get pods` ex: `./cluster/kubectl.sh get pods`
+4 -4
View File
@@ -508,9 +508,9 @@ While the basic node services (kubelet, kube-proxy, docker) are typically starte
traditional system administration/automation approaches, the remaining *master* components of Kubernetes are traditional system administration/automation approaches, the remaining *master* components of Kubernetes are
all configured and managed *by Kubernetes*: all configured and managed *by Kubernetes*:
- their options are specified in a Pod spec (yaml or json) rather than an /etc/init.d file or - Their options are specified in a Pod spec (yaml or json) rather than an /etc/init.d file or
systemd unit. systemd unit.
- they are kept running by Kubernetes rather than by init. - They are kept running by Kubernetes rather than by init.
### etcd ### etcd
@@ -839,7 +839,7 @@ of their purpose is in the admin guide](/docs/admin/cluster-components/#addons).
Notes for setting up each cluster service are given below: Notes for setting up each cluster service are given below:
* Cluster DNS: * Cluster DNS:
* required for many Kubernetes examples * Required for many Kubernetes examples
* [Setup instructions](http://releases.k8s.io/{{page.githubbranch}}/cluster/addons/dns/) * [Setup instructions](http://releases.k8s.io/{{page.githubbranch}}/cluster/addons/dns/)
* [Admin Guide](/docs/concepts/services-networking/dns-pod-service/) * [Admin Guide](/docs/concepts/services-networking/dns-pod-service/)
* Cluster-level Logging * Cluster-level Logging
@@ -889,7 +889,7 @@ At this point you should be able to run through one of the basic examples, such
### Running the Conformance Test ### Running the Conformance Test
You may want to try to run the [Conformance test](http://releases.k8s.io/{{page.githubbranch}}/hack/conformance-test.sh). Any failures may give a hint as to areas that need more attention. You may want to try to run the [Conformance test](http://releases.k8s.io/{{page.githubbranch}}/test/e2e_node/conformance/run_test.sh). Any failures may give a hint as to areas that need more attention.
### Networking ### Networking
+1 -1
View File
@@ -130,7 +130,7 @@ for the recommended settings for various releases.
If your machines are located in a private network that need proxy setting to connect the Internet, If your machines are located in a private network that need proxy setting to connect the Internet,
you can set the config `PROXY_SETTING` in cluster/ubuntu/config-default.sh such as: you can set the config `PROXY_SETTING` in cluster/ubuntu/config-default.sh such as:
PROXY_SETTING="http_proxy=http://server:port https_proxy=https://server:port" PROXY_SETTING="http_proxy=http://server:port https_proxy=https://server:port"
After all the above variables being set correctly, we can use following command in `cluster/` directory to After all the above variables being set correctly, we can use following command in `cluster/` directory to
bring up the whole cluster. bring up the whole cluster.
@@ -12,7 +12,11 @@ This page assumes you have a working Juju deployed cluster.
{% capture steps %} {% capture steps %}
## Connecting Datadog ## Connecting Datadog
Datadog is a SaaS offering which includes support for a range of integrations, including Kubernetes and ETCD. While the solution is SAAS/Commercial, they include a Free tier which is supported with the following method. To deploy a full Kubernetes stack with Datadog out of the box, do: `juju deploy canonical-kubernetes-datadog` Datadog is a SaaS offering which includes support for a range of integrations, including Kubernetes and ETCD. While the solution is SAAS/Commercial, they include a Free tier which is supported with the following method. To deploy a full Kubernetes stack with Datadog out of the box, do:
```
juju deploy canonical-kubernetes-datadog
```
### Installation of Datadog ### Installation of Datadog
@@ -132,4 +136,4 @@ juju configure nrpe-external-master nagios_master=255.255.255.255
Once configured, connect nrpe-external-master as outlined above. Once configured, connect nrpe-external-master as outlined above.
{% endcapture %} {% endcapture %}
{% include templates/task.md %} {% include templates/task.md %}
+2 -2
View File
@@ -221,12 +221,12 @@ Typing multiple lines does **not** work. The callout style only applies to the l
**Note:** This is my note. **Note:** This is my note.
I didn't read the stlye guide. I didn't read the style guide.
{: .note} {: .note}
**Note:** This is my note. **Note:** This is my note.
I didn't read the stlye guide. I didn't read the style guide.
{: .note} {: .note}
### Ordered Lists ### Ordered Lists
+2 -2
View File
@@ -68,9 +68,9 @@ might have to add an equivalent field or represent it as an annotation.
API version at least as stable is released.** API version at least as stable is released.**
GA API versions can replace GA API versions as well as beta and alpha API GA API versions can replace GA API versions as well as beta and alpha API
version. Beta API versions *may not* replace GA API versions. versions. Beta API versions *may not* replace GA API versions.
**Rule #4: Other than the most recent API version in each track, older API **Rule #4: Other than the most recent API versions in each track, older API
versions must be supported after their announced deprecation for a duration of versions must be supported after their announced deprecation for a duration of
no less than:** no less than:**
+3 -3
View File
@@ -63,7 +63,7 @@ of requiring a `g2.2xlarge`)
## failure-domain.beta.kubernetes.io/region ## failure-domain.beta.kubernetes.io/region
See [failure-domain.beta.kubernetes.io/zone](#failure-domainbetakubernetesiozone) See [failure-domain.beta.kubernetes.io/zone](#failure-domainbetakubernetesiozone).
## failure-domain.beta.kubernetes.io/zone ## failure-domain.beta.kubernetes.io/zone
@@ -82,8 +82,8 @@ On the PersistentVolume: The `PersistentVolumeLabel` admission controller will a
on GCE and AWS. on GCE and AWS.
Kubernetes will automatically spread the pods in a replication controller or service across nodes in a single-zone Kubernetes will automatically spread the pods in a replication controller or service across nodes in a single-zone
cluster (to reduce the impact of failures.) With multiple-zone clusters, this spreading behaviour is extended cluster (to reduce the impact of failures). With multiple-zone clusters, this spreading behaviour is extended
across zones (to reduce the impact of zone failures.) This is achieved via SelectorSpreadPriority. across zones (to reduce the impact of zone failures). This is achieved via SelectorSpreadPriority.
This is a best-effort placement, and so if the zones in your cluster are heterogeneous (e.g. different numbers of nodes, This is a best-effort placement, and so if the zones in your cluster are heterogeneous (e.g. different numbers of nodes,
different types of nodes, or different pod resource requirements), this might prevent equal spreading of different types of nodes, or different pod resource requirements), this might prevent equal spreading of
+1 -1
View File
@@ -6,7 +6,7 @@ Static compilation of html from markdown including processing for grouping code
\> bdocs-tab:kubectl Deployment Config to run 3 nginx instances (max rollback set to 10 revisions). \> bdocs-tab:kubectl Deployment Config to run 3 nginx instances (max rollback set to 10 revisions).
bdocs-tab:tab will be stripped during rendering and utilized to with CSS to show or hide the prefered tab. kubectl indicates the desired tab, since blockquotes have no specific syntax highlighting. bdocs-tab:tab will be stripped during rendering and utilized to with CSS to show or hide the preferred tab. kubectl indicates the desired tab, since blockquotes have no specific syntax highlighting.
\`\`\`bdocs-tab:kubectl_yaml \`\`\`bdocs-tab:kubectl_yaml
apiVersion: extensions/v1beta1 apiVersion: extensions/v1beta1
+1 -1
View File
@@ -6,7 +6,7 @@ Static compilation of html from markdown including processing for grouping code
\> bdocs-tab:kubectl Deployment Config to run 3 nginx instances (max rollback set to 10 revisions). \> bdocs-tab:kubectl Deployment Config to run 3 nginx instances (max rollback set to 10 revisions).
bdocs-tab:tab will be stripped during rendering and utilized to with CSS to show or hide the prefered tab. kubectl indicates the desired tab, since blockquotes have no specific syntax highlighting. bdocs-tab:tab will be stripped during rendering and utilized to with CSS to show or hide the preferred tab. kubectl indicates the desired tab, since blockquotes have no specific syntax highlighting.
\`\`\`bdocs-tab:kubectl_yaml \`\`\`bdocs-tab:kubectl_yaml
apiVersion: extensions/v1beta1 apiVersion: extensions/v1beta1
+2 -2
View File
@@ -6,7 +6,7 @@ Static compilation of html from markdown including processing for grouping code
\> bdocs-tab:kubectl Deployment Config to run 3 nginx instances (max rollback set to 10 revisions). \> bdocs-tab:kubectl Deployment Config to run 3 nginx instances (max rollback set to 10 revisions).
bdocs-tab:tab will be stripped during rendering and utilized to with CSS to show or hide the prefered tab. kubectl indicates the desired tab, since blockquotes have no specific syntax highlighting. bdocs-tab:tab will be stripped during rendering and utilized to with CSS to show or hide the preferred tab. kubectl indicates the desired tab, since blockquotes have no specific syntax highlighting.
\`\`\`bdocs-tab:kubectl_yaml \`\`\`bdocs-tab:kubectl_yaml
apiVersion: extensions/v1beta1 apiVersion: extensions/v1beta1
@@ -66,4 +66,4 @@ Apache License Version 2.0
## FAQ ## FAQ
Q: Why is it named brodocs? Q: Why is it named brodocs?
A: This project was born out of a collaboration with my brother to create a suitable docs app for his purposes. It was a fun name for the the two of us to use as actual brothers. A: This project was born out of a collaboration with my brother to create a suitable docs app for his purposes. It was a fun name for the the two of us to use as actual brothers.
+1 -1
View File
@@ -1315,7 +1315,7 @@ Appears In:
</tr> </tr>
<tr> <tr>
<td>qosClass <br /> <em>string</em></td> <td>qosClass <br /> <em>string</em></td>
<td>The Quality of Service (QOS) classification assigned to the pod based on resource requirements See PodQOSClass type for available QOS classes More info: <a href="https://github.com/kubernetes/kubernetes/blob/master/docs/design/resource-qos.md">https://github.com/kubernetes/kubernetes/blob/master/docs/design/resource-qos.md</a></td> <td>The Quality of Service (QOS) classification assigned to the pod based on resource requirements See PodQOSClass type for available QOS classes More info: <a href="https://github.com/kubernetes/community/blob/master/contributors/design-proposals/resource-qos.md">https://github.com/kubernetes/community/blob/master/contributors/design-proposals/resource-qos.md</a></td>
</tr> </tr>
<tr> <tr>
<td>reason <br /> <em>string</em></td> <td>reason <br /> <em>string</em></td>
+2 -2
View File
@@ -111,7 +111,7 @@
- In addition to window/document, if html or body are received, the plugin will choose the right one. - In addition to window/document, if html or body are received, the plugin will choose the right one.
### Fix ### Fix
- The plugin accepts floating numbers, Thanks Ramin - The plugin accepts floating numbers, Thanks Ramin
- Using jQuery.nodeName where neccessary so that this works on xml+xhtml - Using jQuery.nodeName where necessary so that this works on xml+xhtml
- The max() internal function wasn't completely accurrate, now it is 98% (except for IE on quirks mode and it's not too noticeable). - The max() internal function wasn't completely accurrate, now it is 98% (except for IE on quirks mode and it's not too noticeable).
## 1.4 ## 1.4
@@ -183,4 +183,4 @@
- Two axes can be scrolled together, this is set with the option 'axis'. - Two axes can be scrolled together, this is set with the option 'axis'.
- In case 2 axes are chosen, the scrolling can be queued: one scrolls, and then the other. - In case 2 axes are chosen, the scrolling can be queued: one scrolls, and then the other.
- There's an intermediary event, 'onAfterFirst' called in case the axes are queued, after the first ends. - There's an intermediary event, 'onAfterFirst' called in case the axes are queued, after the first ends.
- If the option 'margin' is set to true, the plugin will take in account, the margin of the target(no use if target is a value). - If the option 'margin' is set to true, the plugin will take in account, the margin of the target(no use if target is a value).
+1 -1
View File
@@ -297,7 +297,7 @@ $ cat hello.html
The point of marked was to create a markdown compiler where it was possible to The point of marked was to create a markdown compiler where it was possible to
frequently parse huge chunks of markdown without having to worry about frequently parse huge chunks of markdown without having to worry about
caching the compiled output somehow...or blocking for an unnecesarily long time. caching the compiled output somehow...or blocking for an unnecessarily long time.
marked is very concise and still implements all markdown features. It is also marked is very concise and still implements all markdown features. It is also
now fully compatible with the client-side. now fully compatible with the client-side.
@@ -80,7 +80,7 @@ cloud providers is difficult.
### (1/4) Installing kubeadm on your hosts ### (1/4) Installing kubeadm on your hosts
See [Installing kubeadm](/docs/setup/independent/install-kubeadm/) See [Installing kubeadm](/docs/setup/independent/install-kubeadm/).
**Note:** If you already have kubeadm installed, you should do a `apt-get update && **Note:** If you already have kubeadm installed, you should do a `apt-get update &&
apt-get upgrade` or `yum update` to get the latest version of kubeadm. apt-get upgrade` or `yum update` to get the latest version of kubeadm.
@@ -211,7 +211,7 @@ Please select one of the tabs to see installation instructions for the respectiv
{% capture calico %} {% capture calico %}
The official Calico guide is [here](http://docs.projectcalico.org/latest/getting-started/kubernetes/installation/hosted/kubeadm/) The official Calico guide is [here](http://docs.projectcalico.org/latest/getting-started/kubernetes/installation/hosted/kubeadm/).
**Note:** **Note:**
- In order for Network Policy to work correctly, you need to pass `--pod-network-cidr=192.168.0.0/16` to `kubeadm init` - In order for Network Policy to work correctly, you need to pass `--pod-network-cidr=192.168.0.0/16` to `kubeadm init`
@@ -224,7 +224,7 @@ kubectl apply -f http://docs.projectcalico.org/v2.4/getting-started/kubernetes/i
{% capture canal %} {% capture canal %}
The official Canal set-up guide is [here](https://github.com/projectcalico/canal/tree/master/k8s-install) The official Canal set-up guide is [here](https://github.com/projectcalico/canal/tree/master/k8s-install).
**Note:** **Note:**
- For Canal to work correctly, `--pod-network-cidr=10.244.0.0/16` has to be passed to `kubeadm init`. - For Canal to work correctly, `--pod-network-cidr=10.244.0.0/16` has to be passed to `kubeadm init`.
@@ -241,7 +241,7 @@ kubectl apply -f https://raw.githubusercontent.com/projectcalico/canal/master/k8
**Note:** **Note:**
- For flannel to work correctly, `--pod-network-cidr=10.244.0.0/16` has to be passed to `kubeadm init`. - For flannel to work correctly, `--pod-network-cidr=10.244.0.0/16` has to be passed to `kubeadm init`.
- flannel works on `amd64`, `arm`, `arm64` and `ppc64le`, but for it to work on an other platform than - flannel works on `amd64`, `arm`, `arm64` and `ppc64le`, but for it to work on an other platform than
`amd64` you have to manually download the manifest and replace `amd64` occurances with your chosen platform. `amd64` you have to manually download the manifest and replace `amd64` occurences with your chosen platform.
```shell ```shell
kubectl apply -f https://raw.githubusercontent.com/coreos/flannel/master/Documentation/kube-flannel.yml kubectl apply -f https://raw.githubusercontent.com/coreos/flannel/master/Documentation/kube-flannel.yml
@@ -251,7 +251,7 @@ kubectl apply -f https://raw.githubusercontent.com/coreos/flannel/master/Documen
{% capture romana %} {% capture romana %}
The official Romana set-up guide is [here](https://github.com/romana/romana/tree/master/containerize#using-kubeadm) The official Romana set-up guide is [here](https://github.com/romana/romana/tree/master/containerize#using-kubeadm).
**Note:** Romana works on `amd64` only. **Note:** Romana works on `amd64` only.
@@ -262,7 +262,7 @@ kubectl apply -f https://raw.githubusercontent.com/romana/romana/master/containe
{% capture weave_net %} {% capture weave_net %}
The official Weave Net set-up guide is [here](https://www.weave.works/docs/net/latest/kube-addon/) The official Weave Net set-up guide is [here](https://www.weave.works/docs/net/latest/kube-addon/).
**Note:** Weave Net works on `amd64`, `arm` and `arm64` without any extra action required. **Note:** Weave Net works on `amd64`, `arm` and `arm64` without any extra action required.
@@ -297,7 +297,7 @@ kubectl taint nodes --all node-role.kubernetes.io/master-
With output looking something like: With output looking something like:
``` ```
node "test-01" tainted node "test-01" untainted
taint key="dedicated" and effect="" not found. taint key="dedicated" and effect="" not found.
taint key="dedicated" and effect="" not found. taint key="dedicated" and effect="" not found.
``` ```
@@ -481,7 +481,7 @@ v1.7.
kubeadm deb/rpm packages and binaries are built for amd64, arm (32-bit), arm64, ppc64le, and s390x kubeadm deb/rpm packages and binaries are built for amd64, arm (32-bit), arm64, ppc64le, and s390x
following the [multi-platform following the [multi-platform
proposal](https://github.com/kubernetes/kubernetes/blob/master/docs/proposals/multi-platform.md). proposal](https://github.com/kubernetes/community/blob/master/contributors/design-proposals/multi-platform.md).
Only some of the network providers offer solutions for all platforms. Please consult the list of Only some of the network providers offer solutions for all platforms. Please consult the list of
network providers above or the documentation from each provider to figure out whether the provider network providers above or the documentation from each provider to figure out whether the provider
@@ -538,9 +538,7 @@ You may have trouble in the configuration if you see Pod statuses like `RunConta
second network interface, not the first one). By default, it doesn't do this second network interface, not the first one). By default, it doesn't do this
and kubelet ends-up using first non-loopback network interface, which is and kubelet ends-up using first non-loopback network interface, which is
usually NATed. Workaround: Modify `/etc/hosts`, take a look at this usually NATed. Workaround: Modify `/etc/hosts`, take a look at this
[`Vagrantfile`][ubuntu-vagrantfile] for how this can be achieved. `Vagrantfile`[ubuntu-vagrantfile](https://github.com/errordeveloper/k8s-playground/blob/22dd39dfc06111235620e6c4404a96ae146f26fd/Vagrantfile#L11) for how this can be achieved.
[ubuntu-vagrantfile]: https://github.com/errordeveloper/k8s-playground/blob/22dd39dfc06111235620e6c4404a96ae146f26fd/Vagrantfile#L11)
1. The following error indicates a possible certificate mismatch. 1. The following error indicates a possible certificate mismatch.
@@ -559,6 +557,27 @@ Another workaround is to overwrite the default `kubeconfig` for the "admin" user
sudo chown $(id -u):$(id -g) $HOME/.kube/config sudo chown $(id -u):$(id -g) $HOME/.kube/config
``` ```
1. If you are using CentOS and encounter difficulty while setting up the master node
verify that your Docker cgroup driver matches the kubelet config:
```
docker info |grep -i cgroup
cat /etc/systemd/system/kubelet.service.d/10-kubeadm.conf
```
If the Docker cgroup driver and the kubelet config don't match, change the kubelet config to match the Docker cgroup driver:
```
update KUBELET_CGROUP_ARGS=--cgroup-driver=systemd to KUBELET_CGROUP_ARGS=--cgroup-driver=cgroupfs
```
Then restart kubelet:
```
systemctl daemon-reload
service kubelet restart
```
The `kubectl describe pod` or `kubectl logs` commands can help you diagnose errors. For example: The `kubectl describe pod` or `kubectl logs` commands can help you diagnose errors. For example:
```bash ```bash
@@ -569,5 +588,4 @@ kubectl -n ${NAMESPACE} logs ${POD_NAME} -c ${CONTAINER_NAME}
{% endcapture %} {% endcapture %}
{% include templates/task.md %} {% include templates/task.md %}
@@ -200,7 +200,7 @@ You have several options for connecting to nodes, pods and services from outside
or it may expose it to the internet. Think about whether the service being exposed is secure. or it may expose it to the internet. Think about whether the service being exposed is secure.
Does it do its own authentication? Does it do its own authentication?
- Place pods behind services. To access one specific pod from a set of replicas, such as for debugging, - Place pods behind services. To access one specific pod from a set of replicas, such as for debugging,
place a unique label on the pod it and create a new service which selects this label. place a unique label on the pod and create a new service which selects this label.
- In most cases, it should not be necessary for application developer to directly access - In most cases, it should not be necessary for application developer to directly access
nodes via their nodeIPs. nodes via their nodeIPs.
- Access services, nodes, or pods using the Proxy Verb. - Access services, nodes, or pods using the Proxy Verb.
@@ -202,15 +202,15 @@ The rules for loading and merging the kubeconfig files are straightforward, but
Otherwise, use HomeDirectoryLocation (`~/.kube/config`) with no merging. Otherwise, use HomeDirectoryLocation (`~/.kube/config`) with no merging.
1. Determine the context to use based on the first hit in this chain 1. Determine the context to use based on the first hit in this chain
1. command line argument - the value of the `context` command line option 1. Command line argument - the value of the `context` command line option
1. `current-context` from the merged kubeconfig file 1. `current-context` from the merged kubeconfig file
1. Empty is allowed at this stage 1. Empty is allowed at this stage
1. Determine the cluster info and user to use. At this point, we may or may not have a context. They are built based on the first hit in this chain. (run it twice, once for user, once for cluster) 1. Determine the cluster info and user to use. At this point, we may or may not have a context. They are built based on the first hit in this chain. (run it twice, once for user, once for cluster)
1. command line argument - `user` for user name and `cluster` for cluster name 1. Command line argument - `user` for user name and `cluster` for cluster name
1. If context is present, then use the context's value 1. If context is present, then use the context's value
1. Empty is allowed 1. Empty is allowed
1. Determine the actual cluster info to use. At this point, we may or may not have a cluster info. Build each piece of the cluster info based on the chain (first hit wins): 1. Determine the actual cluster info to use. At this point, we may or may not have a cluster info. Build each piece of the cluster info based on the chain (first hit wins):
1. command line arguments - `server`, `api-version`, `certificate-authority`, and `insecure-skip-tls-verify` 1. Command line arguments - `server`, `api-version`, `certificate-authority`, and `insecure-skip-tls-verify`
1. If cluster info is present and a value for the attribute is present, use it. 1. If cluster info is present and a value for the attribute is present, use it.
1. If you don't have a server location, error. 1. If you don't have a server location, error.
1. Determine the actual user info to use. User is built using the same rules as cluster info, EXCEPT that you can only have one authentication technique per user. 1. Determine the actual user info to use. User is built using the same rules as cluster info, EXCEPT that you can only have one authentication technique per user.
@@ -16,7 +16,7 @@ well as any provider specific details that may be necessary.
by using `spec.loadBalancerSourceRanges`. This field takes a list of IP CIDR ranges, which Kubernetes will use to configure firewall exceptions. by using `spec.loadBalancerSourceRanges`. This field takes a list of IP CIDR ranges, which Kubernetes will use to configure firewall exceptions.
This feature is currently supported on Google Compute Engine, Google Container Engine and AWS. This field will be ignored if the cloud provider does not support the feature. This feature is currently supported on Google Compute Engine, Google Container Engine and AWS. This field will be ignored if the cloud provider does not support the feature.
Assuming 10.0.0.0/8 is the internal subnet. In the following example, a load balancer will be created that is only accessible to cluster internal ips. Assuming 10.0.0.0/8 is the internal subnet. In the following example, a load balancer will be created that is only accessible to cluster internal IPs.
This will not allow clients from outside of your Kubernetes cluster to access the load balancer. This will not allow clients from outside of your Kubernetes cluster to access the load balancer.
```yaml ```yaml
@@ -26,8 +26,8 @@ metadata:
name: myapp name: myapp
spec: spec:
ports: ports:
- port: 8765 - port: 8765
targetPort: 9376 targetPort: 9376
selector: selector:
app: example app: example
type: LoadBalancer type: LoadBalancer
@@ -44,8 +44,8 @@ metadata:
name: myapp name: myapp
spec: spec:
ports: ports:
- port: 8765 - port: 8765
targetPort: 9376 targetPort: 9376
selector: selector:
app: example app: example
type: LoadBalancer type: LoadBalancer
@@ -65,7 +65,7 @@ kubectl expose rc example --port=8765 --target-port=9376 \
This command creates a new service using the same selectors as the referenced This command creates a new service using the same selectors as the referenced
resource (in the case of the example above, a replication controller named resource (in the case of the example above, a replication controller named
`example`.) `example`).
For more information, including optional flags, refer to the For more information, including optional flags, refer to the
[`kubectl expose` reference](/docs/user-guide/kubectl/v1.6/#expose). [`kubectl expose` reference](/docs/user-guide/kubectl/v1.6/#expose).
@@ -7,9 +7,9 @@ spec:
app: hello app: hello
tier: frontend tier: frontend
ports: ports:
- protocol: "TCP" - protocol: "TCP"
port: 80 port: 80
targetPort: 80 targetPort: 80
type: LoadBalancer type: LoadBalancer
--- ---
apiVersion: apps/v1beta1 apiVersion: apps/v1beta1
@@ -26,9 +26,9 @@ spec:
track: stable track: stable
spec: spec:
containers: containers:
- name: nginx - name: nginx
image: "gcr.io/google-samples/hello-frontend:1.0" image: "gcr.io/google-samples/hello-frontend:1.0"
lifecycle: lifecycle:
preStop: preStop:
exec: exec:
command: ["/usr/sbin/nginx","-s","quit"] command: ["/usr/sbin/nginx","-s","quit"]
@@ -7,6 +7,6 @@ spec:
app: hello app: hello
tier: backend tier: backend
ports: ports:
- protocol: TCP - protocol: TCP
port: 80 port: 80
targetPort: http targetPort: http
@@ -34,7 +34,7 @@ You can access Dashboard using the kubectl command-line tool by running the foll
$ kubectl proxy $ kubectl proxy
``` ```
kubectl will handle authentication with apiserver and make Dashboard available at http://localhost:8001/ui Kubectl will handle authentication with apiserver and make Dashboard available at http://localhost:8001/ui.
The UI can _only_ be accessed from the machine where the command is executed. See `kubectl proxy --help` for more options. The UI can _only_ be accessed from the machine where the command is executed. See `kubectl proxy --help` for more options.
@@ -13,7 +13,7 @@ This page shows how to use an HTTP proxy to access the Kubernetes API.
* If you do not already have an application running in your cluster, start * If you do not already have an application running in your cluster, start
a Hello world application by entering this command: a Hello world application by entering this command:
kubectl run node-hello --image=gcr.io/google-samples/node-hello:1.0 --port=8080 kubectl run node-hello --image=gcr.io/google-samples/node-hello:1.0 --port=8080
{% endcapture %} {% endcapture %}
@@ -100,11 +100,11 @@ If you haven't specified a name for your port, you don't have to specify *port_n
#### Using web browsers to access services running on the cluster #### Using web browsers to access services running on the cluster
You may be able to put an apiserver proxy url into the address bar of a browser. However: You may be able to put an apiserver proxy URL into the address bar of a browser. However:
- Web browsers cannot usually pass tokens, so you may need to use basic (password) auth. Apiserver can be configured to accept basic auth, - Web browsers cannot usually pass tokens, so you may need to use basic (password) auth. Apiserver can be configured to accept basic auth,
but your cluster may not be configured to accept basic auth. but your cluster may not be configured to accept basic auth.
- Some web apps may not work, particularly those with client side javascript that construct urls in a - Some web apps may not work, particularly those with client side javascript that construct URLs in a
way that is unaware of the proxy path prefix. way that is unaware of the proxy path prefix.
{% endcapture %} {% endcapture %}
@@ -43,7 +43,7 @@ the corresponding `PersistentVolume` is not be deleted. Instead, it is moved to
This list also includes the name of the claims that are bound to each volume This list also includes the name of the claims that are bound to each volume
for easier identification of dynamically provisioned volumes. for easier identification of dynamically provisioned volumes.
1. Chose one of your PersistentVolumes and change its reclaim policy: 1. Choose one of your PersistentVolumes and change its reclaim policy:
kubectl patch pv <your-pv-name> -p '{"spec":{"persistentVolumeReclaimPolicy":"Retain"}}' kubectl patch pv <your-pv-name> -p '{"spec":{"persistentVolumeReclaimPolicy":"Retain"}}'
@@ -0,0 +1,78 @@
---
assignees:
- danwent
title: Use Cilium for NetworkPolicy
---
{% capture overview %}
This page shows how to use Cilium for NetworkPolicy.
For background on Cilium, read the [Introduction to Cilium](http://cilium.readthedocs.io/en/latest/intro/).
{% endcapture %}
{% capture prerequisites %}
{% include task-tutorial-prereqs.md %}
{% endcapture %}
{% capture steps %}
## Deploying Cilium on Minikube for Basic Testing
To get familiar with Cilium easily you can follow the
[Cilium Kubernetes Getting Started Guide](http://www.cilium.io/try)
to perform a basic DaemonSet installation of Cilium in minikube.
Installation in a minikube setup uses a simple ''all-in-one'' YAML
file that includes DaemonSet configurations for Cilium and a key-value store
(consul) as well as appropriate RBAC settings:
```shell
$ kubectl create -f https://raw.githubusercontent.com/cilium/cilium/master/examples/minikube/cilium-ds.yaml
clusterrole "cilium" created
serviceaccount "cilium" created
clusterrolebinding "cilium" created
daemonset "cilium-consul" created
daemonset "cilium" created
```
The remainder of the Getting Started Guide explains how to enforce both L3/L4 (i.e., IP address + port) security
policies, as well as L7 (e.g., HTTP) security policies using an example application.
## Deploying Cilium for Production Use
For detailed instructions around deploying Cilium for production, see:
[Cilium Administrator Guide](http://cilium.readthedocs.io/en/latest/admin/) This
documentation includes detailed requirements, instructions and example production DaemonSet files.
{% endcapture %}
{% capture discussion %}
## Understanding Cilium components
Deploying a cluster with Cilium adds Pods to the `kube-system` namespace. To see this list of Pods run:
```shell
kubectl get pods --namespace=kube-system
```
You'll see a list of Pods similar to this:
```console
NAME DESIRED CURRENT READY NODE-SELECTOR AGE
cilium 1 1 1 <none> 2m
...
```
There are two main components to be aware of:
- One `cilium` Pod runs on each node in your cluster and enforces network policy on the traffic to/from Pods on that node using Linux BPF.
- For production deployments, Cilium should leverage the key-value store cluster (e.g., etcd) used by Kubernetes, which typically runs on the Kubernetes master nodes. The [Cilium Administrator Guide](http://cilium.readthedocs.io/en/latest/admin/) includes an example DaemonSet which can be customized to point to this key-value store cluster. The simple ''all-in-one'' DaemonSet for minikube requires no such configuration because it automatically deploys a `cilium-consul` Pod to provide a key-value store.
{% endcapture %}
{% capture whatsnext %}
Once your cluster is running, you can follow the [NetworkPolicy getting started guide](/docs/getting-started-guides/network-policy/walkthrough) to try out Kubernetes NetworkPolicy with Cilium. Have fun, and if you have questions, contact us using the [Cilium Slack Channel](https://cilium.herokuapp.com/).
{% endcapture %}
{% include templates/task.md %}
@@ -194,7 +194,7 @@ If the majority of etcd members have permanently failed, the etcd cluster is con
The upgrade procedure described in this document assumes that either: The upgrade procedure described in this document assumes that either:
1. The etcd cluster has only a single node 1. The etcd cluster has only a single node.
2. The etcd cluster has multiple nodes. 2. The etcd cluster has multiple nodes.
In this case, the upgrade procedure requires shutting down the In this case, the upgrade procedure requires shutting down the
@@ -243,7 +243,7 @@ kubectl delete namespace constraints-cpu-example
* [Configure Default Memory Requests and Limits for a Namespace](/docs/tasks/administer-cluster/memory-default-namespace/) * [Configure Default Memory Requests and Limits for a Namespace](/docs/tasks/administer-cluster/memory-default-namespace/)
* [Configure Default CPU Requests and Limits for a Namespace](/docs/tasks/administer-cluster/default-cpu-request-limit/) * [Configure Default CPU Requests and Limits for a Namespace](/docs/tasks/administer-cluster/cpu-default-namespace/)
* [Configure Minimum and Maximum Memory Constraints for a Namespace](/docs/tasks/administer-cluster/memory-constraint-namespace/) * [Configure Minimum and Maximum Memory Constraints for a Namespace](/docs/tasks/administer-cluster/memory-constraint-namespace/)
@@ -5,13 +5,14 @@ approvers:
title: Declare Network Policy title: Declare Network Policy
--- ---
{% capture overview %} {% capture overview %}
This document helps you get started using using the Kubernetes [NetworkPolicy API](/docs/concepts/services-networking/network-policies/) to declare network policies that govern how pods communicate with each other. This document helps you get started using the Kubernetes [NetworkPolicy API](/docs/concepts/services-networking/network-policies/) to declare network policies that govern how pods communicate with each other.
{% endcapture %} {% endcapture %}
{% capture prerequisites %} {% capture prerequisites %}
You'll need to have a Kubernetes cluster in place, with network policy support. There are a number of network providers that support NetworkPolicy, including: You'll need to have a Kubernetes cluster in place, with network policy support. There are a number of network providers that support NetworkPolicy, including:
* [Calico](/docs/tasks/configure-pod-container/calico-network-policy/) * [Calico](/docs/tasks/configure-pod-container/calico-network-policy/)
* [Cilium](/docs/tasks/configure-pod-container/cilium-network-policy/)
* [Romana](/docs/tasks/configure-pod-container/romana-network-policy/) * [Romana](/docs/tasks/configure-pod-container/romana-network-policy/)
* [Weave Net](/docs/tasks/configure-pod-container/weave-network-policy/) * [Weave Net](/docs/tasks/configure-pod-container/weave-network-policy/)
@@ -93,7 +93,7 @@ routed according to the following flow:
## ConfigMap options ## ConfigMap options
Options for the kube-dns `kube-system:kube-dns` ConfigMap Options for the kube-dns `kube-system:kube-dns` ConfigMap:
| Field | Format | Description | | Field | Format | Description |
| ----- | ------ | ----------- | | ----- | ------ | ----------- |
@@ -107,7 +107,7 @@ Options for the kube-dns `kube-system:kube-dns` ConfigMap
In this example, the user has a Consul DNS service discovery system that they wish to In this example, the user has a Consul DNS service discovery system that they wish to
integrate with kube-dns. The consul domain server is located at 10.150.0.1, and integrate with kube-dns. The consul domain server is located at 10.150.0.1, and
all consul names have the suffix “.consul.local”. To configure Kubernetes, the all consul names have the suffix “.consul.local”. To configure Kubernetes, the
cluster administrator simply creates a ConfigMap object as shown below. cluster administrator simply creates a ConfigMap object as shown below.
```yaml ```yaml
apiVersion: v1 apiVersion: v1
@@ -83,7 +83,7 @@ is the first provider, the first key is used for encryption.
## Encrypting your data ## Encrypting your data
Create a new encryption config file Create a new encryption config file:
```yaml ```yaml
kind: EncryptionConfig kind: EncryptionConfig
@@ -107,9 +107,9 @@ To create a new secret perform the following steps:
head -c 32 /dev/urandom | base64 head -c 32 /dev/urandom | base64
``` ```
2. Place that value in the secret field. 2. Place that value in the secret field.
3. Set the `--experimental-encryption-provider-config` flag on the `kube-apiserver` to point to the location of the config file 3. Set the `--experimental-encryption-provider-config` flag on the `kube-apiserver` to point to the location of the config file.
4. Restart your API server. 4. Restart your API server.
**IMPORTANT:** Your config file contains keys that can decrypt content in etcd, so you must properly restrict permissions on your masters so only the user who runs the kube-apiserver can read it. **IMPORTANT:** Your config file contains keys that can decrypt content in etcd, so you must properly restrict permissions on your masters so only the user who runs the kube-apiserver can read it.
@@ -168,7 +168,7 @@ the presence of a highly available deployment where multiple `kube-apiserver` pr
5. Run `kubectl get secrets -o json | kubectl replace -f -` to encrypt all existing secrets with the new key 5. Run `kubectl get secrets -o json | kubectl replace -f -` to encrypt all existing secrets with the new key
6. Remove the old decryption key from the config after you back up etcd with the new key in use and update all secrets 6. Remove the old decryption key from the config after you back up etcd with the new key in use and update all secrets
With a single `kube-apiserver`, step 2 may be skipped With a single `kube-apiserver`, step 2 may be skipped.
## Decrypting all data ## Decrypting all data
@@ -7,7 +7,7 @@ This page shows how to configure and enable the ip-masq-agent.
{% endcapture %} {% endcapture %}
{% capture prerequisites %} {% capture prerequisites %}
Kubernetes 1.7
{% include task-tutorial-prereqs.md %} {% include task-tutorial-prereqs.md %}
{% endcapture %} {% endcapture %}
@@ -195,7 +195,7 @@ resources:
``` ```
Because your Container did not specify its own memory request and limit, it was given the Because your Container did not specify its own memory request and limit, it was given the
[default memory request and limit](/docs/tasks/administer-cluster/default-memory-request-limit/) [default memory request and limit](/docs/tasks/administer-cluster/memory-default-namespace/)
from the LimitRange. from the LimitRange.
At this point, your Container might be running or it might not be running. Recall that a prerequisite At this point, your Container might be running or it might not be running. Recall that a prerequisite
@@ -245,7 +245,7 @@ kubectl delete namespace constraints-mem-example
* [Configure Default Memory Requests and Limits for a Namespace](/docs/tasks/administer-cluster/memory-default-namespace/) * [Configure Default Memory Requests and Limits for a Namespace](/docs/tasks/administer-cluster/memory-default-namespace/)
* [Configure Default CPU Requests and Limits for a Namespace](/docs/tasks/administer-cluster/default-cpu-request-limit/) * [Configure Default CPU Requests and Limits for a Namespace](/docs/tasks/administer-cluster/cpu-default-namespace/)
* [Configure Minimum and Maximum CPU Constraints for a Namespace](/docs/tasks/administer-cluster/cpu-constraint-namespace/) * [Configure Minimum and Maximum CPU Constraints for a Namespace](/docs/tasks/administer-cluster/cpu-constraint-namespace/)
@@ -166,7 +166,7 @@ it can be allowed to run in a namespace that is restricted by a quota.
### For cluster administrators ### For cluster administrators
* [Configure Default CPU Requests and Limits for a Namespace](/docs/tasks/administer-cluster/default-cpu-request-limit/) * [Configure Default CPU Requests and Limits for a Namespace](/docs/tasks/administer-cluster/cpu-default-namespace/)
* [Configure Minimum and Maximum Memory Constraints for a Namespace](/docs/tasks/administer-cluster/memory-constraint-namespace/) * [Configure Minimum and Maximum Memory Constraints for a Namespace](/docs/tasks/administer-cluster/memory-constraint-namespace/)
+1 -1
View File
@@ -205,7 +205,7 @@ $ kubectl config current-context
lithe-cocoa-92103_kubernetes lithe-cocoa-92103_kubernetes
``` ```
The next step is to define a context for the kubectl client to work in each namespace. The value of "cluster" and "user" fields are copied from the current context. The next step is to define a context for the kubectl client to work in each namespace. The values of "cluster" and "user" fields are copied from the current context.
```shell ```shell
$ kubectl config set-context dev --namespace=development --cluster=lithe-cocoa-92103_kubernetes --user=lithe-cocoa-92103_kubernetes $ kubectl config set-context dev --namespace=development --cluster=lithe-cocoa-92103_kubernetes --user=lithe-cocoa-92103_kubernetes
@@ -205,7 +205,7 @@ it will begin evicting pods.
The `kubelet` ranks pods for eviction as follows: The `kubelet` ranks pods for eviction as follows:
* by their quality of service * by their quality of service.
* by the consumption of the starved compute resource relative to the pods scheduling request. * by the consumption of the starved compute resource relative to the pods scheduling request.
As a result, pod eviction occurs in the following order: As a result, pod eviction occurs in the following order:
@@ -147,7 +147,7 @@ kubectl delete namespace quota-object-example
* [Configure Default Memory Requests and Limits for a Namespace](/docs/tasks/administer-cluster/memory-default-namespace/) * [Configure Default Memory Requests and Limits for a Namespace](/docs/tasks/administer-cluster/memory-default-namespace/)
* [Configure Default CPU Requests and Limits for a Namespace](/docs/tasks/administer-cluster/default-cpu-request-limit/) * [Configure Default CPU Requests and Limits for a Namespace](/docs/tasks/administer-cluster/cpu-default-namespace/)
* [Configure Minimum and Maximum Memory Constraints for a Namespace](/docs/tasks/administer-cluster/memory-constraint-namespace/) * [Configure Minimum and Maximum Memory Constraints for a Namespace](/docs/tasks/administer-cluster/memory-constraint-namespace/)
@@ -152,7 +152,7 @@ kubectl delete namespace quota-mem-cpu-example
* [Configure Default Memory Requests and Limits for a Namespace](/docs/tasks/administer-cluster/memory-default-namespace/) * [Configure Default Memory Requests and Limits for a Namespace](/docs/tasks/administer-cluster/memory-default-namespace/)
* [Configure Default CPU Requests and Limits for a Namespace](/docs/tasks/administer-cluster/default-cpu-request-limit/) * [Configure Default CPU Requests and Limits for a Namespace](/docs/tasks/administer-cluster/cpu-default-namespace/)
* [Configure Minimum and Maximum Memory Constraints for a Namespace](/docs/tasks/administer-cluster/memory-constraint-namespace/) * [Configure Minimum and Maximum Memory Constraints for a Namespace](/docs/tasks/administer-cluster/memory-constraint-namespace/)
@@ -113,7 +113,7 @@ kubectl delete namespace quota-pod-example
* [Configure Default Memory Requests and Limits for a Namespace](/docs/tasks/administer-cluster/memory-default-namespace/) * [Configure Default Memory Requests and Limits for a Namespace](/docs/tasks/administer-cluster/memory-default-namespace/)
* [Configure Default CPU Requests and Limits for a Namespace](/docs/tasks/administer-cluster/default-cpu-request-limit/) * [Configure Default CPU Requests and Limits for a Namespace](/docs/tasks/administer-cluster/cpu-default-namespace/)
* [Configure Minimum and Maximum Memory Constraints for a Namespace](/docs/tasks/administer-cluster/memory-constraint-namespace/) * [Configure Minimum and Maximum Memory Constraints for a Namespace](/docs/tasks/administer-cluster/memory-constraint-namespace/)
@@ -16,8 +16,8 @@ In future Kubernetes releases, cloud vendors should link code that satisfies the
To build cloud-controller-manager for your cloud, follow these steps: To build cloud-controller-manager for your cloud, follow these steps:
* Write a cloudprovider that satisfies the [cloudprovider.Interface](https://git.k8s.io/kubernetes/pkg/cloudprovider/cloud.go). 1. Write a cloudprovider that satisfies the [cloudprovider.Interface](https://git.k8s.io/kubernetes/pkg/cloudprovider/cloud.go).
* Link the cloudprovider to cloud-controller-manager 2. Link the cloudprovider to cloud-controller-manager.
The methods in [cloudprovider.Interface](https://git.k8s.io/kubernetes/pkg/cloudprovider/cloud.go) are self-explanatory. All of the The methods in [cloudprovider.Interface](https://git.k8s.io/kubernetes/pkg/cloudprovider/cloud.go) are self-explanatory. All of the
[existing providers](https://git.k8s.io/kubernetes/pkg/cloudprovider/providers) satisfy this interface. If your cloud is already a part [existing providers](https://git.k8s.io/kubernetes/pkg/cloudprovider/providers) satisfy this interface. If your cloud is already a part
@@ -34,7 +34,7 @@ You can use `kubectl drain` to safely evict all of your pods from a
node before you perform maintenance on the node (e.g. kernel upgrade, node before you perform maintenance on the node (e.g. kernel upgrade,
hardware maintenance, etc.). Safe evictions allow the pod's containers hardware maintenance, etc.). Safe evictions allow the pod's containers
to to
[gracefully terminate](/docs/user-guide/production-pods.md#lifecycle-hooks-and-termination-notice) and [gracefully terminate](/docs/tasks/#lifecycle-hooks-and-termination-notice) and
will respect the `PodDisruptionBudgets` you have specified. will respect the `PodDisruptionBudgets` you have specified.
**Note:** By default `kubectl drain` will ignore certain system pods on the node **Note:** By default `kubectl drain` will ignore certain system pods on the node
@@ -107,7 +107,7 @@ policy.
The [network policies](/docs/tasks/administer-cluster/declare-network-policy/) for a namespace The [network policies](/docs/tasks/administer-cluster/declare-network-policy/) for a namespace
allows application authors to restrict which pods in other namespaces may access pods and ports allows application authors to restrict which pods in other namespaces may access pods and ports
within their namespace. Many of the supported [Kubernetes networking providers](/docs/concepts/cluster-administration/networking/) within their namespaces. Many of the supported [Kubernetes networking providers](/docs/concepts/cluster-administration/networking/)
now respect network policy. now respect network policy.
Quota and limit ranges can also be used to control whether users may request node ports or Quota and limit ranges can also be used to control whether users may request node ports or
@@ -94,7 +94,7 @@ $ export KUBECONFIG=/path/to/standalone/.kube/config
* The ca_file, key_file, and cert_file referenced above are generated on the * The ca_file, key_file, and cert_file referenced above are generated on the
kube master at cluster turnup. They can be found on the master under kube master at cluster turnup. They can be found on the master under
`/srv/kubernetes`. Bearer token/basic auth are also generated on the kube master. `/srv/kubernetes`. Bearer token/basic auth is also generated on the kube master.
For more details on `kubeconfig` see [Authenticating Across Clusters with kubeconfig](/docs/concepts/cluster-administration/authenticate-across-clusters-kubeconfig/), For more details on `kubeconfig` see [Authenticating Across Clusters with kubeconfig](/docs/concepts/cluster-administration/authenticate-across-clusters-kubeconfig/),
and/or run `kubectl config -h`. and/or run `kubectl config -h`.
@@ -84,7 +84,6 @@ If we look at our Kubernetes API server (running on host `my-master`), we see th
[joe@my-master ~] $ kubectl get pods [joe@my-master ~] $ kubectl get pods
NAME READY STATUS RESTARTS AGE NAME READY STATUS RESTARTS AGE
static-web-my-node1 1/1 Running 0 2m static-web-my-node1 1/1 Running 0 2m
``` ```
Labels from the static pod are propagated into the mirror-pod and can be used as usual for filtering. Labels from the static pod are propagated into the mirror-pod and can be used as usual for filtering.
@@ -97,7 +96,6 @@ pods/static-web-my-node1
[joe@my-master ~] $ kubectl get pods [joe@my-master ~] $ kubectl get pods
NAME READY STATUS RESTARTS AGE NAME READY STATUS RESTARTS AGE
static-web-my-node1 1/1 Running 0 12s static-web-my-node1 1/1 Running 0 12s
``` ```
Back to our `my-node1` host, we can try to stop the container manually and see, that kubelet automatically restarts it in a while: Back to our `my-node1` host, we can try to stop the container manually and see, that kubelet automatically restarts it in a while:
+2 -2
View File
@@ -78,7 +78,7 @@ kubectl --context=rivendell label cluster gondor key1=value1 key2=value2
Starting in Kubernetes 1.7, there is alpha support for directing objects across the federated clusters with the annotation `federation.alpha.kubernetes.io/cluster-selector`. The *ClusterSelector* is conceptually similar to `nodeSelector`, but instead of selecting against labels on nodes, it selects against labels on federated clusters. Starting in Kubernetes 1.7, there is alpha support for directing objects across the federated clusters with the annotation `federation.alpha.kubernetes.io/cluster-selector`. The *ClusterSelector* is conceptually similar to `nodeSelector`, but instead of selecting against labels on nodes, it selects against labels on federated clusters.
The annotation value must be json formatted and must be parsable into the [ClusterSelector API type](/docs/reference/federation/v1beta1/definitions/#_v1beta1_clusterselector). For example: `[{"key": "load", "operator": "Lt", "values": ["10"]}]`. Content that doesn't parse correctly will throw an error and prevent distribution of the object to any federated clusters. Objects of type Configmap, Secret, Daemonset, Service and Ingress are included in the alpha implementation. The annotation value must be JSON formatted and must be parsable into the [ClusterSelector API type](/docs/reference/federation/v1beta1/definitions/#_v1beta1_clusterselector). For example: `[{"key": "load", "operator": "Lt", "values": ["10"]}]`. Content that doesn't parse correctly will throw an error and prevent distribution of the object to any federated clusters. Objects of type ConfigMap, Secret, Daemonset, Service and Ingress are included in the alpha implementation.
Here is an example ClusterSelector annotation, which will only select clusters WITH the label `pci=true` and WITHOUT the label `environment=test`: Here is an example ClusterSelector annotation, which will only select clusters WITH the label `pci=true` and WITHOUT the label `environment=test`:
@@ -102,7 +102,7 @@ Currently, only integers are supported with `Gt` or `Lt`.
## Clusters API reference ## Clusters API reference
The full clusters API reference is currently in `federation/v1beta1` and more details can be found in details in the The full clusters API reference is currently in `federation/v1beta1` and more details can be found in the
[Federation API reference page](/docs/reference/federation/). [Federation API reference page](/docs/reference/federation/).
{% endcapture %} {% endcapture %}
+6 -6
View File
@@ -78,7 +78,7 @@ You can create a federated ingress in any of the usual ways, for example, using
``` shell ``` shell
kubectl --context=federation-cluster create -f myingress.yaml kubectl --context=federation-cluster create -f myingress.yaml
``` ```
For example ingress YAML configurations, see the [Ingress User Guide](/docs/concepts/services-networking/ingress/) For example ingress YAML configurations, see the [Ingress User Guide](/docs/concepts/services-networking/ingress/).
The '--context=federation-cluster' flag tells kubectl to submit the The '--context=federation-cluster' flag tells kubectl to submit the
request to the Federation API endpoint, with the appropriate request to the Federation API endpoint, with the appropriate
credentials. If you have not yet configured such a context, see the credentials. If you have not yet configured such a context, see the
@@ -183,7 +183,7 @@ services need to be identical. If you're using a federated service
this is easy to do. Simply pick a node port that is not already this is easy to do. Simply pick a node port that is not already
being used in any of your clusters, and add that to the spec of your being used in any of your clusters, and add that to the spec of your
federated service. If you do not specify a node port for your federated service. If you do not specify a node port for your
federated service, each cluster will choose it's own node port for federated service, each cluster will choose its own node port for
its cluster-local shard of the service, and these will probably end its cluster-local shard of the service, and these will probably end
up being different, which is not what you want. up being different, which is not what you want.
@@ -253,7 +253,7 @@ how to bring up a cluster federation correctly (or have your cluster administrat
Check that: Check that:
1. Your clusters are correctly registered in the Cluster Federation API (`kubectl describe clusters`) 1. Your clusters are correctly registered in the Cluster Federation API. (`kubectl describe clusters`)
2. Your clusters are all 'Active'. This means that the cluster 2. Your clusters are all 'Active'. This means that the cluster
Federation system was able to connect and authenticate against the Federation system was able to connect and authenticate against the
clusters' endpoints. If not, consult the event logs of the federation-controller-manager pod to ascertain what the failure might be. (`kubectl --namespace=federation logs $(kubectl get pods --namespace=federation -l module=federation-controller-manager -o name`) clusters' endpoints. If not, consult the event logs of the federation-controller-manager pod to ascertain what the failure might be. (`kubectl --namespace=federation logs $(kubectl get pods --namespace=federation -l module=federation-controller-manager -o name`)
@@ -276,7 +276,7 @@ Check that:
2. The load balancer controllers in each of your clusters are of the 2. The load balancer controllers in each of your clusters are of the
correct type ("GLBC") and have been correctly reconfigured by the correct type ("GLBC") and have been correctly reconfigured by the
federation control plane to share a global GCE load balancer (this federation control plane to share a global GCE load balancer (this
should happen automatically). If they of the correct type, and should happen automatically). If they are of the correct type, and
have been correctly reconfigured, the UID data item in the GLBC have been correctly reconfigured, the UID data item in the GLBC
configmap in each cluster will be identical across all clusters. configmap in each cluster will be identical across all clusters.
See See
@@ -291,9 +291,9 @@ Check that:
your GLBC will interfere with the behavior of your federated your GLBC will interfere with the behavior of your federated
ingresses created after the reconfiguration (see ingresses created after the reconfiguration (see
[the GLBC docs](https://github.com/kubernetes/ingress/blob/7dcb4ae17d5def23d3e9c878f3146ac6df61b09d/controllers/gce/README.md) [the GLBC docs](https://github.com/kubernetes/ingress/blob/7dcb4ae17d5def23d3e9c878f3146ac6df61b09d/controllers/gce/README.md)
for further information. To remedy this, for further information). To remedy this,
delete any ingresses created before the cluster joined the delete any ingresses created before the cluster joined the
federation (and had it's GLBC reconfigured), and recreate them if federation (and had its GLBC reconfigured), and recreate them if
necessary. necessary.
{% endcapture %} {% endcapture %}
@@ -56,7 +56,7 @@ federation ReplicaSet.
### Spreading Replicas in Underlying Clusters ### Spreading Replicas in Underlying Clusters
By default, replicas are spread equally in all the underlying clusters. For ex: By default, replicas are spread equally in all the underlying clusters. For example:
if you have 3 registered clusters and you create a federated ReplicaSet with if you have 3 registered clusters and you create a federated ReplicaSet with
`spec.replicas = 9`, then each ReplicaSet in the 3 clusters will have `spec.replicas = 9`, then each ReplicaSet in the 3 clusters will have
`spec.replicas=3`. `spec.replicas=3`.
@@ -119,10 +119,11 @@ Recall that by setting `-cpu "2"`, you configured the Container to attempt to us
But the Container is only being allowed to use about 1 cpu. The Container's CPU use is being But the Container is only being allowed to use about 1 cpu. The Container's CPU use is being
throttled, because the Container is attempting to use more CPU resources than its limit. throttled, because the Container is attempting to use more CPU resources than its limit.
Note: There's another possible explanation for the CPU throttling. The Node might not have **Note:** There's another possible explanation for the CPU throttling. The Node might not have
enough CPU resources available. Recall that the prerequisites for this exercise require that each of enough CPU resources available. Recall that the prerequisites for this exercise require that each of
your Nodes has at least 1 cpu. If your Container is running on a Node that has only 1 cpu, the Container your Nodes has at least 1 cpu. If your Container is running on a Node that has only 1 cpu, the Container
cannot use more than 1 cpu regardless of the CPU limit specified for the Container. cannot use more than 1 cpu regardless of the CPU limit specified for the Container.
{: .note}
## CPU units ## CPU units
@@ -255,7 +256,7 @@ kubectl delete namespace cpu-example
* [Configure Default Memory Requests and Limits for a Namespace](/docs/tasks/administer-cluster/memory-default-namespace/) * [Configure Default Memory Requests and Limits for a Namespace](/docs/tasks/administer-cluster/memory-default-namespace/)
* [Configure Default CPU Requests and Limits for a Namespace](/docs/tasks/administer-cluster/default-cpu-request-limit/) * [Configure Default CPU Requests and Limits for a Namespace](/docs/tasks/administer-cluster/cpu-default-namespace/)
* [Configure Minimum and Maximum Memory Constraints for a Namespace](/docs/tasks/administer-cluster/memory-constraint-namespace/) * [Configure Minimum and Maximum Memory Constraints for a Namespace](/docs/tasks/administer-cluster/memory-constraint-namespace/)
@@ -211,7 +211,6 @@ The output shows that the Container starts and fails repeatedly:
``` ```
... Normal Created Created container with id 66a3a20aa7980e61be4922780bf9d24d1a1d8b7395c09861225b0eba1b1f8511 ... Normal Created Created container with id 66a3a20aa7980e61be4922780bf9d24d1a1d8b7395c09861225b0eba1b1f8511
... Warning BackOff Back-off restarting failed container ... Warning BackOff Back-off restarting failed container
``` ```
View detailed information about your cluster's Nodes: View detailed information about your cluster's Nodes:
@@ -223,7 +223,8 @@ metadata:
ConfigMaps allow you to decouple configuration artifacts from image content to keep containerized applications portable. ConfigMaps allow you to decouple configuration artifacts from image content to keep containerized applications portable.
The ConfigMap API resource stores configuration data as key-value pairs. The data can be consumed in pods or provide the configurations for system components such as controllers. ConfigMap is similar to [Secrets](/docs/concepts/configuration/secret/), but provides a means of working with strings that don't contain sensitive information. Users and system components alike can store configuration data in ConfigMap. The ConfigMap API resource stores configuration data as key-value pairs. The data can be consumed in pods or provide the configurations for system components such as controllers. ConfigMap is similar to [Secrets](/docs/concepts/configuration/secret/), but provides a means of working with strings that don't contain sensitive information. Users and system components alike can store configuration data in ConfigMap.
Note: ConfigMaps should reference properties files, not replace them. Think of the ConfigMap as representing something similar to the Linux `/etc` directory and its contents. For example, if you create a [Kubernetes Volume](/docs/concepts/storage/volumes/) from a ConfigMap, each data item in the ConfigMap is represented by an individual file in the volume. **Note:** ConfigMaps should reference properties files, not replace them. Think of the ConfigMap as representing something similar to the Linux `/etc` directory and its contents. For example, if you create a [Kubernetes Volume](/docs/concepts/storage/volumes/) from a ConfigMap, each data item in the ConfigMap is represented by an individual file in the volume.
{: .note}
The ConfigMap's `data` field contains the configuration data. As shown in the example below, this can be simple -- like individual properties defined using `--from-literal` -- or complex -- like configuration files or JSON blobs defined using `--from-file`. The ConfigMap's `data` field contains the configuration data. As shown in the example below, this can be simple -- like individual properties defined using `--from-literal` -- or complex -- like configuration files or JSON blobs defined using `--from-file`.
@@ -180,7 +180,7 @@ cant it is considered a failure.
{% include code.html language="yaml" file="tcp-liveness-readiness.yaml" ghlink="/docs/tasks/configure-pod-container/tcp-liveness-readiness.yaml" %} {% include code.html language="yaml" file="tcp-liveness-readiness.yaml" ghlink="/docs/tasks/configure-pod-container/tcp-liveness-readiness.yaml" %}
As you can see, configuration for a TCP check is quite similar to a HTTP check. As you can see, configuration for a TCP check is quite similar to an HTTP check.
This example uses both readiness and liveness probes. The kubelet will send the This example uses both readiness and liveness probes. The kubelet will send the
first readiness probe 5 seconds after the container starts. This will attempt to first readiness probe 5 seconds after the container starts. This will attempt to
connect to the `goproxy` container on port 8080. If the probe succeeds, the pod connect to the `goproxy` container on port 8080. If the probe succeeds, the pod
@@ -188,6 +188,7 @@ each Container.
**Note**: When a Pod consumes a PersistentVolume, the GIDs associated with the **Note**: When a Pod consumes a PersistentVolume, the GIDs associated with the
PersistentVolume are not present on the Pod resource itself. PersistentVolume are not present on the Pod resource itself.
{: .note}
{% endcapture %} {% endcapture %}
@@ -108,7 +108,8 @@ This page provides a series of usage examples demonstrating how to configure Pod
## Configure all key-value pairs in a ConfigMap as Pod environment variables ## Configure all key-value pairs in a ConfigMap as Pod environment variables
Note: This functionality is available to users running Kubernetes v1.6 and later. **Note:** This functionality is available to users running Kubernetes v1.6 and later.
{: .note}
1. Create a ConfigMap containing multiple key-value pairs. 1. Create a ConfigMap containing multiple key-value pairs.
@@ -299,7 +300,10 @@ When a ConfigMap already being consumed in a volume is updated, projected keys a
1. Kubelet doesn't support the use of ConfigMaps for pods not found on the API server. 1. Kubelet doesn't support the use of ConfigMaps for pods not found on the API server.
This includes every pod created using kubectl or indirectly via a replication controller. This includes every pod created using kubectl or indirectly via a replication controller.
It does not include pods created via the Kubelet's `--manifest-url` flag, `--config` flag, or the Kubelet REST API. (Note: these are not commonly-used ways to create pods.) It does not include pods created via the Kubelet's `--manifest-url` flag, `--config` flag, or the Kubelet REST API.
**Note:** These are not commonly-used ways to create pods.
{: .note}
{% endcapture %} {% endcapture %}
@@ -34,7 +34,7 @@ shared Volume at `/work-dir`, and the application container mounts the shared
Volume at `/usr/share/nginx/html`. The init container runs the following command Volume at `/usr/share/nginx/html`. The init container runs the following command
and then terminates: and then terminates:
wget -O /work-dir/index.html http://kubernetes.io wget -O /work-dir/index.html http://kubernetes.io
Notice that the init container writes the `index.html` file in the root directory Notice that the init container writes the `index.html` file in the root directory
of the nginx server. of the nginx server.
@@ -43,8 +43,8 @@ the Pod:
The output looks like this: The output looks like this:
NAME READY STATUS RESTARTS AGE NAME READY STATUS RESTARTS AGE
test-projected-volume 1/1 Running 0 14s test-projected-volume 1/1 Running 0 14s
1. In another terminal, get a shell to the running Container: 1. In another terminal, get a shell to the running Container:
@@ -11,10 +11,11 @@ A service account provides an identity for processes that run in a Pod.
*This is a user introduction to Service Accounts. See also the *This is a user introduction to Service Accounts. See also the
[Cluster Admin Guide to Service Accounts](/docs/admin/service-accounts-admin).* [Cluster Admin Guide to Service Accounts](/docs/admin/service-accounts-admin).*
*Note: This document describes how service accounts behave in a cluster set up **Note:** This document describes how service accounts behave in a cluster set up
as recommended by the Kubernetes project. Your cluster administrator may have as recommended by the Kubernetes project. Your cluster administrator may have
customized the behavior in your cluster, in which case this documentation may customized the behavior in your cluster, in which case this documentation may
not apply.* not apply.
{: .note}
When you (a human) access the cluster (e.g. using `kubectl`), you are When you (a human) access the cluster (e.g. using `kubectl`), you are
authenticated by the apiserver as a particular User Account (currently this is authenticated by the apiserver as a particular User Account (currently this is
@@ -159,7 +160,8 @@ token: ...
namespace: 7 bytes namespace: 7 bytes
``` ```
> Note that the content of `token` is elided here. **Note:** The content of `token` is elided here.
{: .note}
## Add ImagePullSecrets to a service account ## Add ImagePullSecrets to a service account
@@ -176,10 +178,10 @@ Next, modify the default service account for the namespace to use this secret as
```shell ```shell
kubectl patch serviceaccount default -p '{"imagePullSecrets": [{"name": "myregistrykey"}]}' kubectl patch serviceaccount default -p '{"imagePullSecrets": [{"name": "myregistrykey"}]}'
``` ```
Interactive version requiring manual edit: Interactive version requiring manual edit:
```shell ```shell
$ kubectl get serviceaccounts default -o yaml > ./sa.yaml $ kubectl get serviceaccounts default -o yaml > ./sa.yaml
$ cat sa.yaml $ cat sa.yaml
@@ -81,10 +81,11 @@ spec:
qosClass: Guaranteed qosClass: Guaranteed
``` ```
**Note**: If a Container specifies its own memory limit, but does not specify a memory request, Kubernetes **Note:** If a Container specifies its own memory limit, but does not specify a memory request, Kubernetes
automatically assigns a memory request that matches the limit. Similarly, if a Container specifies its own automatically assigns a memory request that matches the limit. Similarly, if a Container specifies its own
cpu limit, but does not specify a cpu request, Kubernetes automatically assigns a cpu request that matches cpu limit, but does not specify a cpu request, Kubernetes automatically assigns a cpu request that matches
the limit. the limit.
{: .note}
Delete your Pod: Delete your Pod:
@@ -246,7 +247,7 @@ kubectl delete namespace qos-example
* [Configure Default Memory Requests and Limits for a Namespace](/docs/tasks/administer-cluster/memory-default-namespace/) * [Configure Default Memory Requests and Limits for a Namespace](/docs/tasks/administer-cluster/memory-default-namespace/)
* [Configure Default CPU Requests and Limits for a Namespace](/docs/tasks/administer-cluster/default-cpu-request-limit/) * [Configure Default CPU Requests and Limits for a Namespace](/docs/tasks/administer-cluster/cpu-default-namespace/)
* [Configure Minimum and Maximum Memory Constraints for a Namespace](/docs/tasks/administer-cluster/memory-constraint-namespace/) * [Configure Minimum and Maximum Memory Constraints for a Namespace](/docs/tasks/administer-cluster/memory-constraint-namespace/)
@@ -294,9 +294,8 @@ bits 12 and 25 are set. Bit 12 is `CAP_NET_ADMIN`, and bit 25 is `CAP_SYS_TIME`.
See [capability.h](https://github.com/torvalds/linux/blob/master/include/uapi/linux/capability.h) See [capability.h](https://github.com/torvalds/linux/blob/master/include/uapi/linux/capability.h)
for definitions of the capability constants. for definitions of the capability constants.
**Note**: Linux capability constants have the form `CAP_XXX`. But when you list capabilities **Note:** Linux capability constants have the form `CAP_XXX`. But when you list capabilities in your Container manifest, you must omit the `CAP_` portion of the constant. For example, to add `CAP_SYS_TIME`, include `SYS_TIME` in your list of capabilities.
in your Container manifest, you must omit the `CAP_` portion of the constant. For example, {: .note}
to add `CAP_SYS_TIME`, include `SYS_TIME` in your list of capabilities.
## Assign SELinux labels to a Container ## Assign SELinux labels to a Container
@@ -313,8 +312,8 @@ securityContext:
level: "s0:c123,c456" level: "s0:c123,c456"
``` ```
**Note**: To assign SELinux labels, the SELinux security module must be loaded **Note:** To assign SELinux labels, the SELinux security module must be loaded on the host operating system.
on the host operating system. {: .note}
## Discussion ## Discussion
@@ -333,9 +332,8 @@ need to set the `level` section. This sets the
[Multi-Category Security (MCS)](https://selinuxproject.org/page/NB_MLS) [Multi-Category Security (MCS)](https://selinuxproject.org/page/NB_MLS)
label given to all Containers in the Pod as well as the Volumes. label given to all Containers in the Pod as well as the Volumes.
**Warning**: After you specify an MCS label for a Pod, all Pods with the same **Warning:** After you specify an MCS label for a Pod, all Pods with the same label can access the Volume. If you need inter-Pod protection, you must assign a unique MCS label to each Pod.
label will able to access the Volume. So if you need inter-Pod {: .warning}
protection, you must ensure each Pod is assigned a unique MCS label.
{% endcapture %} {% endcapture %}
@@ -48,7 +48,7 @@ for configuring where and how audit logs are handled:
- `audit-log-path` - enables the audit log pointing to a file where the requests are being logged to, '-' means standard out. - `audit-log-path` - enables the audit log pointing to a file where the requests are being logged to, '-' means standard out.
- `audit-log-maxage` - specifies maximum number of days to retain old audit log files based on the timestamp encoded in their filename. - `audit-log-maxage` - specifies maximum number of days to retain old audit log files based on the timestamp encoded in their filename.
- `audit-log-maxbackup` - specifies maximum number of old audit log files to retain. - `audit-log-maxbackup` - specifies maximum number of old audit log files to retain.
- `audit-log-maxsize` - specifies maximum size in megabytes of the audit log file before it gets rotated. Defaults to 100MB - `audit-log-maxsize` - specifies maximum size in megabytes of the audit log file before it gets rotated. Defaults to 100MB.
If an audit log file already exists, Kubernetes appends new audit logs to that file. If an audit log file already exists, Kubernetes appends new audit logs to that file.
Otherwise, Kubernetes creates an audit log file at the location you specified in Otherwise, Kubernetes creates an audit log file at the location you specified in
@@ -80,13 +80,13 @@ webhooks.
The structure of audit events changes when enabling the `AdvancedAuditing` feature The structure of audit events changes when enabling the `AdvancedAuditing` feature
flag. This includes some cleanups, such as the `method` reflecting the verb evaluated flag. This includes some cleanups, such as the `method` reflecting the verb evaluated
by the [authorization layer](/docs/admin/authorization/) instead of the [HTTP verb](/docs/admin/authorization/#determine-the-request-verb). by the [authorization layer](/docs/admin/authorization/) instead of the [HTTP verb](/docs/admin/authorization/#determine-the-request-verb).
Also, instead of always generating two events per request, events are recorded with an associated "stage." Also, instead of always generating two events per request, events are recorded with an associated "stage".
The known stages are: The known stages are:
- `RequestReceived` - The stage for events generated as soon as the audit handler receives the request. - `RequestReceived` - The stage for events generated as soon as the audit handler receives the request.
- `ResponseStarted` - Once the response headers are sent, but before the response body is sent. This stage is only generated for long-running requests (e.g. watch). - `ResponseStarted` - Once the response headers are sent, but before the response body is sent. This stage is only generated for long-running requests (e.g. watch).
- `ResponseComplete` - Once the response body has been completed. - `ResponseComplete` - Once the response body has been completed.
- `Panic` - Events generated when a panic occured. - `Panic` - Events generated when a panic occurred.
### Audit Policy ### Audit Policy
@@ -107,7 +107,7 @@ The policy file holds rules that determine the level of an event. Known audit le
- `Request` - log event metadata and request body but not response body. - `Request` - log event metadata and request body but not response body.
- `RequestResponse` - log event metadata, request and response bodies. - `RequestResponse` - log event metadata, request and response bodies.
When an event is processed it's compared against the list of rules in order. When an event is processed, it's compared against the list of rules in order.
The first matching rule sets the audit level of the event. The audit policy is The first matching rule sets the audit level of the event. The audit policy is
defined by the [`audit.k8s.io` API group][audit-api]. defined by the [`audit.k8s.io` API group][audit-api].
@@ -102,7 +102,7 @@ Events:
53s 53s 1 {kubelet kubernetes-node-wul5} spec.containers{nginx} Normal Started Started container with docker id 90315cc9f513 53s 53s 1 {kubelet kubernetes-node-wul5} spec.containers{nginx} Normal Started Started container with docker id 90315cc9f513
``` ```
Here you can see configuration information about the container(s) and Pod (labels, resource requirements, etc.), as well as status information about the container(s) and Pod (state, readiness, restart count, events, etc.) Here you can see configuration information about the container(s) and Pod (labels, resource requirements, etc.), as well as status information about the container(s) and Pod (state, readiness, restart count, events, etc.).
The container state is one of Waiting, Running, or Terminated. Depending on the state, additional information will be provided -- here you can see that for a container in Running state, the system tells you when the container started. The container state is one of Waiting, Running, or Terminated. Depending on the state, additional information will be provided -- here you can see that for a container in Running state, the system tells you when the container started.
@@ -7,14 +7,14 @@ title: Troubleshoot Applications
This guide is to help users debug applications that are deployed into Kubernetes and not behaving correctly. This guide is to help users debug applications that are deployed into Kubernetes and not behaving correctly.
This is *not* a guide for people who want to debug their cluster. For that you should check out This is *not* a guide for people who want to debug their cluster. For that you should check out
[this guide](/docs/admin/cluster-troubleshooting) [this guide](/docs/admin/cluster-troubleshooting).
* TOC * TOC
{:toc} {:toc}
## FAQ ## FAQ
Users are highly encouraged to check out our [FAQ](https://github.com/kubernetes/kubernetes/wiki/User-FAQ) Users are highly encouraged to check out our [FAQ](https://github.com/kubernetes/kubernetes/wiki/User-FAQ).
## Diagnosing the problem ## Diagnosing the problem
@@ -57,7 +57,7 @@ scheduled. In most cases, `hostPort` is unnecessary, try using a Service object
If a Pod is stuck in the `Waiting` state, then it has been scheduled to a worker node, but it can't run on that machine. If a Pod is stuck in the `Waiting` state, then it has been scheduled to a worker node, but it can't run on that machine.
Again, the information from `kubectl describe ...` should be informative. The most common cause of `Waiting` pods is a failure to pull the image. There are three things to check: Again, the information from `kubectl describe ...` should be informative. The most common cause of `Waiting` pods is a failure to pull the image. There are three things to check:
* Make sure that you have the name of the image correct * Make sure that you have the name of the image correct.
* Have you pushed the image to the repository? * Have you pushed the image to the repository?
* Run a manual `docker pull <image>` on your machine to see if the image can be pulled. * Run a manual `docker pull <image>` on your machine to see if the image can be pulled.
@@ -184,8 +184,8 @@ in the endpoints list, it's likely that the proxy can't contact your pods.
There are three things to There are three things to
check: check:
* Are your pods working correctly? Look for restart count, and [debug pods](#debugging-pods) * Are your pods working correctly? Look for restart count, and [debug pods](#debugging-pods).
* Can you connect to your pods directly? Get the IP address for the Pod, and try to connect directly to that IP * Can you connect to your pods directly? Get the IP address for the Pod, and try to connect directly to that IP.
* Is your application serving on the port that you configured? Kubernetes doesn't do port remapping, so if your application serves on 8080, the `containerPort` field needs to be 8080. * Is your application serving on the port that you configured? Kubernetes doesn't do port remapping, so if your application serves on 8080, the `containerPort` field needs to be 8080.
#### More information #### More information
@@ -193,7 +193,7 @@ will have log names `container_1` and `container_2` respectively.
System components have resource type `compute`, which is named System components have resource type `compute`, which is named
`GCE VM Instance` in the interface. Log names for system components are fixed. `GCE VM Instance` in the interface. Log names for system components are fixed.
For a GKE node, every log entry from a system component has one the following For a GKE node, every log entry from a system component has one of the following
log names: log names:
* docker * docker
@@ -234,9 +234,9 @@ the Stackdriver [Exporting Logs page](https://cloud.google.com/logging/docs/expo
## Configuring Stackdriver Logging Agents ## Configuring Stackdriver Logging Agents
Sometimes the default installation of Stackdriver Logging may not suite your needs, for example: Sometimes the default installation of Stackdriver Logging may not suit your needs, for example:
* You may want to add more resources because default performance doesn't suite your needs. * You may want to add more resources because default performance doesn't suit your needs.
* You may want to introduce additional parsing to extract more metadata from your log messages, * You may want to introduce additional parsing to extract more metadata from your log messages,
like severity or source code reference. like severity or source code reference.
* You may want to send logs not only to Stackdriver or send it to Stackdriver only partially. * You may want to send logs not only to Stackdriver or send it to Stackdriver only partially.

Some files were not shown because too many files have changed in this diff Show More