external-secrets/kubernetes-external-secrets

no matches for kind "ExternalSecret" in version "kubernetes-client.io/v1"

gangadharayya-hiremath-tm opened this issue · 4 comments

Hi All,

Getting error "no matches for kind "ExternalSecret" in version "kubernetes-client.io/v1"" for the following manifest file, any clues will be helpful:

apiVersion: "kubernetes-client.io/v1"
kind: ExternalSecret
metadata:
name: test-secret
namespace: dev
spec:
backendType: secretsManager
roleArn: arn:aws:iam::<>:role/<>
region: us-east-1
data:
- key: username
name: tutorials/MyFirstTutorialSecret

Looks like you didnt install the CRD.

I encountered the same issue via following Install with kubectl. The reason was if you run helm template --output-dir ./output_dir ./charts/kubernetes-external-secrets/, it won't extract ./charts/kubernetes-external-secrets/crds/kubernetes-client.io_externalsecrets_crd.yaml file therefore the CRD is missing
My fix was manually copy the kubernetes-client.io_externalsecrets_crd.yaml file to output-dir and put in correct location then run helm upgrade.
Btw my helm version is version.BuildInfo{Version:"v3.5.4", GitCommit:"1b5edb69df3d3a08df77c9902dc17af864ff05d1", GitTreeState:"dirty", GoVersion:"go1.16.3"} if it's helpful

I think you can use flag --include-crds with helm template

I encountered the same issue via following Install with kubectl. The reason was if you run helm template --output-dir ./output_dir ./charts/kubernetes-external-secrets/, it won't extract ./charts/kubernetes-external-secrets/crds/kubernetes-client.io_externalsecrets_crd.yaml file therefore the CRD is missing
My fix was manually copy the kubernetes-client.io_externalsecrets_crd.yaml file to output-dir and put in correct location then run helm upgrade.
Btw my helm version is version.BuildInfo{Version:"v3.5.4", GitCommit:"1b5edb69df3d3a08df77c9902dc17af864ff05d1", GitTreeState:"dirty", GoVersion:"go1.16.3"} if it's helpful

Awesome!!! Thank you @chenyang-nirovision @Flydiverny