|
| 1 | +# AWS Node Termination Handler |
| 2 | + |
| 3 | +AWS Node Termination Handler Helm chart for Kubernetes. For more information on this project see the project repo at https://github.com/aws/aws-node-termination-handler. |
| 4 | + |
| 5 | +## Prerequisites |
| 6 | + |
| 7 | +* Kubernetes >= 1.11 |
| 8 | + |
| 9 | +## Installing the Chart |
| 10 | + |
| 11 | +Add the EKS repository to Helm: |
| 12 | +```sh |
| 13 | +helm repo add eks https://aws.github.io/eks-charts |
| 14 | +``` |
| 15 | +Install AWS Node Termination Handler: |
| 16 | +To install the chart with the release name aws-node-termination-handler and default configuration: |
| 17 | + |
| 18 | +```sh |
| 19 | +helm install --name aws-node-termination-handler \ |
| 20 | + --namespace kube-system eks/aws-node-termination-handler |
| 21 | +``` |
| 22 | + |
| 23 | +To install into an EKS cluster where the Node Termination Handler is already installed, you can run: |
| 24 | + |
| 25 | +```sh |
| 26 | +helm upgrade --install --recreate-pods --force \ |
| 27 | + aws-node-termination-handler --namespace kube-system eks/aws-node-termination-handler |
| 28 | +``` |
| 29 | + |
| 30 | +If you receive an error similar to `Error: release aws-node-termination-handler |
| 31 | +failed: <resource> "aws-node-termination-handler" already exists`, simply rerun |
| 32 | +the above command. |
| 33 | + |
| 34 | +The [configuration](#configuration) section lists the parameters that can be configured during installation. |
| 35 | + |
| 36 | +## Uninstalling the Chart |
| 37 | + |
| 38 | +To uninstall/delete the `aws-node-termination-handler` deployment: |
| 39 | + |
| 40 | +```sh |
| 41 | +helm delete --purge aws-node-termination-handler |
| 42 | +``` |
| 43 | + |
| 44 | +The command removes all the Kubernetes components associated with the chart and deletes the release. |
| 45 | + |
| 46 | +## Configuration |
| 47 | + |
| 48 | +The following tables lists the configurable parameters of the chart and their default values. |
| 49 | + |
| 50 | +Parameter | Description | Default |
| 51 | +--- | --- | --- |
| 52 | +`image.repository` | image repository | `amazon/aws-node-termination-handler` |
| 53 | +`image.tag` | image tag | `<VERSION>` |
| 54 | +`image.pullPolicy` | image pull policy | `IfNotPresent` |
| 55 | +`deleteLocalData` | Tells kubectl to continue even if there are pods using emptyDir (local data that will be deleted when the node is drained). | `false` |
| 56 | +`gracePeriod` | (DEPRECATED: Renamed to podTerminationGracePeriod) The time in seconds given to each pod to terminate gracefully. If negative, the default value specified in the pod will be used. | `30` |
| 57 | +`podTerminationGracePeriod` | The time in seconds given to each pod to terminate gracefully. If negative, the default value specified in the pod will be used. | `30` |
| 58 | +`nodeTerminationGracePeriod` | Period of time in seconds given to each NODE to terminate gracefully. Node draining will be scheduled based on this value to optimize the amount of compute time, but still safely drain the node before an event. | `120` |
| 59 | +`ignoreDaemonsSets` | Causes kubectl to skip daemon set managed pods | `true` |
| 60 | +`instanceMetadataURL` | The URL of EC2 instance metadata. This shouldn't need to be changed unless you are testing. | `http://169.254.169.254:80` |
| 61 | +`affinity` | node/pod affinities | None |
| 62 | +`podSecurityContext` | Pod Security Context | `{}` |
| 63 | +`podAnnotations` | annotations to add to each pod | `{}` |
| 64 | +`priorityClassName` | Name of the priorityClass | `system-node-critical` |
| 65 | +`resources` | Resources for the pods | `requests.cpu: 50m, requests.memory: 64Mi, limits.cpu: 100m, limits.memory: 128Mi` |
| 66 | +`securityContext` | Container Security context | `privileged: true` |
| 67 | +`nodeSelector` | Tells the daemon set where to place the node-termination-handler pods. For example: `lifecycle: "Ec2Spot"`, `on-demand: "false"`, `aws.amazon.com/purchaseType: "spot"`, etc. Value must be a valid yaml expression. | `{}` |
| 68 | +`tolerations` | list of node taints to tolerate | `[]` |
| 69 | +`rbac.create` | if `true`, create and use RBAC resources | `true` |
| 70 | +`rbac.pspEnabled` | If `true`, create and use a restricted pod security policy | `false` |
| 71 | +`serviceAccount.create` | If `true`, create a new service account | `true` |
| 72 | +`serviceAccount.name` | Service account to be used | None |
| 73 | +`serviceAccount.annotations` | Specifies the annotations for ServiceAccount | `{}` |
0 commit comments