I'm trying to install Cilium in my EKS cluster, to acomplish that I need to create my cluster's node groups with the following taint:
taints:
- key: "node.cilium.io/agent-not-ready"
value: "true"
effect: "NoExecute"
I also need to create my Add-Ons (VPC CNI, EBS CSI, Kube Proxy and CoreDNS), but because of the taint on the nodes, the Add-Ons are installed with error. I'm using Terraform to create everything.
Update: I was able to create the VPC CNI, Kube Proxy and CoreDNS using the tolerations, as described on the aws eks describe-addon-configuration command. The problem I'm having now is with the AWS EBS CSI Driver. It doesn't support the tolereations scheme I'm trying.
After I run the following command:
aws eks describe-addon-configuration --addon-name aws-ebs-csi-driver --addon-version v1.38.1-eksbuild.2 | jq ".configurationSchema" | jq "fromjson" | jq ".properties.node.properties.tolerations"
The return is:
{
"default": [
{
"effect": "NoExecute",
"operator": "Exists",
"tolerationSeconds": 300
}
],
"description": "Tolerations of the node pod",
"items": {
"type": "object"
},
"type": "array"
}
My configuration is the following:
configuration_values = jsonencode({
tolerations = [{
"key" : "node.cilium.io/agent-not-ready",
"operator": "Equal",
"value": "true",
"effect" : "NoExecute"
}]
})
And yet I'm still receiving the following error: InvalidParameterException: ConfigurationValue provided in request is not supported: Json schema validation failed with error: [$.tolerations: is not defined in the schema and the schema does not allow additional properties]
I'm trying to install Cilium in my EKS cluster, to acomplish that I need to create my cluster's node groups with the following taint:
taints:
- key: "node.cilium.io/agent-not-ready"
value: "true"
effect: "NoExecute"
I also need to create my Add-Ons (VPC CNI, EBS CSI, Kube Proxy and CoreDNS), but because of the taint on the nodes, the Add-Ons are installed with error. I'm using Terraform to create everything.
Update: I was able to create the VPC CNI, Kube Proxy and CoreDNS using the tolerations, as described on the aws eks describe-addon-configuration command. The problem I'm having now is with the AWS EBS CSI Driver. It doesn't support the tolereations scheme I'm trying.
After I run the following command:
aws eks describe-addon-configuration --addon-name aws-ebs-csi-driver --addon-version v1.38.1-eksbuild.2 | jq ".configurationSchema" | jq "fromjson" | jq ".properties.node.properties.tolerations"
The return is:
{
"default": [
{
"effect": "NoExecute",
"operator": "Exists",
"tolerationSeconds": 300
}
],
"description": "Tolerations of the node pod",
"items": {
"type": "object"
},
"type": "array"
}
My configuration is the following:
configuration_values = jsonencode({
tolerations = [{
"key" : "node.cilium.io/agent-not-ready",
"operator": "Equal",
"value": "true",
"effect" : "NoExecute"
}]
})
And yet I'm still receiving the following error: InvalidParameterException: ConfigurationValue provided in request is not supported: Json schema validation failed with error: [$.tolerations: is not defined in the schema and the schema does not allow additional properties]
The terraform documentation has an example on how you can achieve this. In the example the addon is coredns
version v1.10.1-eksbuild.1
.
Calling the api:
aws eks describe-addon-configuration \
--addon-name coredns \
--addon-version v1.10.1-eksbuild.1 \
--query "configurationSchema" | jq '. | fromjson'
you can see that tolerations
is a property. So to specify the toleration in this example:
resource "aws_eks_addon" "example" {
cluster_name = "mycluster"
addon_name = "coredns"
addon_version = "v1.10.1-eksbuild.1"
configuration_values = jsonencode({
tolerations = [{
"key" : "node.cilium.io/agent-not-ready",
"operator" : "NoExecute"
}]
})
}
For the latest versions of these addons:
I had to add this in the Terraform scripts for addon configuration:
configuration_values = jsonencode({
node: {
tolerations = [
{
operator = "Exists"
effect = "NoSchedule"
}
]
}
})
This works for the latest versions of EBS CSI driver addons:
Passing below code block as input for the https://github.com/terraform-aws-modules/terraform-aws-eks module.
aws-ebs-csi-driver = {
addon_version = "v1.41.0-eksbuild.1"
configuration_values = jsonencode({
node : {
tolerations : [
{
effect : "NoSchedule",
key : "<CustomTaintKey>",
operator : "Equal",
value : "<CustomTaintValue>"
}
]
},
controller : {
tolerations : [
{
effect : "NoSchedule",
key : "<CustomTaintKey>",
operator : "Equal",
value : "<CustomTaintValue>"
}
]
}
})
aws eks describe-addon-configuration --addon-name vpc-cni --addon-version v1.19.2-eksbuild.1 | jq ".configurationSchema" | jq "fromjson" | jq ".definitions.Tolerations"
– Chris Doyle Commented Jan 30 at 19:34