I want to change the output of the ingress url in ...
# 🤖|ask-kapa
g
@microscopic-river-74022 I want to change the output of the ingress url in this config from http to mongoDB. which config do i have to add? kind: Deploy name: mongo type: kubernetes spec: files: - ./manifests/*
m
Please stand by @gentle-umbrella-55872 as I search the knowledge base. I normally take about 20 seconds or so. :wave:
---------------------- To change the output of the ingress URL in your configuration, you would need to define an ingress within your
spec
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:
Copy code
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: ----------------------
message has been deleted
g
@microscopic-river-74022 in the manifest is already an ingress definition. is this an issue?
m
Let me check the knowledge base for you. One moment! :books:
---------------------- If your Kubernetes manifest files already include an ingress definition, you don't need to define it again in the Garden configuration. Garden will apply the Kubernetes manifests as they are, including the ingress definition. However, if you want to override the ingress definition in the Kubernetes manifests with the one in the Garden configuration, you can do so. Just keep in mind that the ingress definition in the Garden configuration will take precedence over the one in the Kubernetes manifests. If you want to keep the ingress definition in the Kubernetes manifests and ignore the one in the Garden configuration, you can remove the
ingresses
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: ----------------------
message has been deleted
4 Views