From 70a2403ab143281f856029485766b27d33c65705 Mon Sep 17 00:00:00 2001 From: Sebastiaan van Steenis Date: Tue, 5 Mar 2019 01:09:57 +0100 Subject: [PATCH] Fixes for Schedule Your Services --- .../schedule-workloads/_index.md | 123 ++---------------- 1 file changed, 8 insertions(+), 115 deletions(-) diff --git a/content/rancher/v2.x/en/v1.6-migration/schedule-workloads/_index.md b/content/rancher/v2.x/en/v1.6-migration/schedule-workloads/_index.md index 6aec8b708d2..96853ac5036 100644 --- a/content/rancher/v2.x/en/v1.6-migration/schedule-workloads/_index.md +++ b/content/rancher/v2.x/en/v1.6-migration/schedule-workloads/_index.md @@ -27,7 +27,7 @@ You can schedule your migrated v1.6 services while editing a deployment. Schedul - [Scheduling Pods to a Specific Node](#scheduling-pods-to-a-specific-node) - [Scheduling Using Labels](#scheduling-using-labels) - [Scheduling Pods Using Resource Constraints](#scheduling-pods-using-resource-constraints) -- [Scheduling Specific Services to Specific Nodes](#scheduling-specific-services-to-specific-nodes) +- [Preventing Scheduling Specific Services to Specific Nodes](#preventing-scheduling-specific-services-to-specific-nodes) - [Scheduling Global Services](#scheduling-global-services) @@ -52,16 +52,16 @@ The sections that follow provide information on using each scheduling options, a Option | v1.6 Feature | v2.x Feature -------|------|------ -[Schedule pods by scale?](#scheduling-pods-by-scale) | ✓ | ✓ +[Schedule a certain number of pods?](#schedule-a-certain-number-of-pods) | ✓ | ✓ [Schedule pods to specific node?](#scheduling-pods-to-a-specific-node) | ✓ | ✓ [Schedule to nodes using labels?](#scheduling-pods-using-labels) | ✓ | ✓ [Schedule to nodes using label affinity/anti-affinity rules?](#scheduling-pods-using-affinityanti-affinity-label) | ✓ | ✓ [Schedule based on resource constraints?](#scheduling-pods-using-resource-constraints) | ✓ | ✓ -[Schedule specific services to specific hosts?](#scheduling-specific-services-to-specific-nodes) | ✓ | ✓ +[Preventing scheduling specific services to specific hosts?](#preventing-scheduling-specific-services-to-specific-nodes) | ✓ | ✓ [Schedule services globally?](#scheduling-global-services) | ✓ | ✓ -### Scheduling Pods by Scale +### Schedule a certain number of pods In v1.6, you could control the number of container replicas deployed for a service. You can schedule pods the same way in v2.x, but you'll have to set the scale manually while editing a workload. @@ -152,13 +152,7 @@ Before you can schedule pods based on labels, you must first apply labels to you >**Hooray!** >All the labels that you manually applied in Rancher v1.6 (but _not_ the ones automatically created by Rancher) are parsed by migration-tools CLI, meaning you don't have to manually reapply labels. -To apply labels to pods, make additions to the **Labels and Annotations** section as you configure your workload. After you complete workload configuration, you can view the label by viewing each pod that you've scheduled. The GIF below demonstrates how to apply and view pod labels. - -![Add Pod Label]({{< baseurl >}}/img/rancher/add-pod-label.gif) - -To apply labels to nodes, edit your node and make additions to the **Labels** section. - -![Add Node Label]({{< baseurl >}}/img/rancher/add-node-label.gif) +To apply labels to pods, make additions to the **Labels and Annotations** section as you configure your workload. After you complete workload configuration, you can view the label by viewing each pod that you've scheduled. To apply labels to nodes, edit your node and make additions to the **Labels** section. #### Label Affinity/AntiAffinity @@ -204,50 +198,11 @@ Detailed documentation for affinity/anti-affinity is available in the [Kubernete Affinity rules that you create in the UI update your workload, adding pod affinity/anti-affinity directives to the workload Kubernetes manifest specs. - - -You can find more detail about these specs and how to use them in the [Kubernetes Documentation](https://kubernetes.io/docs/concepts/configuration/manage-compute-resources-container/#resource-requests-and-limits-of-pod-and-container). - - ### Preventing Scheduling Specific Services to Specific Nodes In Rancher v1.6 setups, you could prevent services from being scheduled to specific nodes with the use of labels. In Rancher v2.x, you can reproduce this behavior using native Kubernetes scheduling options. -In Rancher v2.x, you can prevent pods from being scheduled to specific nodes by applying _taints_ to a node. Think of a taint as a "stink" coming off a node. Pods will not be scheduled to a tainted node unless it has special permission, called a _toleration_. A toleration is a special label that allows a pod to be deployed to a tainted node. While editing a workload, you can apply tolerations using the **Node Scheduling** section. Click **Show advanced options**. +In Rancher v2.x, you can prevent pods from being scheduled to specific nodes by applying _taints_ to a node. Pods will not be scheduled to a tainted node unless it has special permission, called a _toleration_. A toleration is a special label that allows a pod to be deployed to a tainted node. While editing a workload, you can apply tolerations using the **Node Scheduling** section. Click **Show advanced options**.
Applying Tolerations
@@ -255,12 +210,6 @@ In Rancher v2.x, you can prevent pods from being scheduled to specific nodes by For more information, see the Kubernetes documentation on [taints and tolerations](https://kubernetes.io/docs/concepts/configuration/taint-and-toleration/). -As of v2.1.1, there is no UI support for scheduling workloads to specific nodes, but you can still use this option by editing the deployment's Kubernetes manifest. - - - - - ### Scheduling Global Services Rancher v1.6 included the ability to deploy [global services](https://rancher.com/docs/rancher/v1.6/en/cattle/scheduling/#global-service), which are services that deploy duplicate containers to each host in the environment (i.e., nodes in your cluster using Rancher v2.x terms). If a service has the `io.rancher.scheduler.global: 'true'` label declared, then Rancher v1.6 schedules a service container on each host in the environment. @@ -279,64 +228,6 @@ To create a daemonset while configuring a workload, choose **Run one pod on each ![choose Run one pod on each node]({{< baseurl >}}/img/rancher/workload-type.png) - - ### Scheduling Pods Using Resource Constraints While creating a service in the Rancher v1.6 UI, you could schedule its containers to hosts based on hardware requirements that you choose. The containers are then scheduled to hosts based on which ones have bandwidth, memory, and CPU capacity. @@ -360,4 +251,6 @@ To declare resource constraints, edit your migrated workloads, editing the **Sec ![Resource Constraint Settings]({{< baseurl >}}/img/rancher/resource-constraint-settings.png) +You can find more detail about these specs and how to use them in the [Kubernetes Documentation](https://kubernetes.io/docs/concepts/configuration/manage-compute-resources-container/#resource-requests-and-limits-of-pod-and-container). + ### [Next: Service Discovery]({{< baseurl >}}/rancher/v2.x/en/v1.6-migration/discover-services/)