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]

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
전문가
답변함 한 달 전
profile picture
전문가
검토됨 한 달 전
  • 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.

답변함 한 달 전

로그인하지 않았습니다. 로그인해야 답변을 게시할 수 있습니다.

좋은 답변은 질문에 명확하게 답하고 건설적인 피드백을 제공하며 질문자의 전문적인 성장을 장려합니다.

질문 답변하기에 대한 가이드라인

관련 콘텐츠