简体   繁体   中英

kubernetes cassandra operator error

I'm getting below error while creating cassandra operator for kubernetes.

# kubectl create -f example-cassandra-cluster.yaml 
error: unable to recognize "example-cassandra-cluster.yaml": no matches for cassandra.database.instaclustr.com/, Kind=CassandraCluster

example-cassandra-cluster.yaml is:

apiVersion: "cassandra.database.instaclustr.com/v1beta2"
kind: "CassandraCluster"
metadata:
name: "example-cassandra-cluster"
spec:
size: 3
version: "3.11"
pod:
resources:
  limits:
    memory: "512Mi"

Have anyone encountered this error before?

The

apiVersion: "cassandra.database.instaclustr.com/v1beta2"

indicates that the CassandraCluster kind

kind: "CassandraCluster"

depends on a Custom Resource Definition.

That CRD has to be created in the cluster before instantiating its objects.

https://kubernetes.io/docs/tasks/access-kubernetes-api/extend-api-custom-resource-definitions/#create-a-customresourcedefinition

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM