-
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.
Finished testing and updated documentation
- Loading branch information
Showing
2 changed files
with
91 additions
and
1 deletion.
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
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,86 @@ | ||
| # Karpenter Example | ||
|
|
||
| Configuration in this directory creates an AWS EKS cluster with Karpenter provisioned for managing compute resource scaling. In the example, Karpenter is provisioned on top of an EKS Managed Node Group following best practice recommendations. | ||
|
|
||
| ## Usage | ||
|
|
||
| To run this example you need to execute: | ||
|
|
||
| ```bash | ||
| $ terraform init | ||
| $ terraform plan | ||
| $ terraform apply | ||
| ``` | ||
|
|
||
| Verifying Karpenter is deployed: | ||
|
|
||
| ```bash | ||
| $ # Verify Karpenter controller pods | ||
| $ kubectl get pods -n karpenter | ||
| $ | ||
| $ # Review controller logs with | ||
| $ kubectl logs -f -n karpenter -l app.kubernetes.io/name=karpenter -c controller | ||
| $ | ||
| $ # Identify Karpenter managed nodes | ||
| $ kubectl get nodes -L karpenter.sh/registered | ||
| ``` | ||
|
|
||
| ### Tear Down & Clean-Up | ||
|
|
||
| Because Karpenter manages the state of node resources outside of Terraform, Karpenter created resources will need to be de-provisioned first before removing the remaining resources with Terraform. | ||
|
|
||
| 1. Remove any nodes created by Karpenter | ||
|
|
||
| ```bash | ||
|
|
||
| kubectl delete node -l karpenter.sh/provisioner-name=default | ||
| ``` | ||
|
|
||
| 2. Remove the resources created by Terraform | ||
|
|
||
| ```bash | ||
| terraform destroy | ||
| ``` | ||
|
|
||
| <!-- BEGIN_TF_DOCS --> | ||
| ## Requirements | ||
|
|
||
| | Name | Version | | ||
| |------|---------| | ||
| | <a name="requirement_terraform"></a> [terraform](#requirement\_terraform) | >= 1.5.0 | | ||
|
|
||
| ## Providers | ||
|
|
||
| | Name | Version | | ||
| |------|---------| | ||
| | <a name="provider_aws"></a> [aws](#provider\_aws) | 5.57.0 | | ||
|
|
||
| ## Modules | ||
|
|
||
| | Name | Source | Version | | ||
| |------|--------|---------| | ||
| | <a name="module_karpenter"></a> [karpenter](#module\_karpenter) | ../.. | n/a | | ||
|
|
||
| ## Resources | ||
|
|
||
| | Name | Type | | ||
| |------|------| | ||
| | [aws_eks_cluster.cluster](https://registry.terraform.io/providers/hashicorp/aws/latest/docs/data-sources/eks_cluster) | data source | | ||
| | [aws_eks_cluster_auth.cluster](https://registry.terraform.io/providers/hashicorp/aws/latest/docs/data-sources/eks_cluster_auth) | data source | | ||
|
|
||
| ## Inputs | ||
|
|
||
| | Name | Description | Type | Default | Required | | ||
| |------|-------------|------|---------|:--------:| | ||
| | <a name="input_cluster_endpoint"></a> [cluster\_endpoint](#input\_cluster\_endpoint) | Endpoint for your Kubernetes API server | `string` | n/a | yes | | ||
| | <a name="input_cluster_name"></a> [cluster\_name](#input\_cluster\_name) | EKS cluster name name component used through out the EKS cluster describing its purpose (ex: dice-dev) | `string` | n/a | yes | | ||
| | <a name="input_karpenter_node_group_name"></a> [karpenter\_node\_group\_name](#input\_karpenter\_node\_group\_name) | The cluster node group that will host karpenter, should not be a karpenter managed node group | `string` | n/a | yes | | ||
| | <a name="input_oidc_provider_arn"></a> [oidc\_provider\_arn](#input\_oidc\_provider\_arn) | The ARN of the OIDC Provider if `enable_irsa = true` | `string` | n/a | yes | | ||
| | <a name="input_profile"></a> [profile](#input\_profile) | AWS config profile | `string` | `""` | no | | ||
| | <a name="input_region"></a> [region](#input\_region) | AWS region | `string` | n/a | yes | | ||
| | <a name="input_tags"></a> [tags](#input\_tags) | AWS Tags to apply to appropriate resources | `map(string)` | `{}` | no | | ||
|
|
||
| ## Outputs | ||
|
|
||
| No outputs. | ||
| <!-- END_TF_DOCS --> |