From e648c764ab294f70c59e32ed6683abb7e00e8312 Mon Sep 17 00:00:00 2001 From: Will Sean Don Date: Thu, 20 Apr 2017 12:55:32 -0700 Subject: [PATCH] Migrate to new task template (#3442) --- docs/tasks/administer-federation/configmap.md | 38 ++++---- docs/tasks/administer-federation/daemonset.md | 45 ++++------ .../tasks/administer-federation/namespaces.md | 67 +++++++-------- .../tasks/administer-federation/replicaset.md | 86 +++++++++---------- 4 files changed, 110 insertions(+), 126 deletions(-) diff --git a/docs/tasks/administer-federation/configmap.md b/docs/tasks/administer-federation/configmap.md index f32104e4b6..352e6c20ae 100644 --- a/docs/tasks/administer-federation/configmap.md +++ b/docs/tasks/administer-federation/configmap.md @@ -2,33 +2,27 @@ title: Federated ConfigMap --- +{% capture overview %} + This guide explains how to use ConfigMaps in a Federation control plane. -* TOC -{:toc} - -## Prerequisites - -This guide assumes that you have a running Kubernetes Cluster -Federation installation. If not, then head over to the -[federation admin guide](/docs/admin/federation/) to learn how to -bring up a cluster federation (or have your cluster administrator do -this for you). -Other tutorials, such as Kelsey Hightower's -[Federated Kubernetes Tutorial](https://github.com/kelseyhightower/kubernetes-cluster-federation), -might also help you create a Federated Kubernetes cluster. - -You should also have a basic -[working knowledge of Kubernetes](/docs/getting-started-guides/) in -general and [ConfigMaps](/docs/tasks/configure-pod-container/configmap/) in particular. - -## Overview - Federated ConfigMaps are very similar to the traditional [Kubernetes ConfigMaps](/docs/tasks/configure-pod-container/configmap/) and provide the same functionality. Creating them in the federation control plane ensures that they are synchronized across all the clusters in federation. +{% endcapture %} + +{% capture prerequisites %} + +* {% include federated-task-tutorial-prereqs.md %} +* You should also have a basic +[working knowledge of Kubernetes](/docs/setup/pick-right-solution/) in +general and [ConfigMaps](/docs/tasks/configure-pod-container/configmap/) in particular. + +{% endcapture %} + +{% capture steps %} ## Creating a Federated ConfigMap @@ -85,3 +79,7 @@ Note that at this point, deleting a Federated ConfigMap will not delete the corresponding ConfigMaps from underlying clusters. You must delete the underlying ConfigMaps manually. We intend to fix this in the future. + +{% endcapture %} + +{% include templates/task.md %} \ No newline at end of file diff --git a/docs/tasks/administer-federation/daemonset.md b/docs/tasks/administer-federation/daemonset.md index a6f1d92e42..bc606fd6a2 100644 --- a/docs/tasks/administer-federation/daemonset.md +++ b/docs/tasks/administer-federation/daemonset.md @@ -1,35 +1,26 @@ --- title: Federated DaemonSet --- - +{% capture overview %} This guide explains how to use DaemonSets in a federation control plane. -* TOC -{:toc} - -## Prerequisites - -This guide assumes that you have a running Kubernetes Cluster -Federation installation. If not, then head over to the -[federation admin guide](/docs/admin/federation/) to learn how to -bring up a cluster federation (or have your cluster administrator do -this for you). -Other tutorials, such as Kelsey Hightower's -[Federated Kubernetes Tutorial](https://github.com/kelseyhightower/kubernetes-cluster-federation), -might also help you create a Federated Kubernetes cluster. - -You should also have a basic -[working knowledge of Kubernetes](/docs/getting-started-guides/) in -general and DaemonSets in particular. - -## Overview - -DaemonSets in federation control plane ("Federated Daemonsets" in +DaemonSets in the federation control plane ("Federated Daemonsets" in this guide) are very similar to the traditional Kubernetes -DaemonSets and provide the same functionality. +[DaemonSets](/docs/concepts/workloads/controllers/daemonset/) and provide the same functionality. Creating them in the federation control plane ensures that they are synchronized across all the clusters in federation. +{% endcapture %} +{% capture prerequisites %} + +* {% include federated-task-tutorial-prereqs.md %} +* You are also expected to have a basic +[working knowledge of Kubernetes](/docs/setup/pick-right-solution/) in +general and [DaemonSets](/docs/concepts/workloads/controllers/daemonset/) in particular. + +{% endcapture %} + +{% capture steps %} ## Creating a Federated Daemonset @@ -48,7 +39,7 @@ request to the Federation apiserver instead of sending it to a Kubernetes cluster. Once a Federated Daemonset is created, the federation control plane will create -a matching DaemonSet in all underlying Kubernetes clusters. +a matching DaemonSet in all underlying Kubernetes clusters. You can verify this by checking each of the underlying clusters, for example: ``` shell @@ -58,8 +49,6 @@ kubectl --context=gce-asia-east1a get daemonset mydaemonset The above assumes that you have a context named 'gce-asia-east1a' configured in your client for your cluster in that zone. -These DaemonSets in underlying clusters will match the Federated Daemonset. - ## Updating a Federated Daemonset @@ -81,3 +70,7 @@ For example, you can do that using kubectl by running: ```shell kubectl --context=federation-cluster delete daemonset mydaemonset ``` + +{% endcapture %} + +{% include templates/task.md %} \ No newline at end of file diff --git a/docs/tasks/administer-federation/namespaces.md b/docs/tasks/administer-federation/namespaces.md index dd860dc5a7..1ad9ca6259 100644 --- a/docs/tasks/administer-federation/namespaces.md +++ b/docs/tasks/administer-federation/namespaces.md @@ -2,38 +2,31 @@ title: Federated Namespaces --- -This guide explains how to use namespaces in Federation control plane. +{% capture overview %} +This guide explains how to use Namespaces in Federation control plane. -* TOC -{:toc} - -## Prerequisites - -This guide assumes that you have a running Kubernetes Cluster -Federation installation. If not, then head over to the -[federation admin guide](/docs/admin/federation/) to learn how to -bring up a cluster federation (or have your cluster administrator do -this for you). Other tutorials, for example -[this one](https://github.com/kelseyhightower/kubernetes-cluster-federation) -by Kelsey Hightower, are also available to help you. - -You are also expected to have a basic -[working knowledge of Kubernetes](/docs/getting-started-guides/) in -general and [Namespaces](/docs/concepts/overview/working-with-objects/namespaces/) in particular. - -## Overview - -Namespaces in federation control plane (referred to as "federated namespaces" in +Namespaces in federation control plane (referred to as "federated Namespaces" in this guide) are very similar to the traditional [Kubernetes Namespaces](/docs/concepts/overview/working-with-objects/namespaces/) providing the same functionality. Creating them in the federation control plane ensures that they are synchronized across all the clusters in federation. +{% endcapture %} +{% capture prerequisites %} + +* {% include federated-task-tutorial-prereqs.md %} +* You are also expected to have a basic +[working knowledge of Kubernetes](/docs/setup/pick-right-solution/) in +general and [Namespaces](/docs/concepts/overview/working-with-objects/namespaces/) in particular. + +{% endcapture %} + +{% capture steps %} ## Creating a Federated Namespace The API for Federated Namespaces is 100% compatible with the -API for traditional Kubernetes Namespaces. You can create a namespace by sending +API for traditional Kubernetes Namespaces. You can create a Namespace by sending a request to the federation apiserver. You can do that using kubectl by running: @@ -46,8 +39,8 @@ The '--context=federation-cluster' flag tells kubectl to submit the request to the Federation apiserver instead of sending it to a Kubernetes cluster. -Once a federated namespace is created, the federation control plane will create -a matching namespace in all underlying Kubernetes clusters. +Once a federated Namespace is created, the federation control plane will create +a matching Namespace in all underlying Kubernetes clusters. You can verify this by checking each of the underlying clusters, for example: ``` shell @@ -56,23 +49,23 @@ kubectl --context=gce-asia-east1a get namespaces myns The above assumes that you have a context named 'gce-asia-east1a' configured in your client for your cluster in that zone. The name and -spec of the underlying namespace will match those of +spec of the underlying Namespace will match those of the Federated Namespace that you created above. ## Updating a Federated Namespace -You can update a federated namespace as you would update a Kubernetes -namespace, just send the request to federation apiserver instead of sending it +You can update a federated Namespace as you would update a Kubernetes +Namespace, just send the request to federation apiserver instead of sending it to a specific Kubernetes cluster. -Federation control plan will ensure that whenever the federated namespace is -updated, it updates the corresponding namespaces in all underlying clusters to +Federation control plan will ensure that whenever the federated Namespace is +updated, it updates the corresponding Namespaces in all underlying clusters to match it. ## Deleting a Federated Namespace -You can delete a federated namespace as you would delete a Kubernetes -namespace, just send the request to federation apiserver instead of sending it +You can delete a federated Namespace as you would delete a Kubernetes +Namespace, just send the request to federation apiserver instead of sending it to a specific Kubernetes cluster. For example, you can do that using kubectl by running: @@ -81,10 +74,14 @@ For example, you can do that using kubectl by running: kubectl --context=federation-cluster delete ns myns ``` -As in Kubernetes, deleting a federated namespace will delete all resources in that -namespace from the federation control plane. +As in Kubernetes, deleting a federated Namespace will delete all resources in that +Namespace from the federation control plane. -Note that at this point, deleting a federated namespace will not delete the -corresponding namespaces and resources in those namespaces from underlying clusters. +Note that at this point, deleting a federated Namespace will not delete the +corresponding Namespace and resources in those Namespaces from underlying clusters. Users are expected to delete them manually. We intend to fix this in the future. + +{% endcapture %} + +{% include templates/task.md %} \ No newline at end of file diff --git a/docs/tasks/administer-federation/replicaset.md b/docs/tasks/administer-federation/replicaset.md index 118b0a1916..870118efd8 100644 --- a/docs/tasks/administer-federation/replicaset.md +++ b/docs/tasks/administer-federation/replicaset.md @@ -2,38 +2,30 @@ title: Federated ReplicaSets --- -This guide explains how to use replica sets in the Federation control plane. +{% capture overview %} +This guide explains how to use ReplicaSets in the Federation control plane. -* TOC -{:toc} - -## Prerequisites - -This guide assumes that you have a running Kubernetes Cluster -Federation installation. If not, then head over to the -[federation admin guide](/docs/admin/federation/) to learn how to -bring up a cluster federation (or have your cluster administrator do -this for you). Other tutorials, for example -[this one](https://github.com/kelseyhightower/kubernetes-cluster-federation) -by Kelsey Hightower, are also available to help you. - -You are also expected to have a basic -[working knowledge of Kubernetes](/docs/getting-started-guides/) in -general and [ReplicaSets](/docs/concepts/workloads/controllers/replicaset/) in particular. - -## Overview - -Replica Sets in federation control plane (referred to as "federated replica sets" in +ReplicaSets in the federation control plane (referred to as "federated ReplicaSets" in this guide) are very similar to the traditional [Kubernetes ReplicaSets](/docs/concepts/workloads/controllers/replicaset/), and provide the same functionality. Creating them in the federation control plane ensures that the desired number of replicas exist across the registered clusters. +{% endcapture %} +{% capture prerequisites %} -## Creating a Federated Replica Set +* {% include federated-task-tutorial-prereqs.md %} +* You are also expected to have a basic +[working knowledge of Kubernetes](/docs/getting-started-guides/) in +general and [ReplicaSets](/docs/concepts/workloads/controllers/replicaset/) in particular. +{% endcapture %} -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 +{% capture steps %} + +## Creating a Federated ReplicaSet + +The API for Federated ReplicaSet is 100% compatible with the +API for traditional Kubernetes ReplicaSet. You can create a ReplicaSet by sending a request to the federation apiserver. You can do that using [kubectl](/docs/user-guide/kubectl/) by running: @@ -46,8 +38,8 @@ The '--context=federation-cluster' flag tells kubectl to submit the request to the Federation apiserver instead of sending it to a Kubernetes cluster. -Once a federated replica set is created, the federation control plane will create -a replica set in all underlying Kubernetes clusters. +Once a federated ReplicaSet is created, the federation control plane will create +a ReplicaSet in all underlying Kubernetes clusters. You can verify this by checking each of the underlying clusters, for example: ``` shell @@ -57,40 +49,40 @@ kubectl --context=gce-asia-east1a get rs myrs The above assumes that you have a context named 'gce-asia-east1a' configured in your client for your cluster in that zone. -These replica sets in underlying clusters will match the federation replica set -except in the number of replicas. Federation control plane will ensure that the -sum of replicas in each cluster match the desired number of replicas in the -federation replica set. +The ReplicaSets in the underlying clusters will match the federation ReplicaSet +except in the number of replicas. The federation control plane will ensure that the +sum of the replicas in each cluster match the desired number of replicas in the +federation ReplicaSet. ### Spreading Replicas in Underlying Clusters By default, replicas are spread equally in all the underlying clusters. For ex: -if you have 3 registered clusters and you create a federated replica set with -`spec.replicas = 9`, then each replica set in the 3 clusters will have +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=3`. To modify the number of replicas in each cluster, you can specify [FederatedReplicaSetPreference](https://github.com/kubernetes/kubernetes/blob/{{page.githubbranch}}/federation/apis/federation/types.go) as an annotation with key `federation.kubernetes.io/replica-set-preferences` -on federated replica set. +on the federated ReplicaSet. -## Updating a Federated Replica Set +## Updating a Federated ReplicaSet -You can update a federated replica set as you would update a Kubernetes -replica set; however, for a federated replica set, you must send the request to +You can update a federated ReplicaSet as you would update a Kubernetes +ReplicaSet; however, for a federated ReplicaSet, you must send the request to the federation apiserver instead of sending it to a specific Kubernetes cluster. -The Federation control plan ensures that whenever the federated replica set is -updated, it updates the corresponding replica sets in all underlying clusters to +The Federation control plane ensures that whenever the federated ReplicaSet is +updated, it updates the corresponding ReplicaSet in all underlying clusters to match it. If your update includes a change in number of replicas, the federation control plane will change the number of replicas in underlying clusters to ensure that their sum remains equal to the number of desired replicas in -federated replica set. +federated ReplicaSet. -## Deleting a Federated Replica Set +## Deleting a Federated ReplicaSet -You can delete a federated replica set as you would delete a Kubernetes -replica set; however, for a federated replica set, you must send the request to +You can delete a federated ReplicaSet as you would delete a Kubernetes +ReplicaSet; however, for a federated ReplicaSet, you must send the request to the federation apiserver instead of sending it to a specific Kubernetes cluster. For example, you can do that using kubectl by running: @@ -99,7 +91,11 @@ For example, you can do that using kubectl by running: kubectl --context=federation-cluster delete rs myrs ``` -Note that at this point, deleting a federated replica set will not delete the -corresponding replica sets from underlying clusters. -You must delete the underlying Replica Sets manually. +Note that at this point, deleting a federated ReplicaSet will not delete the +corresponding ReplicaSets from underlying clusters. +You must delete the underlying ReplicaSets manually. We intend to fix this in the future. + +{% endcapture %} + +{% include templates/task.md %} \ No newline at end of file