Skip to content

Commit e224804

Browse files
Merge pull request #267482 from JackStromberg/patch-156
Markdown changes + v1 API
2 parents 9b9b551 + e7a7483 commit e224804

10 files changed

+255
-235
lines changed

articles/application-gateway/for-containers/how-to-backend-mtls-gateway-api.md

Lines changed: 57 additions & 56 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ ms.author: greglin
1515
This document helps set up an example application that uses the following resources from Gateway API. Steps are provided to:
1616

1717
- 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.
1919
- 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.
2020

2121
## Background
@@ -28,9 +28,9 @@ See the following figure:
2828

2929
## Prerequisites
3030

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:
3434

3535
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).
3636

@@ -40,21 +40,21 @@ See the following figure:
4040

4141
This command creates the following on your cluster:
4242

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
4848

4949
## Deploy the required Gateway API resources
5050

5151
# [ALB managed deployment](#tab/alb-managed)
5252

53-
Create a gateway:
53+
Create a gateway
5454

5555
```bash
5656
kubectl apply -f - <<EOF
57-
apiVersion: gateway.networking.k8s.io/v1beta1
57+
apiVersion: gateway.networking.k8s.io/v1
5858
kind: Gateway
5959
metadata:
6060
name: gateway-01
@@ -86,55 +86,56 @@ EOF
8686

8787
1. Set the following environment variables
8888

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'
9292

93-
RESOURCE_ID=$(az network alb show --resource-group $RESOURCE_GROUP --name $RESOURCE_NAME --query id -o tsv)
94-
FRONTEND_NAME='frontend'
95-
az network alb frontend create -g $RESOURCE_GROUP -n $FRONTEND_NAME --alb-name $AGFC_NAME
96-
```
93+
RESOURCE_ID=$(az network alb show --resource-group $RESOURCE_GROUP --name $RESOURCE_NAME --query id -o tsv)
94+
FRONTEND_NAME='frontend'
95+
az network alb frontend create -g $RESOURCE_GROUP -n $FRONTEND_NAME --alb-name $AGFC_NAME
96+
```
9797

9898
2. Create a Gateway
99-
```bash
100-
kubectl apply -f - <<EOF
101-
apiVersion: gateway.networking.k8s.io/v1beta1
102-
kind: Gateway
103-
metadata:
104-
name: gateway-01
105-
namespace: test-infra
106-
annotations:
107-
alb.networking.azure.io/alb-id: $RESOURCE_ID
108-
spec:
109-
gatewayClassName: azure-alb-external
110-
listeners:
111-
- name: https-listener
112-
port: 443
113-
protocol: HTTPS
114-
allowedRoutes:
115-
namespaces:
116-
from: Same
117-
tls:
118-
mode: Terminate
119-
certificateRefs:
120-
- kind : Secret
121-
group: ""
122-
name: frontend.com
123-
addresses:
124-
- type: alb.networking.azure.io/alb-frontend
125-
value: $FRONTEND_NAME
126-
EOF
127-
```
99+
100+
```bash
101+
kubectl apply -f - <<EOF
102+
apiVersion: gateway.networking.k8s.io/v1
103+
kind: Gateway
104+
metadata:
105+
name: gateway-01
106+
namespace: test-infra
107+
annotations:
108+
alb.networking.azure.io/alb-id: $RESOURCE_ID
109+
spec:
110+
gatewayClassName: azure-alb-external
111+
listeners:
112+
- name: https-listener
113+
port: 443
114+
protocol: HTTPS
115+
allowedRoutes:
116+
namespaces:
117+
from: Same
118+
tls:
119+
mode: Terminate
120+
certificateRefs:
121+
- kind : Secret
122+
group: ""
123+
name: frontend.com
124+
addresses:
125+
- type: alb.networking.azure.io/alb-frontend
126+
value: $FRONTEND_NAME
127+
EOF
128+
```
128129
129130
---
130131
131-
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.
132133
133134
```bash
134135
kubectl get gateway gateway-01 -n test-infra -o yaml
135136
```
136137
137-
Example output of successful gateway creation.
138+
Example output of successful gateway creation:
138139
139140
```yaml
140141
status:
@@ -181,11 +182,11 @@ status:
181182
kind: HTTPRoute
182183
```
183184
184-
Once the gateway has been created, create an HTTPRoute resource.
185+
Once the gateway is created, create an HTTPRoute resource.
185186
186187
```bash
187188
kubectl apply -f - <<EOF
188-
apiVersion: gateway.networking.k8s.io/v1beta1
189+
apiVersion: gateway.networking.k8s.io/v1
189190
kind: HTTPRoute
190191
metadata:
191192
name: https-route
@@ -200,13 +201,13 @@ spec:
200201
EOF
201202
```
202203

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_.
204205

205206
```bash
206207
kubectl get httproute https-route -n test-infra -o yaml
207208
```
208209

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.
210211

211212
```yaml
212213
status:
@@ -270,13 +271,13 @@ spec:
270271
EOF
271272
```
272273

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:
274275

275276
```bash
276277
kubectl get backendtlspolicy -n test-infra mtls-app-tls-policy -o yaml
277278
```
278279

279-
Example output of valid BackendTLSPolicy object creation.
280+
Example output of valid BackendTLSPolicy object creation:
280281

281282
```yaml
282283
status:
@@ -291,7 +292,7 @@ status:
291292

292293
## Test access to the application
293294

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:
295296
296297
```bash
297298
fqdn=$(kubectl get gateway gateway-01 -n test-infra -o jsonpath='{.status.addresses[0].value}')

articles/application-gateway/for-containers/how-to-header-rewrite-gateway-api.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ Application Gateway for Containers allows you to rewrite HTTP headers of client
1616

1717
## Usage details
1818

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.
2020

2121
## Background
2222

@@ -51,7 +51,7 @@ Create a gateway:
5151

5252
```bash
5353
kubectl apply -f - <<EOF
54-
apiVersion: gateway.networking.k8s.io/v1beta1
54+
apiVersion: gateway.networking.k8s.io/v1
5555
kind: Gateway
5656
metadata:
5757
name: gateway-01
@@ -89,7 +89,7 @@ FRONTEND_NAME='frontend'
8989

9090
```bash
9191
kubectl apply -f - <<EOF
92-
apiVersion: gateway.networking.k8s.io/v1beta1
92+
apiVersion: gateway.networking.k8s.io/v1
9393
kind: Gateway
9494
metadata:
9595
name: gateway-01
@@ -177,7 +177,7 @@ This example also demonstrates addition of a new header called `AGC-Header-Add`
177177

178178
```bash
179179
kubectl apply -f - <<EOF
180-
apiVersion: gateway.networking.k8s.io/v1beta1
180+
apiVersion: gateway.networking.k8s.io/v1
181181
kind: HTTPRoute
182182
metadata:
183183
name: header-rewrite-route

0 commit comments

Comments
 (0)