getting error while applying alertmanagercofig file in kubernetes

Viewed 19

alaertmanagerconfig fille

apiVersion: monitoring.coreos.com/v1beta1
kind: AlertmanagerConfig
spec:
  route:
    group_by: ['alertname', 'cluster', 'service']
    group_wait: 30s
    group_interval: 1m
    repeat_interval: 1h
    receiver: slack-notifications
    routes:
      - matchers:
          - alertname="HostHighCpuLoad"
        receiver: slack-notifications
  receivers:
  - name: 'slack-notifications'
    slackConfigs:
    - apiURL:
        name: slack-auth
        key: url
      channel: '#alerts'
      sendResolved: true
      iconURL: https://avatars3.githubusercontent.com/u/3380462
      title: |-
        Alert Status: {{ .Status | toUpper }}{{ if eq .Status "firing" }} {{ end }}
      text: >-    
        *Description:* {{ range .Alerts }}{{ .Annotations.description }}
        {{ end }}
        {{ range .Alerts }}
          *Alert Type:* {{ .Annotations.title }}{{ if .Labels.severity }} `{{ .Labels.severity }}`{{ end }}
        *Details:*
          {{ range .Labels.SortedPairs }} • *{{ .Name }}:* `{{ .Value }}`
          {{ end }}
        {{ end }} 

here is the error


root@mngmt:~# k apply -f alertmanager.yaml error: resource mapping not found for name: "" namespace: "" from "alertmanager.yaml": no matches for kind "AlertmanagerConfig" in version "monitoring.coreos.com/v1beta1" ensure CRDs are installed first**

please someone help me. i

0 Answers
Related