Running Couchbase on Minikube

I am trying to run Couchbase on Minikube, How do I get it running.
I’m getting the following error:

Error updating Endpoint Slices for Service default/cb-example: Error updating cb-example-5npm6 EndpointSlice for Service default/cb-example: EndpointSlice.discovery.k8s.io “cb-example-5npm6” is invalid: ports: Too many: 237: must have at most 100 items
endpoint-slice-controller

Failed to update endpoint default/cb-example: Operation cannot be fulfilled on endpoints “cb-example”: StorageError: invalid object, Code: 4, Key: /registry/services/endpoints/default/cb-example, ResourceVersion: 0, AdditionalErrorMsg: Precondition failed: UID in precondition: 0bcdbdcf-292e-43c9-b116-b3b0b94033f3, UID in object meta:

I am using this to configure the cluster
apiVersion: v1
kind: Secret
metadata:
name: cb-example-auth
type: Opaque
data:
username: QWRtaW5pc3RyYXRvcg== # Administrator
password: XXXXXX # password

apiVersion: couchbase.com/v2
kind: CouchbaseCluster
metadata:
name: cb-example
spec:
image: couchbase/server:6.5.0
security:
adminSecret: cb-example-auth
paused: false
softwareUpdateNotifications: true
securityContext:
runAsUser: 1000
runAsNonRoot: true
fsGroup: 1000
platform: aws
cluster:
clusterName: cb-example
dataServiceMemoryQuota: 512Mi
indexServiceMemoryQuota: 256Mi
searchServiceMemoryQuota: 256Mi
indexStorageSetting: memory_optimized
autoFailoverTimeout: 120s
autoFailoverMaxCount: 3
autoFailoverOnDataDiskIssues: true
autoFailoverOnDataDiskIssuesTimePeriod: 120s
autoFailoverServerGroup: false
autoCompaction:
databaseFragmentationThreshold:
percent: 30
size: 1Gi
autoFailoverMaxCount: 3
autoFailoverOnDataDiskIssues: true
autoFailoverOnDataDiskIssuesTimePeriod: 120s
autoFailoverServerGroup: false
autoCompaction:
databaseFragmentationThreshold:
percent: 30
size: 1Gi
viewFragmentationThreshold:
percent: 30
size: 1Gi
parallelCompaction: false
timeWindow:
start: 02:00
end: 06:00
abortCompactionOutsideWindow: true
tombstonePurgeInterval: 72h
servers:

  • size: 2
    name: all_services
    services:
    • data
    • index
    • query
    • search
      buckets:
      managed: false
      selector:
      matchLabels:
      cluster: cb-example
      monitoring:
      prometheus:
      enabled: true
      image: couchbase/exporter:1.0.1
      resources:
      requests:
      cpu: 100m
      memory: 100Mi

Nothing can be done about that, couchbase server uses a lot of ports and they are all hard coded, they are all required for correct function. The number is actually reduced in 6.5.0+ and this will be reflected in Operator 2.1. I count 90, which is better and within range!

I’m assuming you are using an uncertified platform? I can see from the docs that endpoint slices are from 1.17 onwards, operator 2.0 is only certified to work with 1.13 and 1.14 (https://kubernetes.io/docs/concepts/services-networking/endpoint-slices/#endpointslice-controller).

However, if you follow that documentation, there is a command line flag (–max-endpoints-per-slice) that you can modify to allow it to correctly function.

Let me know if this works and how you get on!

I am running on Ubuntu 20.