/area placement
0.9.0
Dapr Sidecar Services to have Cluster IP address
None Cluster IP address
helm repo add dapr https://daprio.azurecr.io/helm/v1/repo
helm repo update
helm install dapr dapr/dapr --namespace my-namespace
kubectl apply -f app.yamlapp.yaml
apiVersion: apps/v1
kind: Deployment
metadata:
name: appname
namespace: my-namespace
labels:
app: appname
spec:
replicas: 1
selector:
matchLabels:
app: appname
template:
metadata:
labels:
app: appname
annotations:
dapr.io/enabled: "true"
dapr.io/id: "appname"
dapr.io/port: "3000"
dapr.io/log-level: "debug"
spec:
containers:
- name: appname
image: appnameapp:latest
ports:
- containerPort: 8080
Hey @skmaingi thanks for opening this issue.
The Dapr operator creates k8s services for Dapr internal use - these do not have ClusterIP's on purpose. The reason why we don't generate ClusterIP's is because we need Headless services to refresh DNS records when new endpoints are getting added. This is because of a gRPC client side load balancing design issue.
As a user, you should not interact with these k8s services. The dapr sidecar should only be reached via localhost by the app in the pod, and Dapr itself takes care of interacting with other sidecars in the cluster.
If for any reason you want to invoke a Dapr sidecar outside of the pod, you can easily create a Kubernetes service yourself that select the pod that has the sidecar, with targetPort of 3500 for HTTP and 50001 for gRPC.
Hey @yaron2, Thank you for the support.
For confirmation, if a Dapr Sidecar service does not have an internal(private) cluster IP, an Ingress controller with sidecar can still reach it?
Correct.
Thank you for assistance.