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ヶ月前189ビュー
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ヶ月前

ログインしていません。 ログイン 回答を投稿する。

優れた回答とは、質問に明確に答え、建設的なフィードバックを提供し、質問者の専門分野におけるスキルの向上を促すものです。

質問に答えるためのガイドライン

関連するコンテンツ