An Azure service that provides serverless Kubernetes, an integrated continuous integration and continuous delivery experience, and enterprise-grade security and governance.
Hi @gamelof , have you tried following this document - certificate ?
This browser is no longer supported.
Upgrade to Microsoft Edge to take advantage of the latest features, security updates, and technical support.
I'm trying to install the following certificate that I got for free with azure kubernetes, but it doesn't work. Can you help?
When I do the dns redirect it works like below but not with certificate
http://xxx.com -> working
https://xxx.com -> not working
Dockerfile
FROM mcr.microsoft.com/dotnet/aspnet:6.0 AS base
WORKDIR /app
EXPOSE 80
EXPOSE 443
FROM mcr.microsoft.com/dotnet/sdk:6.0 AS build
WORKDIR /src
COPY ["WebApp/WebApp.csproj", "WebApp/"]
RUN dotnet restore "WebApp/WebApp.csproj"
COPY . .
WORKDIR "/src/WebApp"
RUN dotnet build "WebApp.csproj" -c Release -o /app/build
FROM build AS publish
RUN dotnet publish "WebApp.csproj" -c Release -o /app/publish
FROM base AS final
WORKDIR /app
COPY --from=publish /app/publish .
ENTRYPOINT ["dotnet", "WebApp.dll"]
Docker-Compose
version: "3.4"
services:
webapp:
image: ${DOCKER_REGISTRY-}webapp
ports:
Docker-compose-ovveride
version: "3.4"
services:
webapp:
environment:
Yaml File
apiVersion: apps/v1
kind: Deployment
metadata:
annotations:
service.kubernetes.io/azure-load-balancer-internal: "true"
name: webapp
labels:
app: webapp
spec:
replicas: 2
selector:
matchLabels:
service: webapp
template:
metadata:
labels:
app: webapp
service: webapp
spec:
containers:
apiVersion: networking.k8s.io/v1
kind: Ingress
metadata:
name: tls-example-ingress
annotations:
kubernetes.io/ingress.class: azure/application-gateway
appgw.ingress.kubernetes.io/ssl-redirect: "true"
appgw.ingress.kubernetes.io/appgw-ssl-certificate: "mysecret"
spec:
tls:
hosts:
xxx.com
secretName: mysecret
rules:
host: xxx.com
http:
paths:
path: /
pathType: Prefix
backend:
service:
name: webapp
port:
number: 80
apiVersion: v1
kind: Secret
metadata:
name: mysecret
data:
tls.crt: xxxx
tls.key:xxx
type: kubernetes.io/tls
An Azure service that provides serverless Kubernetes, an integrated continuous integration and continuous delivery experience, and enterprise-grade security and governance.
A set of technologies in .NET for building web applications and web services. Miscellaneous topics that do not fit into specific categories.
Hi @gamelof , have you tried following this document - certificate ?