You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: articles/application-gateway/for-containers/how-to-backend-mtls-gateway-api.md
+38-37Lines changed: 38 additions & 37 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -15,7 +15,7 @@ ms.author: greglin
15
15
This document helps set up an example application that uses the following resources from Gateway API. Steps are provided to:
16
16
17
17
- Create a [Gateway](https://gateway-api.sigs.k8s.io/concepts/api-overview/#gateway) resource with one HTTPS listener.
18
-
- Create an [HTTPRoute](https://gateway-api.sigs.k8s.io/v1alpha2/api-types/httproute/) resource that references a backend service.
18
+
- Create an [HTTPRoute](https://gateway-api.sigs.k8s.io/api-types/httproute/) resource that references a backend service.
19
19
- Create a [BackendTLSPolicy](api-specification-kubernetes.md#alb.networking.azure.io/v1.BackendTLSPolicy) resource that has a client and CA certificate for the backend service referenced in the HTTPRoute.
20
20
21
21
## Background
@@ -86,45 +86,46 @@ EOF
86
86
87
87
1. Set the following environment variables
88
88
89
-
```bash
90
-
RESOURCE_GROUP='<resource group name of the Application Gateway For Containers resource>'
91
-
RESOURCE_NAME='alb-test'
89
+
```bash
90
+
RESOURCE_GROUP='<resource group name of the Application Gateway For Containers resource>'
91
+
RESOURCE_NAME='alb-test'
92
92
93
-
RESOURCE_ID=$(az network alb show --resource-group $RESOURCE_GROUP --name $RESOURCE_NAME --query id -o tsv)
Copy file name to clipboardExpand all lines: articles/application-gateway/for-containers/how-to-header-rewrite-gateway-api.md
+4-4Lines changed: 4 additions & 4 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -16,7 +16,7 @@ Application Gateway for Containers allows you to rewrite HTTP headers of client
16
16
17
17
## Usage details
18
18
19
-
Header rewrites take advantage of [filters](https://gateway-api.sigs.k8s.io/references/spec/#gateway.networking.k8s.io/v1beta1.HTTPURLRewriteFilter) as defined by Kubernetes Gateway API.
19
+
Header rewrites take advantage of [filters](https://gateway-api.sigs.k8s.io/references/spec/#gateway.networking.k8s.io/v1.HTTPURLRewriteFilter) as defined by Kubernetes Gateway API.
20
20
21
21
## Background
22
22
@@ -51,7 +51,7 @@ Create a gateway:
51
51
52
52
```bash
53
53
kubectl apply -f - <<EOF
54
-
apiVersion: gateway.networking.k8s.io/v1beta1
54
+
apiVersion: gateway.networking.k8s.io/v1
55
55
kind: Gateway
56
56
metadata:
57
57
name: gateway-01
@@ -89,7 +89,7 @@ FRONTEND_NAME='frontend'
89
89
90
90
```bash
91
91
kubectl apply -f - <<EOF
92
-
apiVersion: gateway.networking.k8s.io/v1beta1
92
+
apiVersion: gateway.networking.k8s.io/v1
93
93
kind: Gateway
94
94
metadata:
95
95
name: gateway-01
@@ -177,7 +177,7 @@ This example also demonstrates addition of a new header called `AGC-Header-Add`
Copy file name to clipboardExpand all lines: articles/application-gateway/for-containers/how-to-multiple-site-hosting-gateway-api.md
+49-41Lines changed: 49 additions & 41 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -13,6 +13,7 @@ ms.author: greglin
13
13
# Multiple site hosting with Application Gateway for Containers - Gateway API
14
14
15
15
This document helps you set up an example application that uses the resources from Gateway API to demonstrate hosting multiple sites on the same Kubernetes Gateway resource / Application Gateway for Containers frontend. Steps are provided to:
16
+
16
17
- Create a [Gateway](https://gateway-api.sigs.k8s.io/concepts/api-overview/#gateway) resource with one HTTP listener.
17
18
- Create two [HTTPRoute](https://gateway-api.sigs.k8s.io/v1alpha2/api-types/httproute/) resources that each reference a unique backend service.
18
19
@@ -27,24 +28,27 @@ Application Gateway for Containers enables multi-site hosting by allowing you to
27
28
1. If you follow the BYO deployment strategy, ensure you set up your Application Gateway for Containers resources and [ALB Controller](quickstart-deploy-application-gateway-for-containers-alb-controller.md)
28
29
2. If you follow the ALB managed deployment strategy, ensure provisioning of your [ALB Controller](quickstart-deploy-application-gateway-for-containers-alb-controller.md) and the Application Gateway for Containers resources via the [ApplicationLoadBalancer custom resource](quickstart-create-application-gateway-for-containers-managed-by-alb-controller.md).
29
30
3. Deploy sample HTTP application
30
-
Apply the following deployment.yaml file on your cluster to create a sample web application to demonstrate path, query, and header based routing.
This command creates the following on your cluster:
38
+
39
+
- a namespace called `test-infra`
40
+
- two services called `backend-v1` and `backend-v2` in the `test-infra` namespace
41
+
- two deployments called `backend-v1` and `backend-v2` in the `test-infra` namespace
39
42
40
43
## Deploy the required Gateway API resources
41
44
42
45
# [ALB managed deployment](#tab/alb-managed)
43
46
44
47
1. Create a Gateway
48
+
45
49
```bash
46
50
kubectl apply -f - <<EOF
47
-
apiVersion: gateway.networking.k8s.io/v1beta1
51
+
apiVersion: gateway.networking.k8s.io/v1
48
52
kind: Gateway
49
53
metadata:
50
54
name: gateway-01
@@ -70,47 +74,50 @@ EOF
70
74
71
75
1. Set the following environment variables
72
76
73
-
```bash
74
-
RESOURCE_GROUP='<resource group name of the Application Gateway For Containers resource>'
75
-
RESOURCE_NAME='alb-test'
77
+
```bash
78
+
RESOURCE_GROUP='<resource group name of the Application Gateway For Containers resource>'
79
+
RESOURCE_NAME='alb-test'
76
80
77
-
RESOURCE_ID=$(az network alb show --resource-group $RESOURCE_GROUP --name $RESOURCE_NAME --query id -o tsv)
78
-
FRONTEND_NAME='frontend'
79
-
```
81
+
RESOURCE_ID=$(az network alb show --resource-group $RESOURCE_GROUP --name $RESOURCE_NAME --query id -o tsv)
82
+
FRONTEND_NAME='frontend'
83
+
```
80
84
81
85
2. Create a Gateway
82
-
```bash
83
-
kubectl apply -f - <<EOF
84
-
apiVersion: gateway.networking.k8s.io/v1beta1
85
-
kind: Gateway
86
-
metadata:
87
-
name: gateway-01
88
-
namespace: test-infra
89
-
annotations:
90
-
alb.networking.azure.io/alb-id: $RESOURCE_ID
91
-
spec:
92
-
gatewayClassName: azure-alb-external
93
-
listeners:
94
-
- name: http-listener
95
-
port: 80
96
-
protocol: HTTP
97
-
allowedRoutes:
98
-
namespaces:
99
-
from: Same
100
-
addresses:
101
-
- type: alb.networking.azure.io/alb-frontend
102
-
value: $FRONTEND_NAME
103
-
EOF
104
-
```
86
+
87
+
```bash
88
+
kubectl apply -f - <<EOF
89
+
apiVersion: gateway.networking.k8s.io/v1
90
+
kind: Gateway
91
+
metadata:
92
+
name: gateway-01
93
+
namespace: test-infra
94
+
annotations:
95
+
alb.networking.azure.io/alb-id: $RESOURCE_ID
96
+
spec:
97
+
gatewayClassName: azure-alb-external
98
+
listeners:
99
+
- name: http-listener
100
+
port: 80
101
+
protocol: HTTP
102
+
allowedRoutes:
103
+
namespaces:
104
+
from: Same
105
+
addresses:
106
+
- type: alb.networking.azure.io/alb-frontend
107
+
value: $FRONTEND_NAME
108
+
EOF
109
+
```
105
110
106
111
---
107
112
108
113
Once the gateway resource is created, ensure the status is valid, the listener is _Programmed_, and an address is assigned to the gateway.
114
+
109
115
```bash
110
116
kubectl get gateway gateway-01 -n test-infra -o yaml
111
117
```
112
118
113
119
Example output of successful gateway creation.
120
+
114
121
```yaml
115
122
status:
116
123
addresses:
@@ -157,9 +164,10 @@ status:
157
164
```
158
165
159
166
Once the gateway is created, create two HTTPRoute resources for`contoso.com` and `fabrikam.com` domain names. Each domain forwards traffic to a different backend service.
Copy file name to clipboardExpand all lines: articles/application-gateway/for-containers/how-to-multiple-site-hosting-ingress-api.md
+17-9Lines changed: 17 additions & 9 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -13,6 +13,7 @@ ms.author: greglin
13
13
# Multi-site hosting with Application Gateway for Containers - Ingress API
14
14
15
15
This document helps you set up an example application that uses the Ingress API to demonstrate hosting multiple sites on the same Kubernetes Ingress resource / Application Gateway for Containers frontend. Steps are provided to:
16
+
16
17
- Create an [Ingress](https://kubernetes.io/docs/reference/generated/kubernetes-api/v1.27/#ingressrule-v1-networking-k8s-io) resource with two hosts.
17
18
18
19
## Background
@@ -26,21 +27,24 @@ Application Gateway for Containers enables multi-site hosting by allowing you to
26
27
1. If you follow the BYO deployment strategy, ensure that you set up your Application Gateway for Containers resources and [ALB Controller](quickstart-deploy-application-gateway-for-containers-alb-controller.md)
27
28
2. If you follow the ALB managed deployment strategy, ensure provisioning of your [ALB Controller](quickstart-deploy-application-gateway-for-containers-alb-controller.md) and the Application Gateway for Containers resources via the [ApplicationLoadBalancer custom resource](quickstart-create-application-gateway-for-containers-managed-by-alb-controller.md).
28
29
3. Deploy sample HTTP application
29
-
Apply the following deployment.yaml file on your cluster to create a sample web application to demonstrate path, query, and header based routing.
0 commit comments