Skip to content

Commit 0b0e14d

Browse files
committed
ALBO: fix mistakes in ALB group examples
1 parent f7c0bdc commit 0b0e14d

File tree

2 files changed

+61
-30
lines changed

2 files changed

+61
-30
lines changed

modules/adding-tls-termination.adoc

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -21,13 +21,12 @@ You can route the traffic for the domain to pods of a service and add TLS termin
2121
apiVersion: networking.olm.openshift.io/v1
2222
kind: AWSLoadBalancerController
2323
metadata:
24-
name: cluster <1>
24+
name: cluster
2525
spec:
26-
subnetTagging: auto
27-
ingressClass: tls-termination <2>
26+
subnetTagging: Auto
27+
ingressClass: tls-termination <1>
2828
----
29-
<1> Defines the `aws-load-balancer-controller` instance.
30-
<2> Defines the name of an `ingressClass` resource reconciled by the AWS Load Balancer Controller. This `ingressClass` resource gets created if it is not present. You can add additional `ingressClass` values. The controller reconciles the `ingressClass` values if the `spec.controller` is set to `ingress.k8s.aws/alb`.
29+
<1> Defines the name of an `ingressClass` resource reconciled by the AWS Load Balancer Controller. This `ingressClass` resource gets created if it is not present. You can add additional `ingressClass` values. The controller reconciles the `ingressClass` values if the `spec.controller` is set to `ingress.k8s.aws/alb`.
3130

3231
. Create an `Ingress` resource:
3332
+

modules/creating-multiple-ingress-through-single-alb.adoc

Lines changed: 57 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ You can route the traffic to multiple Ingresses through a single AWS Load Balanc
2121
apiVersion: elbv2.k8s.aws/v1beta1 <1>
2222
kind: IngressClassParams
2323
metadata:
24-
name: <single-lb-params> <2>
24+
name: single-lb-params <2>
2525
spec:
2626
group:
2727
name: single-lb <3>
@@ -37,24 +37,24 @@ spec:
3737
$ oc create -f sample-single-lb-params.yaml
3838
----
3939

40-
. Create an `IngressClass` resource YAML file, for example, `sample-single-lb.yaml`, as follows:
40+
. Create an `IngressClass` resource YAML file, for example, `sample-single-lb-class.yaml`, as follows:
4141
+
4242
[source,yaml]
4343
----
4444
apiVersion: networking.k8s.io/v1 <1>
4545
kind: IngressClass
4646
metadata:
47-
name: <single-lb> <2>
47+
name: single-lb <2>
4848
spec:
4949
controller: ingress.k8s.aws/alb <3>
5050
parameters:
5151
apiGroup: elbv2.k8s.aws <4>
5252
kind: IngressClassParams <5>
53-
name: single-lb <6>
53+
name: single-lb-params <6>
5454
----
55-
<1> Defines the API group and the version of the `IngressClass` resource.
55+
<1> Defines the API group and version of the `IngressClass` resource.
5656
<2> Specifies the name of the `IngressClass`.
57-
<3> Defines the controller name, common for all `IngressClasses`. The `aws-load-balancer-controller` reconciles the controller.
57+
<3> Defines the controller name. `ingress.k8s.aws/alb` denotes that all Ingresses of this class should be managed by the `aws-load-balancer-controller`.
5858
<4> Defines the API group of the `IngressClassParams` resource.
5959
<5> Defines the resource type of the `IngressClassParams` resource.
6060
<6> Defines the name of the `IngressClassParams` resource.
@@ -63,77 +63,109 @@ spec:
6363
+
6464
[source,terminal]
6565
----
66+
$ oc create -f sample-single-lb-class.yaml
67+
----
68+
69+
. Create an `AWSLoadBalancerController` resource YAML file, for example, `sample-single-lb.yaml`, as follows:
70+
+
71+
[source,yaml]
72+
----
73+
apiVersion: networking.olm.openshift.io/v1
74+
kind: AWSLoadBalancerController
75+
metadata:
76+
name: cluster
77+
spec:
78+
subnetTagging: Auto
79+
ingressClass: single-lb <1>
80+
----
81+
<1> Defines the name of the `IngressClass` resource.
82+
83+
. Create an `AWSLoadBalancerController` resource by running the following command:
84+
+
85+
[source,terminal]
86+
----
6687
$ oc create -f sample-single-lb.yaml
6788
----
6889

6990
. Create an `Ingress` resource YAML file, for example, `sample-multiple-ingress.yaml`, as follows:
7091
+
7192
[source,yaml]
7293
----
73-
apiVersion: networking.k8s.io/v1 <1>
94+
apiVersion: networking.k8s.io/v1
7495
kind: Ingress
7596
metadata:
76-
name: <example-1> <1>
97+
name: example-1 <1>
7798
annotations:
7899
alb.ingress.kubernetes.io/scheme: internet-facing <2>
79100
alb.ingress.kubernetes.io/group.order: "1" <3>
101+
alb.ingress.kubernetes.io/target-type: instance <4>
80102
spec:
81-
ingressClass: alb <4>
103+
ingressClassName: single-lb <5>
82104
rules:
83-
- host: example.com <5>
105+
- host: example.com <6>
84106
http:
85107
paths:
86-
- path: /blog <6>
108+
- path: /blog <7>
109+
pathType: Prefix
87110
backend:
88111
service:
89-
name: <example-1> <7>
112+
name: example-1 <8>
90113
port:
91-
number: 80 <8>
114+
number: 80 <9>
115+
---
116+
apiVersion: networking.k8s.io/v1
92117
kind: Ingress
93118
metadata:
94-
name: <example-2>
119+
name: example-2
95120
annotations:
96121
alb.ingress.kubernetes.io/scheme: internet-facing
97122
alb.ingress.kubernetes.io/group.order: "2"
123+
alb.ingress.kubernetes.io/target-type: instance
98124
spec:
99-
ingressClass: alb
125+
ingressClassName: single-lb
100126
rules:
101127
- host: example.com
102128
http:
103129
paths:
104130
- path: /store
131+
pathType: Prefix
105132
backend:
106133
service:
107-
name: <example-2>
134+
name: example-2
108135
port:
109136
number: 80
137+
---
138+
apiVersion: networking.k8s.io/v1
110139
kind: Ingress
111-
metadata:
112-
name: <example-3>
140+
metadata:
141+
name: example-3
113142
annotations:
114143
alb.ingress.kubernetes.io/scheme: internet-facing
115144
alb.ingress.kubernetes.io/group.order: "3"
145+
alb.ingress.kubernetes.io/target-type: instance
116146
spec:
117-
ingressClass: alb
147+
ingressClassName: single-lb
118148
rules:
119149
- host: example.com
120150
http:
121151
paths:
122152
- path: /
153+
pathType: Prefix
123154
backend:
124155
service:
125-
name: <example-3>
156+
name: example-3
126157
port:
127158
number: 80
128159
----
129160
<1> Specifies the name of an ingress.
130161
<2> Indicates the load balancer to provision in the public subnet and makes it accessible over the internet.
131162
<3> Specifies the order in which the rules from the Ingresses are matched when the request is received at the load balancer.
132-
<4> Specifies the Ingress Class that belongs to this ingress.
133-
<5> Defines the name of a domain used for request routing.
134-
<6> Defines the path that must route to the service.
135-
<7> Defines the name of the service that serves the endpoint configured in the ingress.
136-
<8> Defines the port on the service that serves the endpoint.
163+
<4> Indicates the load balancer will target OpenShift nodes to reach the service.
164+
<5> Specifies the Ingress Class that belongs to this ingress.
165+
<6> Defines the name of a domain used for request routing.
166+
<7> Defines the path that must route to the service.
167+
<8> Defines the name of the service that serves the endpoint configured in the ingress.
168+
<9> Defines the port on the service that serves the endpoint.
137169

138170
. Create the `Ingress` resources by running the following command:
139171
+

0 commit comments

Comments
 (0)