kubectl add-ons

0

We are trying to install kubecost Add-ons in the EKS cluster while installing we are getting this issue

{An error occurred (InvalidParameterException) when calling the CreateAddon operation: ConfigurationValue provided in request is not supported: Yaml schema validation failed with error: [$.kubecostAggregator: is not defined in the schema and the schema does not allow additional properties]

admission webhook "opa-validating.kube-yahoo.hookfg" denied the request with the message: "DENY: missing spec.containers[].resources.limits.cpu kubecost/cost-analyzer container; aggregator: DENY: missing spec.containers[].resources.limits.cpu kubecost/cost-analyzer container; cloud-cost" }

We tried with the yaml configuration policy but it shows the access policy issue

Yaml #

apiVersion: v1 kind: ConfigMap metadata: name: kubecost-configmap data: example-json-file: | { "containers": [ { "name":"aggregated" "resources": { "limits": { "cpu": "2000m", "memory": "2Gi" }, "requests": { "cpu": "1000m", "memory": "1Gi" } } }, { "name": "cloud-cost" "resources": { "limits": { "cpu": "2000m", "memory": "2Gi" }, "requests": { "cpu": "1000m", "memory": "1Gi" } } ] } }

An error occurred (InvalidParameterException) when calling the CreateAddon operation: ConfigurationValue provided in request is not supported: Yaml schema validation failed with error: [$.kubecostAggregator: is not defined in the schema and the schema does not allow additional properties]

Venkata
已提问 1 个月前176 查看次数
2 回答
3
已接受的回答

In your YAML configuration, there are syntax errors such as missing commas between elements in the JSON array and incorrect indentation. Additionally, the JSON format should be properly formatted within the YAML file

Could you please correct your Yaml config and try again

apiVersion: v1
kind: ConfigMap
metadata:
  name: kubecost-configmap
data:
  example-json-file: |
    {
      "containers": [
        {
          "name": "aggregated",
          "resources": {
            "limits": {
              "cpu": "2000m",
              "memory": "2Gi"
            },
            "requests": {
              "cpu": "1000m",
              "memory": "1Gi"
            }
          }
        },
        {
          "name": "cloud-cost",
          "resources": {
            "limits": {
              "cpu": "2000m",
              "memory": "2Gi"
            },
            "requests": {
              "cpu": "1000m",
              "memory": "1Gi"
            }
          }
        }
      ]
    }

Make sure to adjust the configuration according to the requirements and schema expected by the Kubecost addon. Additionally, ensure that you have proper permissions and access policies to create the addon in your EKS cluster. You can find some useful info here :- https://github.com/kubecost/kubecost-eks-blueprints-addon

profile picture
专家
已回答 1 个月前
profile picture
专家
已审核 1 个月前
  • We corrected the yaml file we applied the yaml file still we are facing the same issue apiVersion: v1 kind: ConfigMap metadata: name: kubecost-configmap data: configuration.yaml: | containers: - name: aggregator resources: limits: cpu: "2000m" memory: "2Gi" requests: cpu: "1000m" memory: "1Gi" - name: cloud-cost resources: limits: cpu: "2000m" memory: "2Gi" requests: cpu: "1000m" memory: "1Gi"

  • " [$.kubecostAggregator: is not defined in the schema and the schema does not allow additional properties] The error message indicates that the kubecostAggregator property is not defined in the schema. This suggests that the kubecostAggregator property is not recognized or expected in the configuration. Make sure you are using the correct property names and schema for the Kubecost addon configuration

0

@Adeleke Adebowale J We have removed the indentations and formatted the JSON but still getting the same error. An error occurred (InvalidParameterException) when calling the CreateAddon operation: ConfigurationValue provided in request is not supported: Json schema validation failed with error:

"DENY: missing spec.containers[].resources.limits.cpu kubecost/cost-analyzer container; aggregator: DENY: missing spec.containers[].resources.limits.cpu kubecost/cost-analyzer container; cloud-cost" }

Can you help us how can we configure the values for above missing CPU limits for containers that could help in creating add-on. We tried multiple ways but getting the same schema validation failed.

已回答 1 个月前

您未登录。 登录 发布回答。

一个好的回答可以清楚地解答问题和提供建设性反馈,并能促进提问者的职业发展。

回答问题的准则

相关内容