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
+57-56Lines changed: 57 additions & 56 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
@@ -28,9 +28,9 @@ See the following figure:
28
28
29
29
## Prerequisites
30
30
31
-
1. If following the BYO deployment strategy, ensure you have set up your Application Gateway for Containers resources and [ALB Controller](quickstart-deploy-application-gateway-for-containers-alb-controller.md)
32
-
2. If following the ALB managed deployment strategy, ensure you have provisioned your [ALB Controller](quickstart-deploy-application-gateway-for-containers-alb-controller.md) and provisioned the Application Gateway for Containers resources via the [ApplicationLoadBalancer custom resource](quickstart-create-application-gateway-for-containers-managed-by-alb-controller.md).
33
-
3. Deploy sample HTTP application
31
+
1. If following 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).
32
+
2. If following the ALB managed deployment strategy, ensure you provision your [ALB Controller](quickstart-deploy-application-gateway-for-containers-alb-controller.md) and provision the Application Gateway for Containers resources via the [ApplicationLoadBalancer custom resource](quickstart-create-application-gateway-for-containers-managed-by-alb-controller.md).
33
+
3. Deploy sample HTTP application:
34
34
35
35
Apply the following deployment.yaml file on your cluster to create a sample web application and deploy sample secrets to demonstrate backend mutual authentication (mTLS).
36
36
@@ -40,21 +40,21 @@ See the following figure:
40
40
41
41
This command creates the following on your cluster:
42
42
43
-
-a namespace called `test-infra`
44
-
-one service called `mtls-app` in the `test-infra` namespace
45
-
-one deployment called `mtls-app` in the `test-infra` namespace
46
-
-one config map called `mtls-app-nginx-cm` in the `test-infra` namespace
47
-
-four secrets called `backend.com`, `frontend.com`, `gateway-client-cert`, and `ca.bundle` in the `test-infra` namespace
43
+
-A namespace called `test-infra`
44
+
-One service called `mtls-app` in the `test-infra` namespace
45
+
-One deployment called `mtls-app` in the `test-infra` namespace
46
+
-One config map called `mtls-app-nginx-cm` in the `test-infra` namespace
47
+
-Four secrets called `backend.com`, `frontend.com`, `gateway-client-cert`, and `ca.bundle` in the `test-infra` namespace
48
48
49
49
## Deploy the required Gateway API resources
50
50
51
51
# [ALB managed deployment](#tab/alb-managed)
52
52
53
-
Create a gateway:
53
+
Create a gateway
54
54
55
55
```bash
56
56
kubectl apply -f - <<EOF
57
-
apiVersion: gateway.networking.k8s.io/v1beta1
57
+
apiVersion: gateway.networking.k8s.io/v1
58
58
kind: Gateway
59
59
metadata:
60
60
name: gateway-01
@@ -86,55 +86,56 @@ 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)
Once the gateway resource has been created, ensure the status is valid, the listener is _Programmed_, and an address is assigned to the gateway.
132
+
Once the gateway resource is created, ensure the status is valid, the listener is _Programmed_, and an address is assigned to the gateway.
132
133
133
134
```bash
134
135
kubectl get gateway gateway-01 -n test-infra -o yaml
135
136
```
136
137
137
-
Example output of successful gateway creation.
138
+
Example output of successful gateway creation:
138
139
139
140
```yaml
140
141
status:
@@ -181,11 +182,11 @@ status:
181
182
kind: HTTPRoute
182
183
```
183
184
184
-
Once the gateway has been created, create an HTTPRoute resource.
185
+
Once the gateway is created, create an HTTPRoute resource.
185
186
186
187
```bash
187
188
kubectl apply -f - <<EOF
188
-
apiVersion: gateway.networking.k8s.io/v1beta1
189
+
apiVersion: gateway.networking.k8s.io/v1
189
190
kind: HTTPRoute
190
191
metadata:
191
192
name: https-route
@@ -200,13 +201,13 @@ spec:
200
201
EOF
201
202
```
202
203
203
-
Once the HTTPRoute resource has been created, ensure the route has been _Accepted_ and the Application Gateway for Containers resource has been_Programmed_.
204
+
Once the HTTPRoute resource is created, ensure the route is _Accepted_ and the Application Gateway for Containers resource is _Programmed_.
204
205
205
206
```bash
206
207
kubectl get httproute https-route -n test-infra -o yaml
207
208
```
208
209
209
-
Verify the status of the Application Gateway for Containers resource has been successfully updated.
210
+
Verify the status of the Application Gateway for Containers resource is successfully updated.
210
211
211
212
```yaml
212
213
status:
@@ -270,13 +271,13 @@ spec:
270
271
EOF
271
272
```
272
273
273
-
Once the BackendTLSPolicy object has been created check the status on the object to ensure that the policy is valid.
274
+
Once the BackendTLSPolicy object is created, check the status on the object to ensure that the policy is valid:
274
275
275
276
```bash
276
277
kubectl get backendtlspolicy -n test-infra mtls-app-tls-policy -o yaml
277
278
```
278
279
279
-
Example output of valid BackendTLSPolicy object creation.
280
+
Example output of valid BackendTLSPolicy object creation:
280
281
281
282
```yaml
282
283
status:
@@ -291,7 +292,7 @@ status:
291
292
292
293
## Test access to the application
293
294
294
-
Now we're ready to send some traffic to our sample application, via the FQDN assigned to the frontend. Use the following command to get the FQDN.
295
+
Now we're ready to send some traffic to our sample application, via the FQDN assigned to the frontend. Use the following command to get the FQDN:
295
296
296
297
```bash
297
298
fqdn=$(kubectl get gateway gateway-01 -n test-infra -o jsonpath='{.status.addresses[0].value}')
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`
0 commit comments