0

Getting error while installing the crossplane ProviderConfig in kubernetes cluster

root@kube-master:~/crossplane# kubectl apply -f ProviderConfig.yaml 
error: resource mapping not found for name: "default" namespace: "" from "ProviderConfig.yaml": no matches for kind "ProviderConfig" in version "aws.upbound.io/v1beta1"
ensure CRDs are installed first

ProviderConfig.yaml:

apiVersion: aws.upbound.io/v1beta1
kind: ProviderConfig
metadata:
  name: default
spec:
  credentials:
    source: Secret
    secretRef:
      namespace: crossplane-system
      name: aws-secret
      key: creds

Did anyone face the same issue and got resolved?, please help me to fix this issue.

AlecBrooks
  • 524
  • 4
  • 12
  • Consider to ask sys-admin questions on https://serverfault.com instead. Stack Overflow is for programming questions. – Jonas Jun 12 '23 at 16:50

1 Answers1

0

In order to install the ProviderConfig you need to first install the Provider.

Based on the apiVersion, it looks like you are trying to install a config for provider-aws. You have a couple of options.

  1. You can install providers from the AWS provider family, which allows you to select which APIs you want to use. For example, S3 and EC2:
kubectl apply -f - <<EOF
apiVersion: pkg.crossplane.io/v1
kind: Provider
metadata:
  name: upbound-provider-aws-s3
spec:
  package: xpkg.upbound.io/upbound/provider-aws-s3:v0.37.0
---
apiVersion: pkg.crossplane.io/v1
kind: Provider
metadata:
  name: upbound-provider-aws-ec2
spec:
  package: xpkg.upbound.io/upbound/provider-aws-ec2:v0.37.0
EOF
  1. You can install the monolithic provider (900+ CRDs in one provider)
kubectl apply -f - <<EOF
apiVersion: pkg.crossplane.io/v1
kind: Provider
metadata:
  name: provider-aws
spec:
  package: xpkg.upbound.io/upbound/provider-aws:v0.37.0
EOF