You need to enable JavaScript to run this app.
Volcengine Kubernetes Engine

Volcengine Kubernetes Engine

Copy page
Download PDF
Nginx Ingress
Connecting NGINX Ingresses to backend services through HTTPS
Copy page
Download PDF
Connecting NGINX Ingresses to backend services through HTTPS
In most cases, HTTP is used to connect NGINX Ingresses to backend services. To ensure the security of backend communication, you can configure annotations to connect to backend servers by using HTTPS. This topic describes how to connect NGINX Ingresses to backend servers by using HTTPS.​
warning​
NGINX Ingress support will soon be discontinued. For details, see [Product announcement] NGINX Ingress EOM.​
Prerequisites​
  • You have already purchased a Secure Sockets Layer (SSL) certificate and key in Volcano Engine SSL Certificate Service or created an SSL certificate and key by using OpenSSL.​
Procedure​
Step 1: Configure a secret​
  1. The SSL certificate and key have been obtained. This topic takes tls.key and tls.crt as an example.​
  1. Run the following command to create a secret named ingress-secret of type kubernetes.io/tls.​
  • ​
    kubectl create secret tls ingress-secret --key tls.key --cert tls.crt​
    ​
Step 2: Configure an Ingress​
  1. Create a YAML file for an Ingress. The code of the sample filenginx-ingress.yaml is as follows:​
  • ​
    apiVersion: networking.k8s.io/v1​
    kind: Ingress​
    metadata:​
    name: nginx-ingress # Ingress name​
    annotations:​
    nginx.ingress.kubernetes.io/backend-protocol: "HTTPS" # Connect to the back-end server over HTTPS.​
    spec:​
    ingressClassName: nginx # Specify an Ingress controller.​
    rules:​
    - host: example.com # The domain name in the forwarding rule.​
    http:​
    paths:​
    - backend:​
    service:​
    name: service-demo # The name of the service where requests are forwarded.​
    port:​
    number: 80 # The port that the service opens to receive forwarded requests.​
    path: / # The access path.​
    pathType: Prefix # Path type. Available values include Exact (exact match) and Prefix (prefix match).​
    tls:​
    - secretName: ingress-secret # The name of the Secret used by the Ingress.​
    ​
  1. Run the following command to create the Ingress.​
  • ​
    kubectl apply -f nginx-ingress.yaml​
    ​
​
Last updated: 2026.03.16 11:25:35