From deae72a03e7dca6e4a969055eff2d7b1778c8b49 Mon Sep 17 00:00:00 2001 From: Maciej Szulik Date: Fri, 23 Sep 2016 14:57:08 +0200 Subject: [PATCH 01/29] Add generators section in kubectl conventions --- docs/user-guide/kubectl-conventions.md | 46 +++++++++++++++++++++++--- 1 file changed, 42 insertions(+), 4 deletions(-) diff --git a/docs/user-guide/kubectl-conventions.md b/docs/user-guide/kubectl-conventions.md index f4398362da..a22973f16f 100644 --- a/docs/user-guide/kubectl-conventions.md +++ b/docs/user-guide/kubectl-conventions.md @@ -8,11 +8,11 @@ assignees: * TOC {:toc} -## Using `kubectl` in Reusable Scripts +## Using `kubectl` in Reusable Scripts If you need stable output in a script, you should: -* Request one of the machine-oriented output forms, such as `-o name`, `-o json`, `-o yaml`, `-o go-template`, or `-o jsonpath` +* Request one of the machine-oriented output forms, such as `-o name`, `-o json`, `-o yaml`, `-o go-template`, or `-o jsonpath` * Specify `--output-version`, since those output forms (other than `-o name`) output the resource using a particular API version * Specify `--generator` to pin to a specific behavior forever, if using generator-based commands (such as `kubectl run` or `kubectl expose`) * Don't rely on context, preferences, or other implicit state @@ -27,8 +27,46 @@ In order for `kubectl run` to satisfy infrastructure as code: * If the image is lightly parameterized, capture the parameters in a checked-in script, or at least use `--record`, to annotate the created objects with the command line. * If the image is heavily parameterized, definitely check in the script. * If features are needed that are not expressible via `kubectl run` flags, switch to configuration files checked into source control. -* Pin to a specific generator version, such as `kubectl run --generator=deployment/v1beta1` +* Pin to a specific [generator](#generators) version, such as `kubectl run --generator=deployment/v1beta1` + +#### Generators + +`kubectl run` allows you to generate the following resources (using `--generator` flag): + +* Pod - use `run-pod/v1`. +* Replication controller - use `run/v1`. +* Deployment - use `deployment/v1beta1`. +* Job (using `extension/v1beta1` endpoint) - use `job/v1beta1`. +* Job - use `job/v1`. +* ScheduledJob - use `scheduledjob/v2alpha1`. + +Additionally, if you didn't specify a generator flag, other flags will suggest using +a specific generator. Below table shows which flags force using specific generators, +depending on your cluster version: + +| Generated Resource | Cluster v1.4 | Cluster v1.3 | Cluster v1.2 | Cluster v1.1 and eariler | +|:----------------------:|-----------------------|-----------------------|--------------------------------------------|--------------------------------------------| +| Pod | `--restart=Never` | `--restart=Never` | `--generator=run-pod/v1` | `--restart=OnFailure` OR `--restart=Never` | +| Replication Controller | `--generator=run/v1` | `--generator=run/v1` | `--generator=run/v1` | `--restart=Always` | +| Deployment | `--restart=Always` | `--restart=Always` | `--restart=Always` | N/A | +| Job | `--restart=OnFailure` | `--restart=OnFailure` | `--restart=OnFailure` OR `--restart=Never` | N/A | +| Scheduled Job | `--schedule=` | N/A | N/A | N/A | + +Note that these flags will use a default generator only when you have not specified +any flag. This also means that combining `--generator` with other flags won't +change the generator you specified. For example, in a 1.4 cluster, if you specify +`--restart=Always`, a Deployment will be created; if you specify `--restart=Always` +and `--generator=run/v1`, a Replication Controller will be created instead. +This becomes handy if you want to pin to a specific behavior with the generator, +even when the defaulted generator is changed in the future. + +Finally, the order in which flags set the generator is: schedule flag has the highest +priority, then restart policy and finally the generator itself. + +If in doubt about the final resource being created, you can always use `--dry-run` +flag, which will provide the object to be submitted to the cluster. + ### `kubectl apply` -* To use `kubectl apply` to update resources, always create resources initially with `kubectl apply` or with `--save-config`. See [managing resources with kubectl apply](/docs/user-guide/managing-deployments/#kubectl-apply) for the reason behind it. +* To use `kubectl apply` to update resources, always create resources initially with `kubectl apply` or with `--save-config`. See [managing resources with kubectl apply](/docs/user-guide/managing-deployments/#kubectl-apply) for the reason behind it. From 30a8b4724f49578c5402d0257a3dbde2ed56dc43 Mon Sep 17 00:00:00 2001 From: Mike Spreitzer Date: Sun, 25 Sep 2016 15:33:10 -0700 Subject: [PATCH 02/29] Clarified the apiGroup identified by empty string Noted this where the relevance of api group is introduced, and corrected the reference to what the empty string means ("core" api group, which is the terminology used in the page that introduces api group, rather than the old text "default"). --- docs/admin/authorization.md | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/docs/admin/authorization.md b/docs/admin/authorization.md index 0c8508a1ec..a72a855cb2 100644 --- a/docs/admin/authorization.md +++ b/docs/admin/authorization.md @@ -53,7 +53,7 @@ A request has the following attributes that can be considered for authorization: - what resource is being accessed (for resource requests only) - what subresource is being accessed (for resource requests only) - the namespace of the object being accessed (for namespaced resource requests only) - - the API group being accessed (for resource requests only) + - the API group being accessed (for resource requests only); an empty string designates the [core API group](../api.md#api-groups) The request verb for a resource API endpoint can be determined by the HTTP verb used and whether or not the request acts on an individual resource or a collection of resources: @@ -231,7 +231,7 @@ metadata: namespace: default name: pod-reader rules: - - apiGroups: [""] # The API group "" indicates the default API Group. + - apiGroups: [""] # The API group "" indicates the core API Group. resources: ["pods"] verbs: ["get", "watch", "list"] nonResourceURLs: [] @@ -632,4 +632,4 @@ subjectaccessreview "" created ``` This is useful for debugging access problems, in that you can use this resource -to determine what access an authorizer is granting. \ No newline at end of file +to determine what access an authorizer is granting. From ee5b5eea3980d67220055c2248ff400864bc6ee6 Mon Sep 17 00:00:00 2001 From: Anirudh Ramanathan Date: Sat, 8 Oct 2016 13:43:19 -0700 Subject: [PATCH 03/29] Point init containers to documentation The proposal doesn't reflect reality. --- docs/user-guide/petset/bootstrapping/index.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/user-guide/petset/bootstrapping/index.md b/docs/user-guide/petset/bootstrapping/index.md index e9b04fc135..03ba721edc 100644 --- a/docs/user-guide/petset/bootstrapping/index.md +++ b/docs/user-guide/petset/bootstrapping/index.md @@ -8,7 +8,7 @@ This purpose of this guide is to help you become familiar with the runtime initialization of [Pet Sets](/docs/user-guide/petset). This guide assumes the same prerequisites, and uses the same terminology as the [Pet Set user document](/docs/user-guide/petset). -The most common way to initialize the runtime in a containerized environment, is through a custom [entrypoint](https://docs.docker.com/engine/reference/builder/#entrypoint). While this is not necessarily bad, making your application pid 1, and treating containers as processes in general is good for a few reasons outside the scope of this document. Doing so allows you to run docker images from third-party vendors without modification. We will not be writing custom entrypoints for this example, but using a feature called [init containers](http://releases.k8s.io/{{page.githubbranch}}/docs/proposals/container-init.md), to explain 2 common patterns that come up deploying Pet Sets. +The most common way to initialize the runtime in a containerized environment, is through a custom [entrypoint](https://docs.docker.com/engine/reference/builder/#entrypoint). While this is not necessarily bad, making your application pid 1, and treating containers as processes in general is good for a few reasons outside the scope of this document. Doing so allows you to run docker images from third-party vendors without modification. We will not be writing custom entrypoints for this example, but using a feature called [init containers](http://kubernetes.io/docs/user-guide/production-pods/#handling-initialization), to explain 2 common patterns that come up deploying Pet Sets. 1. Transferring state across Pet restart, so that a future Pet is initialized with the computations of its past incarnation 2. Initializing the runtime environment of a Pet based on existing conditions, like a list of currently healthy peers From 63f9993bb0b21fcf232e114aea1a38aff6da55dd Mon Sep 17 00:00:00 2001 From: Anirudh Ramanathan Date: Sat, 8 Oct 2016 13:46:38 -0700 Subject: [PATCH 04/29] Init containers are in beta in 1.4 --- docs/user-guide/production-pods.md | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/docs/user-guide/production-pods.md b/docs/user-guide/production-pods.md index efd1c43e43..501f908875 100644 --- a/docs/user-guide/production-pods.md +++ b/docs/user-guide/production-pods.md @@ -194,13 +194,13 @@ Applications often need a set of initialization steps prior to performing their * Registering the pod into a central database, or fetching remote configuration from that database * Downloading application dependencies, seed data, or preconfiguring disk -Kubernetes now includes an alpha feature known as **init containers**, which are one or more containers in a pod that get a chance to run and initialize shared volumes prior to the other application containers starting. An init container is exactly like a regular container, except that it always runs to completion and each init container must complete successfully before the next one is started. If the init container fails (exits with a non-zero exit code) on a `RestartNever` pod the pod will fail - otherwise it will be restarted until it succeeds or the user deletes the pod. +Kubernetes now includes a beta feature known as **init containers**, which are one or more containers in a pod that get a chance to run and initialize shared volumes prior to the other application containers starting. An init container is exactly like a regular container, except that it always runs to completion and each init container must complete successfully before the next one is started. If the init container fails (exits with a non-zero exit code) on a `RestartNever` pod the pod will fail - otherwise it will be restarted until it succeeds or the user deletes the pod. -Since init containers are an alpha feature, they are specified by setting the `pod.alpha.kubernetes.io/init-containers` annotation on a pod (or replica set, deployment, daemon set, pet set, or job). The value of the annotation must be a string containing a JSON array of container definitions: +Since init containers are a beta feature, they are specified by setting the `pod.beta.kubernetes.io/init-containers` annotation on a pod (or replica set, deployment, daemon set, pet set, or job). The value of the annotation must be a string containing a JSON array of container definitions: {% include code.html language="yaml" file="nginx-init-containers.yaml" ghlink="/docs/user-guide/nginx-init-containers.yaml" %} -The status of the init containers is returned as another annotation - `pod.alpha.kubernetes.io/init-container-statuses` -- as an array of the container statuses (similar to the `status.containerStatuses` field). +The status of the init containers is returned as another annotation - `pod.beta.kubernetes.io/init-container-statuses` -- as an array of the container statuses (similar to the `status.containerStatuses` field). Init containers support all of the same features as normal containers, including resource limits, volumes, and security settings. The resource requests and limits for an init container are handled slightly different than normal containers since init containers are run one at a time instead of all at once - any limits or quotas will be applied based on the largest init container resource quantity, rather than as the sum of quantities. Init containers do not support readiness probes since they will run to completion before the pod can be ready. From 12f5e30309ea31aba99b980a73bdd646d97f475b Mon Sep 17 00:00:00 2001 From: Mike Spreitzer Date: Sun, 25 Sep 2016 15:24:59 -0700 Subject: [PATCH 05/29] Removed confusing remark about authorizers determining groups The old text said that the authorizer is expected to determine group memberships when the authenticator does not. This not true. It is allowed, but not expected --- and none of the standard authorizers do it. I tried composing a brief correct statement about this, but the reviews were mainly aghast that internal details of some non-standard authorizers were being injected into the discussion of authentictors. I decided that the better part of valor is simply to delete the whole topic from here. Besides, it is a conclusion that any reader would normally draw --- since there is no statement forbidding it (nor indeed any indication that there might be a reason to forbid it), any reader would naturally conclude that an authorizer is free to derive additional intermediate information of any sort and in any way it likes. --- docs/admin/accessing-the-api.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/docs/admin/accessing-the-api.md b/docs/admin/accessing-the-api.md index 6569ac93f8..cb3f3d4ce4 100644 --- a/docs/admin/accessing-the-api.md +++ b/docs/admin/accessing-the-api.md @@ -52,8 +52,8 @@ On GCE, Client Certificates, Password, Plain Tokens, and JWT Tokens are all enab If the request cannot be authenticated, it is rejected with HTTP status code 401. Otherwise, the user is authenticated as a specific `username`, and the user name is available to subsequent steps to use in their decisions. Some authenticators -may also provide the group memberships of the user, while other authenticators -do not (and expect the authorizer to determine these). +also provide the group memberships of the user, while other authenticators +do not. While Kubernetes uses "usernames" for access control decisions and in request logging, it does not have a `user` object nor does it store usernames or other information about From ced57785dfa3ec1ebc6e3eee4114c1ecd95c075d Mon Sep 17 00:00:00 2001 From: Robert Ross Date: Mon, 10 Oct 2016 19:39:14 -0400 Subject: [PATCH 06/29] Fix code fencing for DNS validation example --- docs/admin/dns.md | 3 +++ 1 file changed, 3 insertions(+) diff --git a/docs/admin/dns.md b/docs/admin/dns.md index 9470a6c7c7..cc132201aa 100644 --- a/docs/admin/dns.md +++ b/docs/admin/dns.md @@ -166,12 +166,15 @@ busybox 1/1 Running 0 ``` ### Validate DNS works + Once that pod is running, you can exec nslookup in that environment: + ``` kubectl exec busybox -- nslookup kubernetes.default ``` You should see something like: + ``` Server: 10.0.0.10 Address 1: 10.0.0.10 From 23d77196631642e67a8d73c15fa7da1fdd5c7939 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Lucas=20K=C3=A4ldstr=C3=B6m?= Date: Tue, 11 Oct 2016 09:01:12 +0300 Subject: [PATCH 07/29] Move kubeadm reference, add a navigation link to it and assignees --- _data/guides.yml | 2 ++ .../kubeadm-reference.md => admin/kubeadm.md} | 9 ++++++++- docs/getting-started-guides/kubeadm.md | 2 +- 3 files changed, 11 insertions(+), 2 deletions(-) rename docs/{user-guide/kubeadm-reference.md => admin/kubeadm.md} (99%) diff --git a/_data/guides.yml b/_data/guides.yml index ab622a0284..40d47b08d6 100644 --- a/_data/guides.yml +++ b/_data/guides.yml @@ -252,6 +252,8 @@ toc: path: /docs/admin/ - title: Cluster Management Guide path: /docs/admin/cluster-management/ + - title: kubeadm reference + path: /docs/admin/kubeadm/ - title: Installing Addons path: /docs/admin/addons/ - title: Sharing a Cluster with Namespaces diff --git a/docs/user-guide/kubeadm-reference.md b/docs/admin/kubeadm.md similarity index 99% rename from docs/user-guide/kubeadm-reference.md rename to docs/admin/kubeadm.md index 49ba3663e6..57a21528c2 100644 --- a/docs/user-guide/kubeadm-reference.md +++ b/docs/admin/kubeadm.md @@ -1,4 +1,11 @@ -# kubeadm reference +--- +assignees: +- mikedanese +- luxas +- errordeveloper + +--- + This document provides information on how to use kubeadm's advanced options. diff --git a/docs/getting-started-guides/kubeadm.md b/docs/getting-started-guides/kubeadm.md index 32b91ccdb9..34e3ea7656 100644 --- a/docs/getting-started-guides/kubeadm.md +++ b/docs/getting-started-guides/kubeadm.md @@ -211,7 +211,7 @@ See the [list of add-ons](/docs/admin/addons/) to explore other add-ons, includi * Learn more about [Kubernetes concepts and kubectl in Kubernetes 101](/docs/user-guide/walkthrough/). * Install Kubernetes with [a cloud provider configurations](/docs/getting-started-guides/) to add Load Balancer and Persistent Volume support. -* Learn about `kubeadm`'s advanced usage on the [advanced reference doc](/docs/user-guide/kubeadm-reference/) +* Learn about `kubeadm`'s advanced usage on the [advanced reference doc](/docs/admin/kubeadm/) ## Cleanup From 75a3e77452891485f532593dca099bf36e4db5f6 Mon Sep 17 00:00:00 2001 From: Ilya Dmitrichenko Date: Tue, 11 Oct 2016 20:49:58 +0100 Subject: [PATCH 08/29] Note about workaround for https://github.com/kubernetes/kubernetes/issues/34566 --- docs/getting-started-guides/kubeadm.md | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/docs/getting-started-guides/kubeadm.md b/docs/getting-started-guides/kubeadm.md index 34e3ea7656..d5232ad16c 100644 --- a/docs/getting-started-guides/kubeadm.md +++ b/docs/getting-started-guides/kubeadm.md @@ -254,3 +254,9 @@ Please note: `kubeadm` is a work in progress and these limitations will be addre 1. There is not yet an easy way to generate a `kubeconfig` file which can be used to authenticate to the cluster remotely with `kubectl` on, for example, your workstation. Workaround: copy the kubelet's `kubeconfig` from the master: use `scp root@:/etc/kubernetes/admin.conf .` and then e.g. `kubectl --kubeconfig ./admin.conf get nodes` from your workstation. + +1. If you are using VirtualBox (directly or via Vagrant), you will need to ensure that `hostname -i` returns a routable IP address (i.e. one on the 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 usually NATed. + Workaround: Modify `/etc/hosts`, take a look at this [`Vagrantfile`][ubuntu-vagrantfile] for how you this can be achieved. + +[ubuntu-vagrantfile]: https://github.com/errordeveloper/k8s-playground/blob/22dd39dfc06111235620e6c4404a96ae146f26fd/Vagrantfile#L11), From 791000cbe4f771b4c48e7bb330db52ac3e1ff0c1 Mon Sep 17 00:00:00 2001 From: Steve Perry Date: Tue, 11 Oct 2016 14:36:18 -0700 Subject: [PATCH 09/29] Add replica count to tutorial. (#1434) --- .../deployment-scale.yaml | 16 +++++++++++++ .../run-stateless-application-deployment.md | 24 +++++++++++++++++++ 2 files changed, 40 insertions(+) create mode 100644 docs/tutorials/stateless-application/deployment-scale.yaml diff --git a/docs/tutorials/stateless-application/deployment-scale.yaml b/docs/tutorials/stateless-application/deployment-scale.yaml new file mode 100644 index 0000000000..2968b88360 --- /dev/null +++ b/docs/tutorials/stateless-application/deployment-scale.yaml @@ -0,0 +1,16 @@ +apiVersion: extensions/v1beta1 +kind: Deployment +metadata: + name: nginx-deployment +spec: + replicas: 4 + template: + metadata: + labels: + app: nginx + spec: + containers: + - name: nginx + image: nginx:1.8 # Update the version of nginx from 1.7.9 to 1.8 + ports: + - containerPort: 80 diff --git a/docs/tutorials/stateless-application/run-stateless-application-deployment.md b/docs/tutorials/stateless-application/run-stateless-application-deployment.md index 70aeb925c2..20a7aff243 100644 --- a/docs/tutorials/stateless-application/run-stateless-application-deployment.md +++ b/docs/tutorials/stateless-application/run-stateless-application-deployment.md @@ -94,6 +94,30 @@ specifies that the deployment should be updated to use nginx 1.8. kubectl get pods -l app=nginx +### Scaling the application by increasing the replica count + +You can increase the number of pods in your Deployment by applying a new YAML +file. This YAML file sets `replicas` to 4, which specifies that the Deployment +should have four pods: + +{% include code.html language="yaml" file="deployment-scale.yaml" ghlink="/docs/tutorials/stateless-application/deployment-scale.yaml" %} + +1. Apply the new YAML file: + + kubectl apply -f $REPO/docs/tutorials/stateless-application/deployment-scale.yaml + +1. Verify that the Deployment has four pods: + + kubectl get pods + + The output is similar to this: + + NAME READY STATUS RESTARTS AGE + nginx-deployment-148880595-4zdqq 1/1 Running 0 25s + nginx-deployment-148880595-6zgi1 1/1 Running 0 25s + nginx-deployment-148880595-fxcez 1/1 Running 0 2m + nginx-deployment-148880595-rwovn 1/1 Running 0 2m + ### Deleting a deployment Delete the deployment by name: From 5b8d8332fce581a08bf8aeabed67605ea011e4c2 Mon Sep 17 00:00:00 2001 From: Antoine Pelisse Date: Fri, 7 Oct 2016 12:41:56 -0700 Subject: [PATCH 10/29] Points to documentation about running privileged containers --- docs/user-guide/volumes.md | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/docs/user-guide/volumes.md b/docs/user-guide/volumes.md index e33bd3e018..a7e0b3c2ba 100644 --- a/docs/user-guide/volumes.md +++ b/docs/user-guide/volumes.md @@ -126,9 +126,10 @@ Watch out when using this type of volume, because: behave differently on different nodes due to different files on the nodes * when Kubernetes adds resource-aware scheduling, as is planned, it will not be able to account for resources used by a `hostPath` -* the directories created on the underlying hosts are only writable by root, you either need - to run your process as root in a privileged container or modify the file permissions on - the host to be able to write to a `hostPath` volume +* the directories created on the underlying hosts are only writable by root. You + either need to run your process as root in a + [privileged container](/docs/user-guide/security-context) or modify the file + permissions on the host to be able to write to a `hostPath` volume #### Example pod From a250e18e2f3d91848ff07f5fad4c25677e2d8a80 Mon Sep 17 00:00:00 2001 From: Steel Brain Date: Wed, 12 Oct 2016 05:44:51 +0530 Subject: [PATCH 11/29] :bug: Fix broken JSON format --- docs/user-guide/secrets/index.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/docs/user-guide/secrets/index.md b/docs/user-guide/secrets/index.md index 4da56a3cca..f9931bfbf5 100644 --- a/docs/user-guide/secrets/index.md +++ b/docs/user-guide/secrets/index.md @@ -284,7 +284,7 @@ For example, you can specify a default mode like this: "image": "redis", "volumeMounts": [{ "name": "foo", - "mountPath": "/etc/foo", + "mountPath": "/etc/foo" }] }], "volumes": [{ @@ -322,7 +322,7 @@ permission for different files like this: "image": "redis", "volumeMounts": [{ "name": "foo", - "mountPath": "/etc/foo", + "mountPath": "/etc/foo" }] }], "volumes": [{ From 4d5d29567da6c2e71505a993c9ff1f63db0eaa85 Mon Sep 17 00:00:00 2001 From: Ilya Dmitrichenko Date: Tue, 11 Oct 2016 07:51:54 +0100 Subject: [PATCH 12/29] Cosmetic tweaks to main kubeadm doc - clean-up the reset script - remove details tag --- docs/getting-started-guides/kubeadm.md | 22 ++++++++++++---------- 1 file changed, 12 insertions(+), 10 deletions(-) diff --git a/docs/getting-started-guides/kubeadm.md b/docs/getting-started-guides/kubeadm.md index d5232ad16c..f4f4c15211 100644 --- a/docs/getting-started-guides/kubeadm.md +++ b/docs/getting-started-guides/kubeadm.md @@ -45,7 +45,7 @@ For each host in turn: * SSH into the machine and become `root` if you are not already (for example, run `sudo su -`). * If the machine is running Ubuntu 16.04, run: - # curl https://packages.cloud.google.com/apt/doc/apt-key.gpg | apt-key add - + # curl -s https://packages.cloud.google.com/apt/doc/apt-key.gpg | apt-key add - # cat < /etc/apt/sources.list.d/kubernetes.list deb http://apt.kubernetes.io/ kubernetes-xenial main EOF @@ -218,15 +218,17 @@ See the [list of add-ons](/docs/admin/addons/) to explore other add-ons, includi * To uninstall the socks shop, run `kubectl delete -f microservices-demo/deploy/kubernetes/manifests` on the master. -* To undo what `kubeadm` did, simply delete the machines you created for this tutorial, or run the script below and then uninstall the packages. -
-
systemctl stop kubelet;
-  docker rm -f $(docker ps -q); mount | grep "/var/lib/kubelet/*" | awk '{print $3}' | xargs umount 1>/dev/null 2>/dev/null;
-  rm -rf /var/lib/kubelet /etc/kubernetes /var/lib/etcd /etc/cni;
-  ip link set cbr0 down; ip link del cbr0;
-  ip link set cni0 down; ip link del cni0;
-  systemctl start kubelet
-
+* To undo what `kubeadm` did, simply delete the machines you created for this tutorial, or run the script below and then start over or uninstall the packages. + +
+ Reset local state: +
systemctl stop kubelet;
+  docker rm -f -v $(docker ps -q);
+  find /var/lib/kubelet | xargs -n 1 findmnt -n -t tmpfs -o TARGET -T | uniq | xargs -r umount -v;
+  rm -r -f /etc/kubernetes /var/lib/kubelet /var/lib/etcd;
+  
+ If you wish to start over, run `systemctl start kubelet` followed by `kubeadm init` or `kubeadm join`. + ## Feedback From 3c94a1880ebf8125f63f549eee7635729285f250 Mon Sep 17 00:00:00 2001 From: Andrew Shu Date: Wed, 12 Oct 2016 09:16:24 -0700 Subject: [PATCH 13/29] Tutorial: Fix broken links on Basics Overview page --- docs/tutorials/kubernetes-basics/index.html | 26 ++++++++++----------- 1 file changed, 13 insertions(+), 13 deletions(-) diff --git a/docs/tutorials/kubernetes-basics/index.html b/docs/tutorials/kubernetes-basics/index.html index 723639552b..d678461e41 100644 --- a/docs/tutorials/kubernetes-basics/index.html +++ b/docs/tutorials/kubernetes-basics/index.html @@ -42,49 +42,49 @@
@@ -93,7 +93,7 @@ From cbb4d33b3edc8d2c889ad85618495db87a4ade28 Mon Sep 17 00:00:00 2001 From: Jess Frazelle Date: Wed, 12 Oct 2016 14:17:27 -0700 Subject: [PATCH 14/29] fix 404 redirect Signed-off-by: Jess Frazelle --- 404.md | 63 ++----------------------------------------------- js/redirects.js | 60 ++++++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 62 insertions(+), 61 deletions(-) create mode 100644 js/redirects.js diff --git a/404.md b/404.md index bf053c1e3b..e644c19ed2 100644 --- a/404.md +++ b/404.md @@ -3,66 +3,7 @@ layout: docwithnav title: 404 Error! permalink: /404.html --- - + + Sorry, this page was not found. :( diff --git a/js/redirects.js b/js/redirects.js new file mode 100644 index 0000000000..dc3cbb56ed --- /dev/null +++ b/js/redirects.js @@ -0,0 +1,60 @@ +$( document ).ready(function() { + var oldURLs=["/README.md","/README.html",".html",".md","/v1.1/","/v1.0/"]; + var fwdDirs=["examples/","cluster/","docs/devel","docs/design"]; + var doRedirect = false; + var notHere = false; + var forwardingURL=window.location.href; + + var redirects = [{ + "from": "third_party/swagger-ui", + "to": "http://kubernetes.io/kubernetes/third_party/swagger-ui/" + }, + { + "from": "resource-quota", + "to": "http://kubernetes.io/docs/admin/resourcequota/" + }, + { + "from": "horizontal-pod-autoscaler", + "to": "http://kubernetes.io/docs/user-guide/horizontal-pod-autoscaling/" + }, + { + "from": "docs/roadmap", + "to": "https://github.com/kubernetes/kubernetes/milestones/" + }, + { + "from": "api-ref/", + "to": "https://github.com/kubernetes/kubernetes/milestones/" + }, + { + "from": "docs/user-guide/overview", + "to": "http://kubernetes.io/docs/whatisk8s/" + }]; + + for (i=0;i -1){ + notHere = true; + window.location.replace(redirects[i].to); + } + } + + for (i=0;i -1){ + var urlPieces = forwardingURL.split(fwdDirs[i]); + var newURL = "https://github.com/kubernetes/kubernetes/tree/{{page.githubbranch}}/" + fwdDirs[i] + urlPieces[1]; + notHere = true; + window.location.replace(newURL); + } + } + if (!notHere) { + for (i=0;i -1 && + forwardingURL.indexOf("404.html") < 0){ + doRedirect=true; + forwardingURL=forwardingURL.replace(oldURLs[i],"/"); + } + } + if (doRedirect){ + window.location.replace(forwardingURL); + }; + } +}); From 55076d553b5b7a6e6128aa5ebf6dcbe3c3320d11 Mon Sep 17 00:00:00 2001 From: Jess Frazelle Date: Wed, 12 Oct 2016 15:27:21 -0700 Subject: [PATCH 15/29] exclude sitemap, css and 404 from sitemap Signed-off-by: Jess Frazelle --- 404.md | 1 + robots.txt | 2 ++ sitemap.xml | 6 +++--- 3 files changed, 6 insertions(+), 3 deletions(-) diff --git a/404.md b/404.md index e644c19ed2..3d32e81bcf 100644 --- a/404.md +++ b/404.md @@ -2,6 +2,7 @@ layout: docwithnav title: 404 Error! permalink: /404.html +no_canonical: true --- diff --git a/robots.txt b/robots.txt index 187d7c94bb..9bb39d8dbd 100644 --- a/robots.txt +++ b/robots.txt @@ -3,5 +3,7 @@ User-agent: * Disallow: /legacy/ Disallow: /v1.0/ Disallow: /v1.1/ +Disallow: /404/ +Disallow: 404.html SITEMAP: http://kubernetes.io/sitemap.xml diff --git a/sitemap.xml b/sitemap.xml index a965f4a570..ff1dd0d398 100644 --- a/sitemap.xml +++ b/sitemap.xml @@ -11,8 +11,8 @@ http://kubernetes.io/ {{ site.time | date_to_xmlschema }} -{% for page in site.pages %} +{% for page in site.pages %}{% if page.url != "/404.html" and page.url != "/sitemap.xml" and page.url != "/css/styles.css" %} http://kubernetes.io{{ page.url }} {% if page.date %}{{ page.date | date_to_xmlschema }}{% else %}{{ site.time | date_to_xmlschema }}{% endif %} -{% endfor %} - \ No newline at end of file +{% endif %}{% endfor %} + From d061e531931117d587a822334b02c804d7ad0e98 Mon Sep 17 00:00:00 2001 From: Jess Frazelle Date: Wed, 12 Oct 2016 13:43:39 -0700 Subject: [PATCH 16/29] dont set canonical tag for 404 page Signed-off-by: Jess Frazelle --- 404.md | 1 + _includes/head-header.html | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/404.md b/404.md index e644c19ed2..3d32e81bcf 100644 --- a/404.md +++ b/404.md @@ -2,6 +2,7 @@ layout: docwithnav title: 404 Error! permalink: /404.html +no_canonical: true --- diff --git a/_includes/head-header.html b/_includes/head-header.html index 12de81d975..0405f3699c 100644 --- a/_includes/head-header.html +++ b/_includes/head-header.html @@ -2,7 +2,7 @@ - + {% if !page.no_canonical %}{% endif %} From 8f41a65a40e6c0dcf8cc3b89699059dd00617269 Mon Sep 17 00:00:00 2001 From: Pablo Guerrero Date: Thu, 13 Oct 2016 14:43:48 +0200 Subject: [PATCH 17/29] Update index.md --- docs/admin/limitrange/index.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/admin/limitrange/index.md b/docs/admin/limitrange/index.md index 74c0957f23..0336264bc3 100644 --- a/docs/admin/limitrange/index.md +++ b/docs/admin/limitrange/index.md @@ -8,7 +8,7 @@ assignees: By default, pods run with unbounded CPU and memory limits. This means that any pod in the system will be able to consume as much CPU and memory on the node that executes the pod. -Users may want to impose restrictions on the amount of resource a single pod in the system may consume +Users may want to impose restrictions on the amount of resources a single pod in the system may consume for a variety of reasons. For example: From 81634ad38d733bf94312a0d2c696aadc3d86f7ea Mon Sep 17 00:00:00 2001 From: Jon Cope Date: Tue, 11 Oct 2016 15:45:42 -0500 Subject: [PATCH 18/29] Added optional prereq to authorize API calls --- docs/getting-started-guides/gce.md | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/docs/getting-started-guides/gce.md b/docs/getting-started-guides/gce.md index 22b1679a50..778795c3db 100644 --- a/docs/getting-started-guides/gce.md +++ b/docs/getting-started-guides/gce.md @@ -25,7 +25,8 @@ If you want to use custom binaries or pure open source Kubernetes, please contin 1. Install `gcloud` as necessary. `gcloud` can be installed as a part of the [Google Cloud SDK](https://cloud.google.com/sdk/). 1. Enable the [Compute Engine Instance Group Manager API](https://developers.google.com/console/help/new/#activatingapis) in the [Google Cloud developers console](https://console.developers.google.com). 1. Make sure that gcloud is set to use the Google Cloud Platform project you want. You can check the current project using `gcloud config list project` and change it via `gcloud config set project `. -1. Make sure you have credentials for GCloud by running ` gcloud auth login`. +1. Make sure you have credentials for GCloud by running `gcloud auth login`. +1. (Optional) In order to make API calls against GCE, you must also run `gcloud auth application-default login`. 1. Make sure you can start up a GCE VM from the command line. At least make sure you can do the [Create an instance](https://cloud.google.com/compute/docs/instances/#startinstancegcloud) part of the GCE Quickstart. 1. Make sure you can ssh into the VM without interactive prompts. See the [Log in to the instance](https://cloud.google.com/compute/docs/instances/#sshing) part of the GCE Quickstart. @@ -245,5 +246,3 @@ For support level information on all solutions, see the [Table of solutions](/do Please see the [Kubernetes docs](/docs/) for more details on administering and using a Kubernetes cluster. - - From 0ce841df60214855e3cef7ef20b20b5ae012ab69 Mon Sep 17 00:00:00 2001 From: bobsky Date: Thu, 13 Oct 2016 13:23:31 -0700 Subject: [PATCH 19/29] Update federated-ingress.md minor correction, feature is in alpha not beta. --- docs/user-guide/federation/federated-ingress.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/user-guide/federation/federated-ingress.md b/docs/user-guide/federation/federated-ingress.md index 42e5ad536d..87965a3fc7 100644 --- a/docs/user-guide/federation/federated-ingress.md +++ b/docs/user-guide/federation/federated-ingress.md @@ -18,7 +18,7 @@ automatically checks the health of the pods comprising the service, and avoids sending requests to unresponsive or slow pods (or entire unresponsive clusters). -Federated Ingress is released as a beta feature, and supports Google Cloud (GKE, +Federated Ingress is released as an alpha feature, and supports Google Cloud Platform (GKE, GCE and hybrid scenarios involving both) in Kubernetes v1.4. Work is under way to support other cloud providers such as AWS, and other hybrid cloud scenarios (e.g. services spanning private on-premise as well as public cloud Kubernetes From 5d60ea4488d566d374c90ce3e11bb6fb080145ec Mon Sep 17 00:00:00 2001 From: seperry53test Date: Fri, 14 Oct 2016 11:38:58 -0700 Subject: [PATCH 20/29] Update page-templates.md (#1465) --- docs/contribute/page-templates.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/contribute/page-templates.md b/docs/contribute/page-templates.md index da77bfc38e..d70077e246 100644 --- a/docs/contribute/page-templates.md +++ b/docs/contribute/page-templates.md @@ -12,7 +12,7 @@
  • Concept
  • -

    The page templates are in the _includes/templates directory of the kubernetes.github.io repository. +

    The page templates are in the _includes/templates directory of the kubernetes.github.io repository.

    Task template

    From bf18da533dff4970ad66693ece6369ebc5f26575 Mon Sep 17 00:00:00 2001 From: Mike Spreitzer Date: Sat, 15 Oct 2016 00:42:43 -0400 Subject: [PATCH 21/29] Documented FLANNEL_BACKEND and ADMISSION_CONTROL in cluster/ubuntu doc --- docs/getting-started-guides/ubuntu.md | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/docs/getting-started-guides/ubuntu.md b/docs/getting-started-guides/ubuntu.md index 3018bd026e..56ef9d9515 100644 --- a/docs/getting-started-guides/ubuntu.md +++ b/docs/getting-started-guides/ubuntu.md @@ -116,7 +116,13 @@ that conflicts with your own private network range. The `FLANNEL_NET` variable defines the IP range used for flannel overlay network, should not conflict with above `SERVICE_CLUSTER_IP_RANGE`. You can optionally provide additional Flannel network configuration -through `FLANNEL_OTHER_NET_CONFIG`, as explained in `cluster/ubuntu/config-default.sh`. +through `FLANNEL_BACKEND` and `FLANNEL_OTHER_NET_CONFIG`, as explained in `cluster/ubuntu/config-default.sh`. + +The default setting for `ADMISSION_CONTROL` is right for the latest +release of Kubernetes, but if you choose an earlier release then you +might want a different setting. See +[the admisson control doc](http://kubernetes.io/docs/admin/admission-controllers/#is-there-a-recommended-set-of-plug-ins-to-use) +for the recommended settings for various releases. **Note:** When deploying, master needs to be connected to the Internet to download the necessary files. If your machines are located in a private network that need proxy setting to connect the Internet, From fc10dd34b25abc44412c096cfe709538592deb47 Mon Sep 17 00:00:00 2001 From: Steve Perry Date: Sat, 15 Oct 2016 15:04:23 -0700 Subject: [PATCH 22/29] External address (#1432) * Write new tutorial: Exposing an External IP Address. * Update prerequisites. --- _data/tutorials.yml | 2 + docs/tutorials/index.md | 2 + .../expose-external-ip-address.md | 153 ++++++++++++++++++ 3 files changed, 157 insertions(+) create mode 100644 docs/tutorials/stateless-application/expose-external-ip-address.md diff --git a/_data/tutorials.yml b/_data/tutorials.yml index e312523bcd..01440b09d7 100644 --- a/_data/tutorials.yml +++ b/_data/tutorials.yml @@ -48,3 +48,5 @@ toc: path: /docs/tutorials/stateless-application/run-stateless-application-deployment/ - title: Using a Service to Access an Application in a Cluster path: /docs/tutorials/stateless-application/expose-external-ip-address-service/ + - title: Exposing an External IP Address to Access an Application in a Cluster + path: /docs/tutorials/stateless-application/expose-external-ip-address/ diff --git a/docs/tutorials/index.md b/docs/tutorials/index.md index 03ae95fe36..14530ca25e 100644 --- a/docs/tutorials/index.md +++ b/docs/tutorials/index.md @@ -13,6 +13,8 @@ The Tutorials section of the Kubernetes documentation is a work in progress. * [Using a Service to Access an Application in a Cluster](/docs/tutorials/stateless-application/expose-external-ip-address-service/) +* [Exposing an External IP Address to Access an Application in a Cluster](/docs/tutorials/stateless-application/expose-external-ip-address/) + ### What's next If you would like to write a tutorial, see diff --git a/docs/tutorials/stateless-application/expose-external-ip-address.md b/docs/tutorials/stateless-application/expose-external-ip-address.md new file mode 100644 index 0000000000..63aabb813d --- /dev/null +++ b/docs/tutorials/stateless-application/expose-external-ip-address.md @@ -0,0 +1,153 @@ +--- +--- + +{% capture overview %} + +This page shows how to create a Kubernetes Service object that exposees an +external IP address. + +{% endcapture %} + + +{% capture prerequisites %} + +* Install [kubectl](http://kubernetes.io/docs/user-guide/prereqs). + +* Use a cloud provider like Google Container Engine or Amazon Web Services to + create a Kubernetes cluster. This tutorial creates an + [external load balancer](/docs/user-guide/load-balancer/), + which requires a cloud provider. + +* Configure `kubectl` to communicate with your Kubernetes API server. For + instructions, see the documentation for your cloud provider. + +{% endcapture %} + + +{% capture objectives %} + +* Run five instances of a Hello World application. +* Create a Service object that exposes an external IP address. +* Use the Service object to access the running application. + +{% endcapture %} + + +{% capture lessoncontent %} + +### Creating a service for an application running in five pods + +1. Run a Hello World application in your cluster: + + kubectl run hello-world --replicas=5 --labels="run=load-balancer-example" --image=gcr.io/google-samples/node-hello:1.0 --port=8080 + + The preceding command creates a + [Deployment](/docs/user-guide/deployments/) + object and an associated + [ReplicaSet](/docs/user-guide/replicasets/) + object. The ReplicaSet has five + [Pods](/docs/user-guide/pods/), + each of which runs the Hello World application. + +1. Display information about the Deployment: + + kubectl get deployments hello-world + kubectl describe deployments hello-world + +1. Display information about your ReplicaSet objects: + + kubectl get replicasets + kubectl describe replicasets + +1. Create a Service object that exposes the deployment: + + kubectl expose deployment hello-world --type=LoadBalancer --name=my-service + +1. Display information about the Service: + + kubectl get services my-service + + The output is similar to this: + + NAME CLUSTER-IP EXTERNAL-IP PORT(S) AGE + my-service 10.3.245.137 104.198.205.71 8080/TCP 54s + + Note: If the external IP address is shown as , wait for a minute + and enter the same command again. + +1. Display detailed information about the Service: + + kubectl describe services my-service + + The output is similar to this: + + Name: my-service + Namespace: default + Labels: run=load-balancer-example + Selector: run=load-balancer-example + Type: LoadBalancer + IP: 10.3.245.137 + LoadBalancer Ingress: 104.198.205.71 + Port: 8080/TCP + NodePort: 32377/TCP + Endpoints: 10.0.0.6:8080,10.0.1.6:8080,10.0.1.7:8080 + 2 more... + Session Affinity: None + Events: + + Make a note of the external IP address exposed by your service. In this + example, the external IP address is 104.198.205.71. Also note + the value of Port. In this example, the port is 8080. + +1. In the preceding output, you can see that the service has several endpoints: + 10.0.0.6:8080,10.0.1.6:8080,10.0.1.7:8080 + 2 more. These are internal + addresses of the pods that are running the Hello World application. To + verify these are pod addresses, enter this command: + + kubectl get pods --output=wide + + The output is similar to this: + + NAME ... IP NODE + hello-world-2895499144-1jaz9 ... 10.0.1.6 gke-cluster-1-default-pool-e0b8d269-1afc + hello-world-2895499144-2e5uh ... 0.0.1.8 gke-cluster-1-default-pool-e0b8d269-1afc + hello-world-2895499144-9m4h1 ... 10.0.0.6 gke-cluster-1-default-pool-e0b8d269-5v7a + hello-world-2895499144-o4z13 ... 10.0.1.7 gke-cluster-1-default-pool-e0b8d269-1afc + hello-world-2895499144-segjf ... 10.0.2.5 gke-cluster-1-default-pool-e0b8d269-cpuc + +1. Use the external IP address to access the Hello World application: + + curl http://: + + where `` us the external IP address of your Service, + and `` is the value of `Port` in your Service description. + + The response to a successful request is a hello message: + + Hello Kubernetes! + +{% endcapture %} + + +{% capture cleanup %} + +To delete the Service, enter this command: + + kubectl delete services my-service + +To delete the Deployment, the ReplicaSet, and the Pods that are running +the Hello World application, enter this command: + + kubectl delete deployment hello-world + +{% endcapture %} + + +{% capture whatsnext %} + +Learn more about +[connecting applications with services](/docs/user-guide/connecting-applications/). +{% endcapture %} + +{% include templates/tutorial.md %} + + From f5934f521bf08f0f82f422a2b328a062a1559d5a Mon Sep 17 00:00:00 2001 From: chrislovecnm Date: Sat, 15 Oct 2016 20:44:10 -0600 Subject: [PATCH 23/29] updating kubectl overview with explain --- docs/user-guide/kubectl-overview.md | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/docs/user-guide/kubectl-overview.md b/docs/user-guide/kubectl-overview.md index bb587a9f91..8c134d475a 100644 --- a/docs/user-guide/kubectl-overview.md +++ b/docs/user-guide/kubectl-overview.md @@ -55,14 +55,15 @@ Operation | Syntax | Description `api-versions` | `kubectl api-versions [flags]` | List the API versions that are available. `apply` | `kubectl apply -f FILENAME [flags]`| Apply a configuration change to a resource from a file or stdin. `attach` | `kubectl attach POD -c CONTAINER [-i] [-t] [flags]` | Attach to a running container either to view the output stream or interact with the container (stdin). -`autoscale` | `autoscale (-f FILENAME | TYPE NAME | TYPE/NAME) [--min=MINPODS] --max=MAXPODS [--cpu-percent=CPU] [flags]` | Automatically scale the set of pods that are managed by a replication controller. +`autoscale` | `kubectl autoscale (-f FILENAME | TYPE NAME | TYPE/NAME) [--min=MINPODS] --max=MAXPODS [--cpu-percent=CPU] [flags]` | Automatically scale the set of pods that are managed by a replication controller. `cluster-info` | `kubectl cluster-info [flags]` | Display endpoint information about the master and services in the cluster. `config` | `kubectl config SUBCOMMAND [flags]` | Modifies kubeconfig files. See the individual subcommands for details. `create` | `kubectl create -f FILENAME [flags]` | Create one or more resources from a file or stdin. `delete` | `kubectl delete (-f FILENAME | TYPE [NAME | /NAME | -l label | --all]) [flags]` | Delete resources either from a file, stdin, or specifying label selectors, names, resource selectors, or resources. `describe` | `kubectl describe (-f FILENAME | TYPE [NAME_PREFIX | /NAME | -l label]) [flags]` | Display the detailed state of one or more resources. `edit` | `kubectl edit (-f FILENAME | TYPE NAME | TYPE/NAME) [flags]` | Edit and update the definition of one or more resources on the server by using the default editor. -`exec` | `kubectl exec POD [-c CONTAINER] [-i] [-t] [flags] [-- COMMAND [args...]]` | Execute a command against a container in a pod. +`exec` | `kubectl exec POD [-c CONTAINER] [-i] [-t] [flags] [-- COMMAND [args...]]` | Execute a command against a container in a pod, +`explain | `kubectl explain [--include-extended-apis=true] [--recursive=false] [flags]` | Get documentation of various resources. For instance pods, nodes, services, etc. `expose` | `kubectl expose (-f FILENAME | TYPE NAME | TYPE/NAME) [--port=port] [--protocol=TCP|UDP] [--target-port=number-or-name] [--name=name] [----external-ip=external-ip-of-service] [--type=type] [flags]` | Expose a replication controller, service, or pod as a new Kubernetes service. `get` | `kubectl get (-f FILENAME | TYPE [NAME | /NAME | -l label]) [--watch] [--sort-by=FIELD] [[-o | --output]=OUTPUT_FORMAT] [flags]` | List one or more resources. `label` | `kubectl label (-f FILENAME | TYPE NAME | TYPE/NAME) KEY_1=VAL_1 ... KEY_N=VAL_N [--overwrite] [--all] [--resource-version=version] [flags]` | Add or update the labels of one or more resources. From 95e14cc5f7e3bcf8f2cd3efb144454e14cbea9cf Mon Sep 17 00:00:00 2001 From: chrislovecnm Date: Sat, 15 Oct 2016 20:46:20 -0600 Subject: [PATCH 24/29] fixing format --- docs/user-guide/kubectl-overview.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/user-guide/kubectl-overview.md b/docs/user-guide/kubectl-overview.md index 8c134d475a..e805d48b35 100644 --- a/docs/user-guide/kubectl-overview.md +++ b/docs/user-guide/kubectl-overview.md @@ -63,7 +63,7 @@ Operation | Syntax | Description `describe` | `kubectl describe (-f FILENAME | TYPE [NAME_PREFIX | /NAME | -l label]) [flags]` | Display the detailed state of one or more resources. `edit` | `kubectl edit (-f FILENAME | TYPE NAME | TYPE/NAME) [flags]` | Edit and update the definition of one or more resources on the server by using the default editor. `exec` | `kubectl exec POD [-c CONTAINER] [-i] [-t] [flags] [-- COMMAND [args...]]` | Execute a command against a container in a pod, -`explain | `kubectl explain [--include-extended-apis=true] [--recursive=false] [flags]` | Get documentation of various resources. For instance pods, nodes, services, etc. +`explain` | `kubectl explain [--include-extended-apis=true] [--recursive=false] [flags]` | Get documentation of various resources. For instance pods, nodes, services, etc. `expose` | `kubectl expose (-f FILENAME | TYPE NAME | TYPE/NAME) [--port=port] [--protocol=TCP|UDP] [--target-port=number-or-name] [--name=name] [----external-ip=external-ip-of-service] [--type=type] [flags]` | Expose a replication controller, service, or pod as a new Kubernetes service. `get` | `kubectl get (-f FILENAME | TYPE [NAME | /NAME | -l label]) [--watch] [--sort-by=FIELD] [[-o | --output]=OUTPUT_FORMAT] [flags]` | List one or more resources. `label` | `kubectl label (-f FILENAME | TYPE NAME | TYPE/NAME) KEY_1=VAL_1 ... KEY_N=VAL_N [--overwrite] [--all] [--resource-version=version] [flags]` | Add or update the labels of one or more resources. From 4b506ea4982157210ba051bb24910b97aa5e0188 Mon Sep 17 00:00:00 2001 From: Sergei Orlov Date: Sun, 16 Oct 2016 12:47:04 +0300 Subject: [PATCH 25/29] Fix link to qos --- docs/user-guide/production-pods.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/user-guide/production-pods.md b/docs/user-guide/production-pods.md index efd1c43e43..3835781402 100644 --- a/docs/user-guide/production-pods.md +++ b/docs/user-guide/production-pods.md @@ -169,7 +169,7 @@ If no resource requirements are specified, a nominal amount of resources is assu {% include code.html language="yaml" file="redis-resource-deployment.yaml" ghlink="/docs/user-guide/redis-resource-deployment.yaml" %} -The container will die due to OOM (out of memory) if it exceeds its specified limit, so specifying a value a little higher than expected generally improves reliability. By specifying request, pod is guaranteed to be able to use that much of resource when needed. See [Resource QoS](https://github.com/kubernetes/kubernetes/blob/{{page.githubbranch}}/docs/proposals/resource-qos.md) for the difference between resource limits and requests. +The container will die due to OOM (out of memory) if it exceeds its specified limit, so specifying a value a little higher than expected generally improves reliability. By specifying request, pod is guaranteed to be able to use that much of resource when needed. See [Resource QoS](https://github.com/kubernetes/kubernetes/blob/{{page.githubbranch}}/docs/design/resource-qos.md) for the difference between resource limits and requests. If you're not sure how much resources to request, you can first launch the application without specifying resources, and use [resource usage monitoring](/docs/user-guide/monitoring) to determine appropriate values. From 3ef9c7e526a77fbf28e8baa491569ea7cbd800d7 Mon Sep 17 00:00:00 2001 From: Kami Gerami Date: Sat, 15 Oct 2016 14:56:15 +0200 Subject: [PATCH 26/29] 34613 404 Not Found on links referring to /docs/user-guide/kubectl/kubectl/ Changed all links referring to kubectl from /docs/user-guide/kubectl/kubectl/ to /docs/user-guide/kubectl/ --- docs/admin/static-pods.md | 2 +- docs/user-guide/federation/replicasets.md | 2 +- docs/user-guide/federation/secrets.md | 2 +- docs/user-guide/prereqs.md | 2 +- docs/user-guide/replicasets.md | 2 +- 5 files changed, 5 insertions(+), 5 deletions(-) diff --git a/docs/admin/static-pods.md b/docs/admin/static-pods.md index d1ad849b3a..531494fb04 100644 --- a/docs/admin/static-pods.md +++ b/docs/admin/static-pods.md @@ -88,7 +88,7 @@ static-web-my-node1 172.17.0.3 my-node1/192.168 Labels from the static pod are propagated into the mirror-pod and can be used as usual for filtering. -Notice we cannot delete the pod with the API server (e.g. via [`kubectl`](/docs/user-guide/kubectl/kubectl/) command), kubelet simply won't remove it. +Notice we cannot delete the pod with the API server (e.g. via [`kubectl`](/docs/user-guide/kubectl/) command), kubelet simply won't remove it. ```shell [joe@my-master ~] $ kubectl delete pod static-web-my-node1 diff --git a/docs/user-guide/federation/replicasets.md b/docs/user-guide/federation/replicasets.md index 805da57782..d0ceaa8bde 100644 --- a/docs/user-guide/federation/replicasets.md +++ b/docs/user-guide/federation/replicasets.md @@ -35,7 +35,7 @@ The API for Federated Replica Set is 100% compatible with the API for traditional Kubernetes Replica Set. You can create a replica set by sending a request to the federation apiserver. -You can do that using [kubectl](/docs/user-guide/kubectl/kubectl/) by running: +You can do that using [kubectl](/docs/user-guide/kubectl/) by running: ``` shell kubectl --context=federation-cluster create -f myrs.yaml diff --git a/docs/user-guide/federation/secrets.md b/docs/user-guide/federation/secrets.md index 7e7a27fc7a..763b53e98e 100644 --- a/docs/user-guide/federation/secrets.md +++ b/docs/user-guide/federation/secrets.md @@ -35,7 +35,7 @@ The API for Federated Secret is 100% compatible with the API for traditional Kubernetes Secret. You can create a secret by sending a request to the federation apiserver. -You can do that using [kubectl](/docs/user-guide/kubectl/kubectl/) by running: +You can do that using [kubectl](/docs/user-guide/kubectl/) by running: ``` shell kubectl --context=federation-cluster create -f mysecret.yaml diff --git a/docs/user-guide/prereqs.md b/docs/user-guide/prereqs.md index dfba1542af..e6b94baa62 100644 --- a/docs/user-guide/prereqs.md +++ b/docs/user-guide/prereqs.md @@ -5,7 +5,7 @@ assignees: --- -To deploy and manage applications on Kubernetes, you’ll use the Kubernetes command-line tool, [kubectl](/docs/user-guide/kubectl/kubectl/). It lets you inspect your cluster resources, create, delete, and update components, and much more. You will use it to look at your new cluster and bring up example apps. +To deploy and manage applications on Kubernetes, you’ll use the Kubernetes command-line tool, [kubectl](/docs/user-guide/kubectl/). It lets you inspect your cluster resources, create, delete, and update components, and much more. You will use it to look at your new cluster and bring up example apps. ## Installing kubectl diff --git a/docs/user-guide/replicasets.md b/docs/user-guide/replicasets.md index 27e9e3da88..d06be55328 100644 --- a/docs/user-guide/replicasets.md +++ b/docs/user-guide/replicasets.md @@ -18,7 +18,7 @@ the selector support. Replica Set supports the new set-based selector requiremen as described in the [labels user guide](/docs/user-guide/labels/#label-selectors) whereas a Replication Controller only supports equality-based selector requirements. -Most [`kubectl`](/docs/user-guide/kubectl/kubectl/) commands that support +Most [`kubectl`](/docs/user-guide/kubectl/) commands that support Replication Controllers also support Replica Sets. One exception is the [`rolling-update`](/docs/user-guide/kubectl/kubectl_rolling-update/) command. If you want the rolling update functionality please consider using Deployments From d76084a4b6ba317bf55049d799ec7fc5d157164d Mon Sep 17 00:00:00 2001 From: Victor Gama Date: Sun, 16 Oct 2016 15:40:28 -0200 Subject: [PATCH 27/29] Fix small typo This removes an extra "is a" from the documentation text --- docs/tutorials/kubernetes-basics/cluster-intro.html | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/tutorials/kubernetes-basics/cluster-intro.html b/docs/tutorials/kubernetes-basics/cluster-intro.html index 423dc61783..009a8e3947 100644 --- a/docs/tutorials/kubernetes-basics/cluster-intro.html +++ b/docs/tutorials/kubernetes-basics/cluster-intro.html @@ -87,7 +87,7 @@ redirect_from:

    When you deploy applications on Kubernetes, you tell the master to start the application containers. The master schedules the containers to run on the cluster's nodes. The nodes communicate with the master using the Kubernetes API, which the master exposes. End users can also use the Kubernetes API directly to interact with the cluster.

    -

    A Kubernetes cluster can be deployed on either physical or virtual machines. To get started with Kubernetes development, you can use minikube. Minikube is a is a lightweight Kubernetes implementation that creates a VM on your local machine and deploys a simple cluster containing only one node. Minikube is available for Linux, Mac OS and Windows systems. The minikube CLI provides basic bootstrapping operations for working with your cluster, including start, stop, status, and delete. For this bootcamp, however, you'll use a provided online terminal with minikube pre-installed.

    +

    A Kubernetes cluster can be deployed on either physical or virtual machines. To get started with Kubernetes development, you can use minikube. Minikube is a lightweight Kubernetes implementation that creates a VM on your local machine and deploys a simple cluster containing only one node. Minikube is available for Linux, Mac OS and Windows systems. The minikube CLI provides basic bootstrapping operations for working with your cluster, including start, stop, status, and delete. For this bootcamp, however, you'll use a provided online terminal with minikube pre-installed.

    Now that you know what Kubernetes is, let’s go to the online tutorial and start our first cluster!

    From 3bc8013a280783e1704272ee15cf621b25a4415a Mon Sep 17 00:00:00 2001 From: Denis Poisson Date: Mon, 17 Oct 2016 11:43:55 +0200 Subject: [PATCH 28/29] Update to Pet Set link 'Pet Set' now links correctly to http://kubernetes.io/docs/user-guide/petset/ --- docs/user-guide/ui.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/user-guide/ui.md b/docs/user-guide/ui.md index 0efdb3fd1f..84e0adabc6 100644 --- a/docs/user-guide/ui.md +++ b/docs/user-guide/ui.md @@ -163,7 +163,7 @@ Workloads are categorized as follows: * [Daemon Sets](http://kubernetes.io/docs/admin/daemons/) which ensure that all or some of the nodes in your cluster run a copy of a Pod. * [Deployments](http://kubernetes.io/docs/user-guide/deployments/) which provide declarative updates for Pods and Replica Sets (the next-generation [Replication Controller](http://kubernetes.io/docs/user-guide/replication-controller/)) The Details page for a Deployment lists resource details, as well as new and old Replica Sets. The resource details also include information on the [RollingUpdate](http://kubernetes.io/docs/user-guide/rolling-updates/) strategy, if any. -* [Pet Sets](http://kubernetes.io/docs/user-guide/load-balancer/) (nominal Services, also known as load-balanced Services) for legacy application support. +* [Pet Sets](http://kubernetes.io/docs/user-guide/petset/) (nominal Services, also known as load-balanced Services) for legacy application support. * [Replica Sets](http://kubernetes.io/docs/user-guide/replicasets/) for using label selectors. * [Jobs](http://kubernetes.io/docs/user-guide/jobs/) for creating one or more Pods, ensuring that a specified number of them successfully terminate, and tracking the completions. * [Replication Controllers](http://kubernetes.io/docs/user-guide/replication-controller/) From 553718a31e178f2b263e13b50044086462afd9bc Mon Sep 17 00:00:00 2001 From: Ricky Pai Date: Tue, 11 Oct 2016 16:34:06 -0700 Subject: [PATCH 29/29] Change RDB typo to RBD I assume this is referring to `RBD (Ceph Block Device)` and not something else --- docs/user-guide/persistent-volumes/index.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/user-guide/persistent-volumes/index.md b/docs/user-guide/persistent-volumes/index.md index 5232f068cd..8c69a75379 100644 --- a/docs/user-guide/persistent-volumes/index.md +++ b/docs/user-guide/persistent-volumes/index.md @@ -150,7 +150,7 @@ In the CLI, the access modes are abbreviated to: | HostPath | x | - | - | | iSCSI | x | x | - | | NFS | x | x | x | -| RDB | x | x | - | +| RBD | x | x | - | | VsphereVolume | x | - | - | ### Class