nphariharan commented on issue #2077:
URL:
https://github.com/apache/apisix-ingress-controller/issues/2077#issuecomment-1837998681
@Revolyssup - Please refer the below config files and correct me where I am
wrong.
1) ApisixRoute
apiVersion: apisix.apache.org/v2
kind: ApisixRoute
metadata:
name: helloworld-route
namespace: ingress-apisix
spec:
http:
- name: hello
match:
hosts:
- precd.dev.interact.lighting.com
paths:
- "/hello/*"
upstreams:
- name: helloworld-upstream
2) ApisixUpstream
apiVersion: apisix.apache.org/v2
kind: ApisixUpstream
metadata:
name: helloworld-upstream
namespace: ingress-apisix
spec:
loadbalancer:
type: roundrobin
discovery:
type: dns
serviceName: hello-world.ingress-apisix.svc.cluster.local
---
apiVersion: v1
kind: Service
metadata:
name: hello-world
namespace: ingress-apisix
spec:
selector:
app: hello-world
ports:
- name: http
port: 80
targetPort: 1081
3) ServiceEntry object
apiVersion: networking.istio.io/v1alpha3
kind: ServiceEntry
metadata:
name: helloworld-service-entry
namespace: ingress-apisix
spec:
hosts:
- precd.dev.interact.lighting.com
ports:
- number: 80
name: http-port
protocol: HTTP
- number: 443
name: https-port
protocol: HTTPS
resolution: DNS
4) VirtualService
apiVersion: networking.istio.io/v1alpha3
kind: VirtualService
metadata:
name: helloworld-vs
namespace: ingress-apisix
spec:
hosts:
- "*"
gateways:
- pre-gateway-cd
http:
- match:
- gateways:
- pre-gateway-cd
port: 80
route:
- destination:
host: apisix-gateway.ingress-apisix.svc.cluster.local
subset: helloworld-service-entry
port:
number: 80
5) Gateway
apiVersion: networking.istio.io/v1alpha3
kind: Gateway
metadata:
name: pre-gateway-cd
namespace: ingress-apisix
spec:
selector:
istio: ingressgateway # use Istio default gateway implementation
servers:
- port:
number: 80
name: http
protocol: HTTP
hosts:
- "precd.dev.interact.lighting.com"
Please let me know if you need any other info.
Thanks,
Hariharan.
--
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]