Last active
August 21, 2022 10:14
-
-
Save Ricky-G/59eb109913bd45d3e9229f9cf0a97edc to your computer and use it in GitHub Desktop.
Deploys a sample API as a service to AKS with 10 replicas and sets AGIC for ingress. Was taken from https://github.com/Azure/application-gateway-kubernetes-ingress/blob/master/docs/examples/aspnetapp.yaml which didn't have replicas set
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
apiVersion: apps/v1 | |
kind: Deployment | |
metadata: | |
name: aspnetapp | |
labels: | |
app: aspnetapp | |
spec: | |
replicas: 10 | |
selector: | |
matchLabels: | |
app: aspnetapp | |
template: | |
metadata: | |
labels: | |
app: aspnetapp | |
spec: | |
containers: | |
- image: "mcr.microsoft.com/dotnet/core/samples:aspnetapp" | |
name: aspnetapp | |
ports: | |
- containerPort: 80 | |
protocol: TCP | |
--- | |
apiVersion: v1 | |
kind: Service | |
metadata: | |
name: aspnetapp | |
spec: | |
selector: | |
app: aspnetapp | |
ports: | |
- protocol: TCP | |
port: 80 | |
targetPort: 80 | |
--- | |
apiVersion: networking.k8s.io/v1 | |
kind: Ingress | |
metadata: | |
name: aspnetapp | |
annotations: | |
kubernetes.io/ingress.class: azure/application-gateway | |
spec: | |
rules: | |
- http: | |
paths: | |
- path: / | |
backend: | |
service: | |
name: aspnetapp | |
port: | |
number: 80 | |
pathType: Exact |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment