Hasanuzzaman
Hasanuzzaman

Reputation: 1862

Kubernetes: communicate internal services using HTTPS

I have 2 services deployed in Kubernetes

  1. Application A (asp.net core 5 gRPC service)
  2. Application B (asp.net core 5 api)

Application B is accessible via ingress-nginx-controller over https from out side of my cluster.

Application A is expose via Service and only accessible inside my cluster.

My question is how can I connect from Application B to Application A over SSL/TLS?

enter image description here

Upvotes: 4

Views: 1703

Answers (1)

SonDang
SonDang

Reputation: 1597

For HTTPS communication, you can setup certificate with "dotnet dev-certs https". Each pod will need setup self-signed certificate on port 443, for development purpose, but not recommended.

However, GRPC actually can be use with HTTP based, with service mesh support for http2/grpc for service-to-service communication. These steps can be

  1. Call GRPC use HTTP

    https://learn.microsoft.com/en-us/aspnet/core/grpc/troubleshoot?view=aspnetcore-3.0#call-insecure-grpc-services-with-net-core-client-2

  2. Setup Linkerd

    https://techcommunity.microsoft.com/t5/azure-developer-community-blog/meshing-with-linkerd2-using-grpc-enabled-net-core-services/ba-p/1377867

Hope this helps

Upvotes: 1

Related Questions