Reference example · .NET web app
ASP.NET values.
A .NET web application with environment configuration and a Gateway API route.
values.yaml
replicaCount: 2
image: ghcr.io/example-org/aspnet
imageTag: "1.0.0"
imagePullPolicy: IfNotPresent
service:
port: 8080
securityContext:
runAsNonRoot: true
runAsUser: 10001
runAsGroup: 10001
allowPrivilegeEscalation: false
readOnlyRootFilesystem: true
capabilities:
drop: ["ALL"]
podSecurityContext:
seccompProfile:
type: RuntimeDefault
env:
- name: ASPNETCORE_ENVIRONMENT
value: Production
- name: ASPNETCORE_URLS
value: http://+:8080
envFrom:
- configMapRef:
name: aspnet-config
envSecrets:
enableEnv: true
envs:
- name: ConnectionStrings__Main
secretName: aspnet-secrets
secretKey: ConnectionStrings__Main
configMaps:
- name: aspnet-config
data:
Logging__LogLevel__Default: Information
resources:
requests: {cpu: 100m, memory: 128Mi}
limits: {cpu: 500m, memory: 512Mi}
readinessProbe:
httpGet: {path: /health, port: http}
livenessProbe:
httpGet: {path: /health, port: http}
route:
enabled: true
gateway: external
gatewayNamespace: gateway-system
sectionName: https
hostname: aspnet.example.comDeploy
helm upgrade --install aspnet universal/application \ --namespace apps --create-namespace \ --values values.yaml
Result
kubectl get pods -l app.kubernetes.io/instance=aspnet
NAME READY STATUS
aspnet-6c77f86c65-abcde 1/1 Running
curl -fsS https://aspnet.example.com/health
{"status":"ok"}