-
Notifications
You must be signed in to change notification settings - Fork 2
Open
Description
The created service name should be configurable by some setting like serviceName in the database CRD. Leaving that settings empty / out should prevent the controller from creating a service. The serive should be deployed to the same namespace the database CRD is saved to.
Service creation
Looks like there are two ways:
- Service with IP-Address
kind: Service
apiVersion: v1
metadata:
name: mongo
Spec:
type: ClusterIP
ports:
- port: 27017
targetPort: 27017kind: Endpoints
apiVersion: v1
metadata:
name: mongo # has to be the same name use by the service
subsets:
- addresses:
- ip: 10.240.0.4 # ip of the cluster-external mongo database
ports:
- port: 27017- Service with type
ExternalName(DNS hostname)
kind: Service
apiVersion: v1
metadata:
name: mongo
spec:
type: ExternalName
externalName: db123.my-favourite-provider.tldSOURCE: https://cloud.google.com/blog/products/gcp/kubernetes-best-practices-mapping-external-services
Metadata
Metadata
Assignees
Labels
No labels