'No matches for kind "HelmChart" in version "helm.cattle.io/v1"

I am trying to create jenkins from helmChart, I used this way a year ago and it worked but now it is not working and I got this error when I tried to apply the yaml file kubectl apply -f helm.yaml -n jenkins:

no matches for kind "HelmChart" in version "helm.cattle.io/v1"

helm.yaml

kind: HelmChart
metadata:
  name: jenkins
  namespace: jenkins
spec:
  chart: stable/jenkins
  targetNamespace: jenkins
  valuesContent: |-
    master:
      adminUser: admin
      adminPassword: admin
      image: jenkinsci/blueocean
      tag: latest
      jenkinsUriPrefix: /jenkins
      JCasC:
        authorizationStrategy: anyoneCanDoAnything


Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source