Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How do you create custom error pages for Istio loadbalancer in kubernetes

Tags:

istio

I cant seem to find/understand how to change the default error landing pages for the Istio loadbalancer in kubernetes.

For example the 503 "No healthy upstream" page.

Is it possible to change these in Istio? If so how would I go about doing it?

Thanks in advance!

like image 692
Staffan.S Avatar asked Oct 17 '22 17:10

Staffan.S


1 Answers

2020 Update

Envoy has now added this functionality. Here's an example config to use your own error string for a HTTP 503 response:

mappers:
- filter:
    status_code_filter:
      comparison:
        op: EQ
        value:
          default_value: 503
          runtime_key: key_b
  status_code: 503
  body:
    inline_string: "Custom 503 page content can go here"

For more details on how this can be customized, check out the docs at - https://github.com/envoyproxy/envoy/blob/master/docs/root/configuration/http/http_conn_man/local_reply.rst

like image 92
Sodman Avatar answered Oct 21 '22 00:10

Sodman