kubernetes.io/ingress.http-rules and kubernetes.io/ingress.https-rules annotations.kubernetes.io/ingress.http-rules and kubernetes.io/ingress.https-rules is a Json Array. The format for each object is as below:{"host": "<domain>","path": "<path>","backend": {"serviceName": "<service name>","servicePort": "<service port>"}}
TKE Ingress Controller supports mixed configuration of HTTP and HTTPS rules. The steps are as follows:kubernetes.io/ingress.rule-mix annotation in Ingress and set it to true.kubernetes.io/ingress.http-rules and kubernetes.io/ingress.https-rules, and add them to the corresponding rule set. If a corresponding rule is not found in Ingress annotation, it is added to the HTTPS rule set by default.VIP, and Path defaults to /).apiVersion: extensions/v1beta1kind: Ingressmetadata:annotations:kubernetes.io/ingress.http-rules: '[{"host":"www.tencent.com","path":"/","backend":{"serviceName":"sample-service","servicePort":"80"}}]'kubernetes.io/ingress.https-rules: '[{"host":"www.tencent.com","path":"/","backend":{"serviceName":"sample-service","servicePort":"80"}}]'kubernetes.io/ingress.rule-mix: "true"name: sample-ingressnamespace: defaultspec:rules:- host: www.tencent.comhttp:paths:- backend:serviceName: sample-serviceservicePort: 80path: /tls:- secretName: tencent-com-cert
tencent-com-cert.ingress.spec.rule in both kubernetes.io/ingress.http-rules and kubernetes.io/ingress.https-rules.Feedback