-
-
Notifications
You must be signed in to change notification settings - Fork 5.8k
Description
I am trying to deploy a Docsify based documentation site behind Kubernetes using NGINX Ingress. The setup works correctly in all other environments but fails when accessed through the ingress.
What works
- Running
docsify serve .locally works as expected - Serving the same content via Docker works without issues
- index.html loads successfully through Kubernetes NGINX Ingress
What does not work
When accessed through Kubernetes NGINX Ingress only index.html is loaded. Markdown files cannot be fetched and the documentation content never renders.
Requests for .md files fail only when traffic goes through the ingress. The same container and files work correctly when accessed directly without ingress.
Ingress configuration
apiVersion: networking.k8s.io/v1
kind: Ingress
metadata:
name: docs-ingress
namespace: docs-namespace
annotations:
nginx.ingress.kubernetes.io/ssl-redirect: "true"
nginx.ingress.kubernetes.io/force-ssl-redirect: "true"
nginx.ingress.kubernetes.io/proxy-body-size: "0"
nginx.ingress.kubernetes.io/proxy-buffering: "off"
nginx.ingress.kubernetes.io/proxy-request-buffering: "off"
nginx.ingress.kubernetes.io/proxy-connect-timeout: "300"
nginx.ingress.kubernetes.io/proxy-send-timeout: "300"
nginx.ingress.kubernetes.io/proxy-read-timeout: "300"
nginx.ingress.kubernetes.io/use-forwarded-headers: "true"
nginx.ingress.kubernetes.io/configuration-snippet: |
chunked_transfer_encoding off;
spec:
ingressClassName: nginx
tls:
- hosts:
- docs.example.com
secretName: docs-tls-secret
rules:
- host: docs.example.com
http:
paths:
- path: /
pathType: Prefix
backend:
service:
name: docs-service
port:
number: 3000
Any guidance on required Docsify configuration such as basePath routing or headers for Kubernetes NGINX Ingress would be appreciated.
Expected behavior
Docsify should be able to fetch markdown files normally when served behind Kubernetes NGINX Ingress just like it does locally or in Docker.