Prepare v0.4.2 release
- Go toolchain 1.25.8 → 1.26.8
- k8s.io/kubelet v0.33.10 → v0.37.1
- grpc v1.79.3 → v1.84.0
- Parallel multi-arch docker buildx builds and CI docker-build job
- Helm chart and app version 0.4.2
Signed-off-by: David Dornseifer dornseid@amazon.com
版权所有:中国计算机学会技术支持:开源发展技术委员会
京ICP备13000930号-9
京公网安备 11010802047560号
aws-nitro-enclaves-k8s-device-plugin
The Nitro Enclaves Device Plugin gives your pods and containers the ability to access the Nitro Enclaves device driver.
The device plugin works with both Amazon EKS and self-managed Kubernetes nodes.
AWS Nitro Enclaves is an Amazon EC2 capability that enables customers to create isolated compute environments to further protect and securely process highly sensitive data within their EC2 instances.
Prerequisites
To utilize this device plugin, you will need:
For more information on creating an enclave-enabled EKS worker node, review the using Nitro Enclaves with EKS user guide.
To build the plugin, you will need:
Configuring the AWS Nitro Enclave device plugin for Kubernetes
The device plugin supports the following two configuration options via the device-plugins daemon-set environment variables:
MAX_ENCLAVES_PER_NODE
AWS EKS nodes can support up to
4enclaves per node. Number can be reduced if required and evaluated by the Kubernetes scheduler.If deployed, EKS worker nodes do advertise the number of available
enclaveresources in the following way:ENCLAVE_CPU_ADVERTISEMENT
Advertise the number of
offlineCPUs on a specific EKS worker node. The number of offline CPUs reflect the number of CPUs allocated by the Nitro allocation service during EKS worker node startup.By advertising the number of available CPUs, workloads can request specific amount of CPUs for their enclaves and the Kubernetes scheduler can place workloads according to available CPUs on EKS worker nodes. Set to
falseper default.If enabled, EKS worker nodes do advertise the allocatable CPUs in the following way:
Kubernetes workloads can request CPUs for their enclaves (e.g. 2) by adding
aws.ec2.nitro/nitro_enclaves_cpus: "2"to the resourceslimitsandrequestssections as shown below:Example Deployment Specification
The following snippet represents a fully populated
resourcessection for a Kubernetes pod requesting access to a single enclave that requires2Giof memory and access to2CPUs.Refer to the official Using Nitro Enclaves with Amazon EKS documentation for more information on the different options in the deployment spec.
Usage
Deploy Kubernetes Manifest
To deploy the device plugin to your Kubernetes cluster, use the following command:
After deploying the device plugin, use labelling to enable the device plugin on a particular node:
To see list of the nodes that have plugin enabled, use the following command:
To disable the plugin on a particular node, use the following command:
Deployment via Helm Chart
To deploy the Helm chart for the device plugin to your Kubernetes cluster refer to Helm Readme
Building the Device Plugin Locally
To build the device plugin from its sources, use the following command:
After successfully running the script, the device plugin will be built as a Docker image with the name
aws-nitro-enclaves-k8s-device-plugin.Running Nitro Enclaves in a Kubernetes Cluster
There is a guide available on how to run Nitro Enclaves in EKS clusters. See this link to learn more.
License
This project is licensed under the Apache-2.0 License.