Skip to content

Commit

Permalink
fix: Remove default taint values provided by addon
Browse files Browse the repository at this point in the history
  • Loading branch information
bryantbiggs committed May 8, 2024
1 parent 982860e commit 6300025
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 17 deletions.
16 changes: 9 additions & 7 deletions patterns/karpenter-mng/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,9 @@ This pattern demonstrates how to provision Karpenter on an EKS managed node grou

## Code

```terraform hl_lines="30-36 40 58-72 75-80 98-100 106-109 117-141"
The areas of significance related to this pattern are highlighted in the code provided below:

```terraform hl_lines="20-28 31 49-62 67-70 89-91 97-100 108-132"
{% include "../../patterns/karpenter-mng/eks.tf" %}
```

Expand All @@ -38,9 +40,9 @@ See [here](https://aws-ia.github.io/terraform-aws-eks-blueprints/getting-started
```sh
kubectl get nodes

NAME STATUS ROLES AGE VERSION
ip-10-0-18-71.us-west-2.compute.internal Ready <none> 3h44m v1.29.3-eks-ae9a62a
ip-10-0-46-81.us-west-2.compute.internal Ready <none> 3h44m v1.29.3-eks-ae9a62a
NAME STATUS ROLES AGE VERSION
ip-10-0-38-5.us-west-2.compute.internal Ready <none> 2m40s v1.29.3-eks-ae9a62a
ip-10-0-9-38.us-west-2.compute.internal Ready <none> 2m35s v1.29.3-eks-ae9a62a
```

2. Provision the Karpenter `EC2NodeClass` and `NodePool` resources which provide Karpenter the necessary configurations to provision EC2 resources:
Expand All @@ -67,9 +69,9 @@ See [here](https://aws-ia.github.io/terraform-aws-eks-blueprints/getting-started
kubectl get nodes
NAME STATUS ROLES AGE VERSION
ip-10-0-18-71.us-west-2.compute.internal Ready <none> 3h53m v1.29.3-eks-ae9a62a
ip-10-0-37-213.us-west-2.compute.internal Ready <none> 17s v1.29.3-eks-ae9a62a # <== EC2 created by Karpenter
ip-10-0-46-81.us-west-2.compute.internal Ready <none> 3h53m v1.29.3-eks-ae9a62a
ip-10-0-38-109.us-west-2.compute.internal Ready <none> 11s v1.29.3-eks-ae9a62a # <== EC2 created by Karpenter
ip-10-0-38-5.us-west-2.compute.internal Ready <none> 3m54s v1.29.3-eks-ae9a62a
ip-10-0-9-38.us-west-2.compute.internal Ready <none> 3m49s v1.29.3-eks-ae9a62a
```
## Destroy
Expand Down
11 changes: 1 addition & 10 deletions patterns/karpenter-mng/eks.tf
Original file line number Diff line number Diff line change
Expand Up @@ -18,15 +18,6 @@ module "eks" {
coredns = {
configuration_values = jsonencode({
tolerations = [
# Carry-over the default values from the addon
{
key = "CriticalAddonsOnly"
operator = "Exists"
},
{
key = "node-role.kubernetes.io/control-plane"
effect = "NoSchedule"
},
# Allow CoreDNS to run on the same nodes as the Karpenter controller
# for use during cluster creation when Karpenter nodes do not yet exist
{
Expand Down Expand Up @@ -63,7 +54,7 @@ module "eks" {
taints = {
# The pods that do not tolerate this taint should run on nodes
# created by Karpenter
gpu = {
karpenter = {
key = "karpenter.sh/controller"
value = "true"
effect = "NO_SCHEDULE"
Expand Down

0 comments on commit 6300025

Please sign in to comment.