Fabriceli commented on issue #2087:
URL: 
https://github.com/apache/apisix-ingress-controller/issues/2087#issuecomment-1857497862

   I fund it, 
   - for `service` set the `type` to `ExternalName`:
   ```yaml
   apiVersion: v1
   kind: Service
   metadata:
     annotations:
       cpaas.io/creator: admin
       cpaas.io/updated-at: "2023-12-12T01:33:56Z"
     creationTimestamp: "2023-12-12T01:33:56Z"
     labels:
       app.kubernetes.io/instance: vault-dev
       app.kubernetes.io/managed-by: Helm
       app.kubernetes.io/name: vault
       helm.sh/chart: vault-0.25.0
       vault-internal: "true"
     name: vault-external
     namespace: vault
     resourceVersion: "124781325"
     uid: be611b8a-d2e8-4c1d-87a6-3adb9a0cd404
   spec:
     externalName: vault.vault.svc.cluster.local
     sessionAffinity: None
     type: ExternalName
   status:
     loadBalancer: {}
   ```
   
   - for `apisixupstream` and `apisixroute`:
   ```yaml
   apiVersion: "apisix.apache.org/v2"
   kind: "ApisixUpstream"
   metadata:
     name: "vault-sit-upstream"
     namespace: "vault"
   spec:
     externalNodes:
       - name: "vault-external"
         type: "Service"
         port: 8200
     scheme: https
     tlsSecret:
       name: vault-cert
       namespace: vault
   ---
   apiVersion: "apisix.apache.org/v2"
   kind: "ApisixRoute"
   metadata:
     name: "vault-sit-route"
     namespace: "vault"
   spec:
     http:
       - name: "toto-name"
         match:
           hosts:
             - "vault-sit.abc.test"
           paths:
             - "/*"
         upstreams:
           - name: "vault-sit-upstream"
         plugins:
           - name: "redirect"
             enable: true
             config:
               http_to_https: true
   ```


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to