Difference between revisions of "Ingress backends"
(Created page with "https://voyagermesh.com/docs/10.0.0/guides/ingress/http/external-svc/") |
|||
Line 1: | Line 1: | ||
https://voyagermesh.com/docs/10.0.0/guides/ingress/http/external-svc/ | https://voyagermesh.com/docs/10.0.0/guides/ingress/http/external-svc/ | ||
+ | |||
+ | |||
+ | https://voyagermesh.com/docs/10.0.0/guides/ingress/http/external-svc/#using-external-ip | ||
+ | |||
+ | ```to collect data to improve your experience on our site, as described in our Privacy Policy. | ||
+ | |||
+ | You are looking at the documentation of a prior release. To read the documentation of the latest release, please visit here. | ||
+ | New to Voyager? Please start here. | ||
+ | |||
+ | Using External Service as Ingress Backend | ||
+ | You can use an external service as a Backend for Kubernetes Ingress. There are 2 options depending on whether the external service has an external IP or DNS record. | ||
+ | |||
+ | Using External IP | ||
+ | You can introduce any external IP address as a Kubernetes service by creating a matching Service and Endpoint object. Then you can use this service as a backend for your Ingress rules. | ||
+ | |||
+ | apiVersion: v1 | ||
+ | kind: Service | ||
+ | metadata: | ||
+ | name: external-ip | ||
+ | spec: | ||
+ | ports: | ||
+ | - name: app | ||
+ | port: 80 | ||
+ | protocol: TCP | ||
+ | targetPort: 9855 | ||
+ | clusterIP: None | ||
+ | type: ClusterIP | ||
+ | --- | ||
+ | apiVersion: v1 | ||
+ | kind: Endpoints | ||
+ | metadata: | ||
+ | name: external-ip | ||
+ | subsets: | ||
+ | - addresses: | ||
+ | # list all external ips for this service | ||
+ | - ip: 172.17.0.5 | ||
+ | ports: | ||
+ | - name: app | ||
+ | port: 9855 | ||
+ | protocol: TCP | ||
+ | Now, you can use this external-ip Service as a backend in your Ingress definition. For example: | ||
+ | |||
+ | apiVersion: voyager.appscode.com/v1beta1 | ||
+ | kind: Ingress | ||
+ | metadata: | ||
+ | name: test-ings-rhvulnlb | ||
+ | namespace: test-x | ||
+ | spec: | ||
+ | backend: | ||
+ | serviceName: external-ip | ||
+ | servicePort: "80" | ||
+ | |||
+ | ``` |
Revision as of 19:50, 23 October 2022
https://voyagermesh.com/docs/10.0.0/guides/ingress/http/external-svc/
https://voyagermesh.com/docs/10.0.0/guides/ingress/http/external-svc/#using-external-ip
```to collect data to improve your experience on our site, as described in our Privacy Policy.
You are looking at the documentation of a prior release. To read the documentation of the latest release, please visit here. New to Voyager? Please start here.
Using External Service as Ingress Backend You can use an external service as a Backend for Kubernetes Ingress. There are 2 options depending on whether the external service has an external IP or DNS record.
Using External IP You can introduce any external IP address as a Kubernetes service by creating a matching Service and Endpoint object. Then you can use this service as a backend for your Ingress rules.
apiVersion: v1 kind: Service metadata:
name: external-ip
spec:
ports: - name: app port: 80 protocol: TCP targetPort: 9855 clusterIP: None
type: ClusterIP
apiVersion: v1 kind: Endpoints metadata:
name: external-ip
subsets: - addresses:
# list all external ips for this service - ip: 172.17.0.5 ports: - name: app port: 9855 protocol: TCP
Now, you can use this external-ip Service as a backend in your Ingress definition. For example:
apiVersion: voyager.appscode.com/v1beta1 kind: Ingress metadata:
name: test-ings-rhvulnlb namespace: test-x
spec:
backend: serviceName: external-ip servicePort: "80"
```