Empresas
Empregos
  • Sobre nós
  • Soluções
    • Publicação de vagas
      Publique sua vaga e receba candidatos qualificados em 48h.
    • Avaliações de candidatos
      Mais de 500 testes técnicos e psicológicos, mais anti-fraude.
    • Headhunting
      Busca executiva personalizada do início ao fim.
    • Folha de Pagamento + EOR
      Dispersão de folha e EOR em mais de 15 países da LATAM.
  • Preços
  • Empregos

0

398
Visualizações
How to have ASP.NET Core running locally with HTTPS in Kubernetes

I currently have a docker-compose setup for ASP.NET Core. However when moving to test the cluster in Kubernetes I ran into SSL issues with Kestrel. Originally with Docker/Docker-compose you can set up local SSL with

dotnet dev-certs https -ep %USERPROFILE%\.aspnet\https\<app_name>.pfx -p <password>

Then

dotnet dev-certs https --trust

Finally

dotnet user-secrets set "Kestrel:Certificates:Development:Password" "<password>"

And in Docker-compose I setup the volumes to point to this cert

volumes:
      - ${APPDATA}\microsoft\UserSecrets\:/root/.microsoft/usersecrets
      - ${USERPROFILE}\.aspnet\https:/root/.aspnet/https/

I am curious how I can test locally https with kubernetes. I saw a git repo https://github.com/Lybecker/k8s-friendly-aspnetcore, however I did not figure out how to get the .pfx file from my local computer into the secret, I would think copy and paste is not the way to go.

I looked at this SO post Access .NET Core app on Kubernetes on both http and https

However it looks like they are using .Net 5 which uses .key and .crt. I am on .Net 3.1 which uses a .pfx file.

over 4 years ago · Santiago Trujillo
1 Respostas
Responde à pergunta

0

Rather than deploying your .NET core container with https, you should deploy it with http and use nginx-ingress to provide https as described here https://cert-manager.io/docs/tutorials/acme/ingress/

over 4 years ago · Santiago Trujillo Relatório
Responde à pergunta
Encontrar trabalhos remotos

Descubra a nova forma de encontrar um emprego!

melhores empregos
Principais categorias de trabalho
Empresas
Postar vaga Preços Comercial
Jurídico
Termos e Condições Política de privacidade
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomende algumas ofertas para mim
Preciso de ajuda