Skip to main content
Version: 2.6.0

Kubernetes Controller Config

This article introduces Kubernetes Controller configuration.

Enable HTTPS#

To enable HTTPS, you need to configure the sni protocol in the application.yml file of the gateway:

shenyu:   netty:     http:       sni:         enabled: true         mod: k8s #k8s mode applies         defaultK8sSecretNamespace: shenyu-ingress #The namespace of the default secret resource         defaultK8sSecretName: default-cert #default secret resource name

Among them, the default secret resource must be available, but it will not be actually used at present.

Ingress configuration#

ShenYu Kubernetes Controller implements the K8s native Ingress standard, see K8s official documentation for the use of the native standard

In addition, Apache ShenYu has expanded based on the Annotation field of Ingress, and the configuration is shown in the following tables:

General#

NameDefaultRequiredDescription
kubernetes.io/ingress.classYesFill in shenyu

Divide plugin (HTTP proxy)#

NameDefaultRequiredDescription
shenyu.apache.org/loadbalancerrandomNoLoad balancing algorithm, optional hash, random, roundRobin, leastActive, p2c, shortestResponse
shenyu.apache.org/retry3NoNumber of failed retries
shenyu.apache.org/timeout3000NoBackend request timeout, in milliseconds
shenyu.apache.org/header-max-size10240NoThe maximum size of the request header, unit byte
shenyu.apache.org/request-max-size102400NoMaximum request body size, unit byte