<@U04UQ68083H> I'm hosting Kratos on Kubernetes wi...
# ory-copilot
b
@chilly-king-10285 I'm hosting Kratos on Kubernetes with the official Helm chart, but Ory isn't detecting the hostname from the ingress it's set up for. It thinks it's external URL is the internal Kubernetes URL. How do I fix this?
b
A message from kapa.ai
Based on the knowledge sources provided, I don't have specific information about Kratos detecting hostnames from ingress in a Kubernetes environment using the official Helm chart. The documents don't contain enough details to directly address this issue. However, I can provide some general guidance based on related information: 1. When configuring Ory Kratos, it's important to set the correct URLs for various services. In a Kubernetes environment, you might need to explicitly set these URLs rather than relying on automatic detection. 2. The
serve.public.base_url
and
serve.admin.base_url
settings in the Kratos configuration are crucial for determining how Kratos perceives its own URL. You may need to set these manually to match your ingress URL. 3. When using Helm to deploy Kratos, you can override configuration values. You might need to set the
hydra.config.urls.self.issuer
value to match your ingress URL. While this example is from Hydra, a similar principle might apply to Kratos [Kubernetes Helm Chart](https://www.ory.sh/docs/hydra/self-hosted/kubernetes-helm-chart#examples). To resolve your issue, you might need to: 1. Check your Helm values and ensure you're setting the correct URLs for Kratos services. 2. Verify that your ingress is correctly configured to route traffic to Kratos. 3. Ensure that any necessary environment variables or configuration files are properly set to reflect your desired external URL. If these suggestions don't resolve your issue, you may need to consult the official Ory documentation or seek support from the Ory community for more specific guidance on Kubernetes deployments.
b
@chilly-king-10285 is there an environment variable for external hostname?
b
A message from kapa.ai
Based on the knowledge sources provided, there isn't a specific environment variable mentioned for setting the external hostname in Ory Kratos. However, I can provide some relevant information that might help you configure the external hostname: 1. Ory services, including Kratos, use a shared configuration system where you can set configuration values using environment variables. The general format for setting configuration values via environment variables is to use underscores to separate nested keys [Configuration](https://www.ory.sh/docs/ecosystem/configuring). 2. For Kratos, the most relevant configuration settings for external URLs are typically found under the
serve.public.base_url
and
serve.admin.base_url
keys in the configuration file [Deploy Kratos Example](https://www.ory.sh/docs/kratos/guides/deploy-kratos-example#run-ory-kratos-using-systemd). 3. Following the environment variable naming convention, you might be able to set these using:
Copy code
SERVE_PUBLIC_BASE_URL=<https://your-external-hostname.com>    SERVE_ADMIN_BASE_URL=<https://your-external-hostname.com>
However, please note that this is an educated guess based on the general configuration principles, and not explicitly stated in the provided knowledge sources. 4. When working with custom domains in a production environment, you can set up a custom domain for your Ory Network project and then use that domain in your SDK calls [Go to production](https://www.ory.sh/docs/getting-started/integrate-auth/expressjs#go-to-production). If you need more specific information about setting the external hostname for Kratos in your particular setup, you might need to consult the official Ory documentation or reach out to the Ory community for more detailed guidance.