Search code examples
kubernetesgoogle-cloud-platformgoogle-kubernetes-enginekubernetes-networking

no matches for kind "ComputeAddress" in version "compute.cnrm.cloud.google.com/v1beta1"


I am trying to create a Google-managed SSL certificates for Google Kubernetes Engine (v1.20.8-gke.900) for that I have referred to this doc here it is says to create a ComputeAddress resource. So I have created a below config file

#compute-address.yaml
apiVersion: compute.cnrm.cloud.google.com/v1beta1
kind: ComputeAddress
metadata:
  name: my-app-lb-ip
  namespace: my-app-ns
spec:
  location: global

Now when I am applying it by running

kubectl apply -f compute-address.yaml

I am getting an error

error: unable to recognize "compute-address.yaml": no matches for kind "ComputeAddress" in version "compute.cnrm.cloud.google.com/v1beta1"

So can anyone tell what should be the correct apiVersion or kind


Solution

  • I reproduced and got the same error as you. Keep in mind that my original cluster was built from default values, meaning I just gave my cluster a name from UI and created it.

    It looks like you might have missed one step:

    Note: This step requires Config Connector. Follow the installation instructions to install Config Connector on your cluster.

    The following cluster should give better results

    gcloud container clusters create NAMEOFCLUSTER \
        --release-channel regular \
        --addons ConfigConnector \
        --workload-pool=PROJECTID.svc.id.goog \
        --enable-stackdriver-kubernetes \
        --zone us-central1-c