Is it possible to expose dapr side car as a service?
Enviroment: In k8s, an app is deployed with a dapr side car. I want to expose the dapr side car and get access to the side car by external ip.
Is it possible to expose dapr side car as a service?
Enviroment: In k8s, an app is deployed with a dapr side car. I want to expose the dapr side car and get access to the side car by external ip.
Did you try to create an ingress resource on default ApiGroup, then expose the port
https://kubernetes.io/docs/concepts/services-networking/ingress/
apiVersion: networking.k8s.io/v1
kind: Ingress
metadata:
name: dapr-ingress
spec:
rules:
- host: yourAPP.ApiGroup.URL
http:
paths:
- pathType: Prefix
path: /
backend:
service:
name: yourAPP
port:
number: 8080 # expose port
---
kind: Service
metadata:
label:
app: yourAPP
name: yourAPP
spec:
containers:
-name: main-container
....
-name: dapr-sidecontainer
port: 8080 # port exposed to outside
targetPort: 80 # targeted from outside