forked from aws/aws-cdk
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
chore(eks): support Inf1 instances (aws#8379)
chore(eks): support inf1 instances Amazon EKS supports Inferentia Instances today(see [Infrerentia Support](https://docs.aws.amazon.com/eks/latest/userguide/inferentia-support.html) and the doc [update](https://twitter.com/aws_doc/status/1268567994394968066)). This PR allows to create Amazon EKS worker nodes with `Inf1` instances. - Add `Inf1` instances support ---- *By submitting this pull request, I confirm that my contribution is made under the terms of the Apache-2.0 license*
- Loading branch information
Showing
7 changed files
with
597 additions
and
197 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
66 changes: 66 additions & 0 deletions
66
packages/@aws-cdk/aws-eks/lib/addons/neuron-device-plugin.yaml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,66 @@ | ||
# source: https://github.com/aws/aws-neuron-sdk/blob/master/docs/neuron-container-tools/k8s-neuron-device-plugin.yml | ||
# https://kubernetes.io/docs/concepts/extend-kubernetes/compute-storage-net/device-plugins/ | ||
apiVersion: apps/v1 | ||
kind: DaemonSet | ||
metadata: | ||
name: neuron-device-plugin-daemonset | ||
namespace: kube-system | ||
spec: | ||
selector: | ||
matchLabels: | ||
name: neuron-device-plugin-ds | ||
updateStrategy: | ||
type: RollingUpdate | ||
template: | ||
metadata: | ||
annotations: | ||
scheduler.alpha.kubernetes.io/critical-pod: "" | ||
labels: | ||
name: neuron-device-plugin-ds | ||
spec: | ||
tolerations: | ||
- key: CriticalAddonsOnly | ||
operator: Exists | ||
- key: aws.amazon.com/neuron | ||
operator: Exists | ||
effect: NoSchedule | ||
# Mark this pod as a critical add-on; when enabled, the critical add-on | ||
# scheduler reserves resources for critical add-on pods so that they can | ||
# be rescheduled after a failure. | ||
# See https://kubernetes.io/docs/tasks/administer-cluster/guaranteed-scheduling-critical-addon-pods/ | ||
priorityClassName: "system-node-critical" | ||
affinity: | ||
nodeAffinity: | ||
requiredDuringSchedulingIgnoredDuringExecution: | ||
nodeSelectorTerms: | ||
- matchExpressions: | ||
- key: "beta.kubernetes.io/instance-type" | ||
operator: In | ||
values: | ||
- inf1.xlarge | ||
- inf1.2xlarge | ||
- inf1.6xlarge | ||
- inf1.4xlarge | ||
- matchExpressions: | ||
- key: "node.kubernetes.io/instance-type" | ||
operator: In | ||
values: | ||
- inf1.xlarge | ||
- inf1.2xlarge | ||
- inf1.6xlarge | ||
- inf1.24xlarge | ||
containers: | ||
- image: 790709498068.dkr.ecr.us-west-2.amazonaws.com/neuron-device-plugin:1.0.9043.0 | ||
imagePullPolicy: Always | ||
name: k8s-neuron-device-plugin-ctr | ||
securityContext: | ||
allowPrivilegeEscalation: false | ||
capabilities: | ||
drop: ["ALL"] | ||
volumeMounts: | ||
- name: device-plugin | ||
mountPath: /var/lib/kubelet/device-plugins | ||
volumes: | ||
- name: device-plugin | ||
hostPath: | ||
path: /var/lib/kubelet/device-plugins |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.