gentle-umbrella-55872
09/07/2024, 5:51 PMmicroscopic-river-74022
09/07/2024, 5:51 PMmicroscopic-river-74022
09/07/2024, 5:51 PMspec
configuration. However, it's important to note that an ingress is typically used to expose HTTP and HTTPS routes from outside the cluster to services within the cluster, and MongoDB typically does not communicate over these protocols.
If you're trying to expose your MongoDB service to be accessible from outside your Kubernetes cluster, you might want to consider using a Service
of type LoadBalancer
or NodePort
instead.
However, if you still want to proceed with an ingress, you can add an ingresses
field to your spec
configuration. Here's an example of how you might do this:
yaml
kind: Deploy
name: mongo
type: kubernetes
spec:
files:
- ./manifests/*
ingresses:
- path: /mongo
port: mongo
hostname: mongo.${var.base-hostname}
In this example, the path
is set to /mongo
, the port
is set to mongo
, and the hostname
is set to mongo.${var.base-hostname}
. This would make your MongoDB service accessible at the URL mongo.${var.base-hostname}/mongo
.
Please note that this is a simplified example and you might need to adjust it according to your specific needs and environment. For more information, you can refer to the Garden documentation on ingresses ().
----------------------
Note: you can ask me a follow up question by @ mentioning me again :speech_balloon:
----------------------microscopic-river-74022
09/07/2024, 5:51 PMgentle-umbrella-55872
09/07/2024, 5:52 PMmicroscopic-river-74022
09/07/2024, 5:52 PMmicroscopic-river-74022
09/07/2024, 5:52 PMingresses
field from the Garden configuration.
Remember, the ingress in your Kubernetes manifest should be correctly configured to expose the MongoDB service. As mentioned earlier, MongoDB typically does not communicate over HTTP/HTTPS, which are the protocols usually exposed by an ingress.
For more information, you can refer to the Garden documentation on Kubernetes deployments () and the Kubernetes documentation on Ingress ().
----------------------
Note: you can ask me a follow up question by @ mentioning me again :speech_balloon:
----------------------microscopic-river-74022
09/07/2024, 5:52 PM