From 2519db579a27acab192a6649d44f1a15cb6a70c1 Mon Sep 17 00:00:00 2001 From: Geoffrey Cline Date: Fri, 30 Jul 2021 15:00:45 -0700 Subject: [PATCH] Add AWS Cloud Provider Docs (#557) * revise diesc of aws labels * rename dir for cloud providers * wrap long lines * revise aws label desc based on pr feedback * revise aws prov docs re etarn review * revert desc of AZ IDs * Docs Bash Collab Co-authored-by: Ellis Tarn --- .../content/en/docs/cloud-providers/AWS.md | 159 ++++++++++++++++++ .../content/en/docs/cloud-providers/_index.md | 5 + 2 files changed, 164 insertions(+) create mode 100644 website/content/en/docs/cloud-providers/AWS.md create mode 100644 website/content/en/docs/cloud-providers/_index.md diff --git a/website/content/en/docs/cloud-providers/AWS.md b/website/content/en/docs/cloud-providers/AWS.md new file mode 100644 index 000000000000..3d9b1a2b5ec4 --- /dev/null +++ b/website/content/en/docs/cloud-providers/AWS.md @@ -0,0 +1,159 @@ +--- +title: "Amazon Web Services (AWS)" +linkTitle: "AWS" +weight: 10 +--- + +## Control Provisioning with Labels + +The [Provisioner CRD]({{< ref "provisioner-crd.md" >}}) supports defining +node properties like instance type and zone.For certain well-known labels (documented below), Karpenter will provision +nodes accordingly. For example, in response to a label of +`topology.kubernetes.io/zone=us-east-1c`, Karpenter will provision nodes in +that availability zone. + +### Instance Types + +Karpenter supports specifying [AWS instance type](https://aws.amazon.com/ec2/instance-types/). + +The default value includes all instance types with the exclusion of metal +(non-virtualized), +[non-HVM](https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/virtualization_types.html), +and GPU instances. + +If necessary, Karpenter supports defining a limited list of default instance types. + +If more than one type is listed, Karpenter will determine the +instance type to minimize the number of new nodes. + +View the full list of instance types with `aws ec2 describe-instance-types`. + +**Example** + +*Set Default with provisioner.yaml* + +```yaml +spec: + instanceTypes: + - m5.large +``` + +*Override with workload manifest (e.g., pod)* + +```yaml +spec: + template: + spec: + nodeSelector: + node.kubernetes.io/instance-type: m5.large +``` + +### Availability Zones + +`topology.kubernetes.io/zone=us-east-1c` + +- key: `topology.kubernetes.io/zone` +- value example: `us-east-1c` +- value list: `aws ec2 describe-availability-zones --region ` + +Karpenter can be configured to create nodes in a particular zone. Note that the Availability Zone us-east-1a for your AWS account might not have the same location as us-east-1a for another AWS account. + +[Learn more about Availability Zone +IDs.](https://docs.aws.amazon.com/ram/latest/userguide/working-with-az-ids.html) + +### Capacity Type + +- key: `node.k8s.aws/capacity-type` +- values + - `on-demand` (default) + - `spot` + +Karpenter supports specifying capacity type and defaults to on-demand. + +Specify this value on the provisioner to enable spot instances. [Spot +instances](https://aws.amazon.com/ec2/spot/) may be preempted, and should not +be used for critical workloads. + +**Example** + +*Set Default with provisioner.yaml* + +```yaml +spec: + labels: + node.k8s.aws/capacity-type: spot +``` + +*Override with workload manifest (e.g., pod)* + +```yaml +spec: + template: + spec: + nodeSelector: + node.k8s.aws/capacity-type: spot +``` + +### Architecture + +- key: `kubernetes.io/arch` +- values + - `amd64` (default) + - `arm64` + +Karpenter supports `amd64` nodes, and `arm64` nodes. + +**Example** + +*Set Default with provisioner.yaml* + +```yaml +spec: + labels: + kubernetes.io/arch: arm64 +``` + +*Override with workload manifest (e.g., pod)* + +```yaml +spec: + template: + spec: + nodeSelector: + kubernetes.io/arch: amd64 +``` + +### Operating System + +- key: `kubernetes.io/os` +- values + - `linux` (default) + +At this time, Karpenter only supports Linux OS nodes. + +### Accelerators, GPU + +Accelerator (e.g., GPU) values include +- `nvidia.com/gpu` +- `amd.com/gpu` +- `aws.amazon.com/neuron` + +Karpenter supports accelerators, such as GPUs. + +To enable instances with accelerators, use the [instance type +well known label selector](#instance-types). + +Additionally, include a resource requirement in the workload manifest. Thus, +accelerator dependent pod will be scheduled onto the appropriate node. + +*accelerator resource in workload manifest (e.g., pod)* + +```yaml +spec: + template: + spec: + containers: + - resources: + limits: + nvidia.com/gpu: "1" +``` diff --git a/website/content/en/docs/cloud-providers/_index.md b/website/content/en/docs/cloud-providers/_index.md new file mode 100644 index 000000000000..1cda931e561b --- /dev/null +++ b/website/content/en/docs/cloud-providers/_index.md @@ -0,0 +1,5 @@ +--- +title: "Cloud Providers" +linkTitle: "Cloud Providers" +weight: 70 +--- \ No newline at end of file