Last active
January 16, 2022 02:18
-
-
Save elmariofredo/6f99144f448c3b1f271c67069e6665bb to your computer and use it in GitHub Desktop.
Custom Kubernetes ingress nginx error page
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
apiVersion: v1 | |
kind: ConfigMap | |
metadata: | |
name: error_page | |
namespace: ingress-nginx | |
data: | |
error_page: | | |
<!DOCTYPE html> | |
<html> | |
<head> | |
<title>ERROR PAGE</title> | |
</head> | |
<body> | |
ERROR PAGE | |
</body> | |
</html> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# See https://github.com/kubernetes/ingress-nginx/blob/main/charts/ingress-nginx/values.yaml | |
controller: | |
custom-http-errors: "404,500,503" # See https://kubernetes.github.io/ingress-nginx/user-guide/nginx-configuration/configmap/#custom-http-errors | |
defaultBackend: | |
enabled: true | |
image: | |
registry: k8s.gcr.io | |
image: ingress-nginx/nginx-errors # Source https://github.com/kubernetes/ingress-nginx/tree/main/images/custom-error-pages | |
tag: "0.48.1" # Check latest version on https://github.com/kubernetes/ingress-nginx/blob/main/docs/examples/customization/custom-errors/custom-default-backend.yaml | |
extraVolumes: | |
- name: error_page | |
configMap: | |
name: error_page | |
items: | |
- key: "error_page" | |
path: "404.html" | |
- key: "error_page" | |
path: "500.html" | |
- key: "error_page" | |
path: "503.html" | |
extraVolumeMounts: | |
- name: error_page | |
mountPath: /www |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment