Is there a way to run Ory Kratos public api on a s...
# ory-selfhosting
m
Is there a way to run Ory Kratos public api on a subpath, like "/kratos"?
l
How are you trying to run Kratos? It is possible using the Helm Chart configuration. In the Ingress section of the Kratos config you can have something similar to this where your
${KRATOS_PUBLIC}
variable is the
kratos
, but you would need to set up NGINX Ingress controller in to your K8S cluster for this to work.
Copy code
ingress: {
    public: {
      enabled: true,
      className: 'nginx',
      annotations: {
        '<http://nginx.ingress.kubernetes.io/rewrite-target|nginx.ingress.kubernetes.io/rewrite-target>': '/$1',
        '<http://nginx.ingress.kubernetes.io/use-regex|nginx.ingress.kubernetes.io/use-regex>': 'true',
      },
      hosts: [
        {
          host: pulumi.interpolate`${clusterDomainName}`,
          paths: [
            {
              path: `/${KRATOS_PUBLIC}/(.*)`,
              pathType: 'ImplementationSpecific',
            },
          ],
        },
      ],
    },
  },