@@ -139,58 +139,58 @@ Both of these issues can be resolved by configuring Istio to perform TLS origina
139139
1401401 . Add a policy to perform TLS origination:
141141
142- {{< tabset category-name="tls-origination" >}}
142+ {{< tabset category-name="tls-origination" >}}
143143
144- {{< tab name="Istio API" category-value="istio-api" >}}
144+ {{< tab name="Istio API" category-value="istio-api" >}}
145145
146- {{< text syntax=bash snip_id=apply_origination_destinationrule >}}
147- $ kubectl apply -f - <<EOF
148- apiVersion: networking.istio.io/v1
149- kind: DestinationRule
150- metadata:
151- name: edition-cnn-com
152- spec:
153- host: edition.cnn.com
154- trafficPolicy:
155- portLevelSettings:
156- - port:
157- number: 80
158- tls:
159- mode: SIMPLE # initiates HTTPS when accessing edition.cnn.com
160- EOF
161- {{< /text >}}
146+ {{< text syntax=bash snip_id=apply_origination_destinationrule >}}
147+ $ kubectl apply -f - <<EOF
148+ apiVersion: networking.istio.io/v1
149+ kind: DestinationRule
150+ metadata:
151+ name: edition-cnn-com
152+ spec:
153+ host: edition.cnn.com
154+ trafficPolicy:
155+ portLevelSettings:
156+ - port:
157+ number: 80
158+ tls:
159+ mode: SIMPLE # initiates HTTPS when accessing edition.cnn.com
160+ EOF
161+ {{< /text >}}
162162
163- The above ` DestinationRule ` will perform TLS origination for HTTP requests on port 80 and the ` ServiceEntry `
164- will then redirect the requests on port 80 to target port 443.
163+ The above ` DestinationRule ` will perform TLS origination for HTTP requests on port 80 and the ` ServiceEntry `
164+ will then redirect the requests on port 80 to target port 443.
165165
166- {{< /tab >}}
166+ {{< /tab >}}
167167
168- {{< tab name="Gateway API" category-value="gateway-api" >}}
168+ {{< tab name="Gateway API" category-value="gateway-api" >}}
169169
170- {{< text syntax=bash snip_id=apply_origination_backendtlspolicy >}}
171- $ kubectl apply -f - <<EOF
172- apiVersion: gateway.networking.k8s.io/v1
173- kind: BackendTLSPolicy
174- metadata:
175- name: edition-cnn-com
176- spec:
177- targetRefs:
178- - group: networking.istio.io
179- kind: ServiceEntry
180- name: edition-cnn-com
181- sectionName: http-port
182- validation:
183- hostname: edition.cnn.com
184- wellKnownCACertificates: System
185- EOF
186- {{< /text >}}
170+ {{< text syntax=bash snip_id=apply_origination_backendtlspolicy >}}
171+ $ kubectl apply -f - <<EOF
172+ apiVersion: gateway.networking.k8s.io/v1
173+ kind: BackendTLSPolicy
174+ metadata:
175+ name: edition-cnn-com
176+ spec:
177+ targetRefs:
178+ - group: networking.istio.io
179+ kind: ServiceEntry
180+ name: edition-cnn-com
181+ sectionName: http-port
182+ validation:
183+ hostname: edition.cnn.com
184+ wellKnownCACertificates: System
185+ EOF
186+ {{< /text >}}
187187
188- The above ` BackendTLSPolicy ` will perform TLS origination for HTTP requests on the ` http ` port and the ` ServiceEntry `
189- will then redirect the requests on port 80 to target port 443.
188+ The above ` BackendTLSPolicy ` will perform TLS origination for HTTP requests on the ` http ` port and the ` ServiceEntry `
189+ will then redirect the requests on port 80 to target port 443.
190190
191- {{< /tab >}}
191+ {{< /tab >}}
192192
193- {{< /tabset >}}
193+ {{< /tabset >}}
194194
1951951 . Send an HTTP request to ` http://edition.cnn.com/politics ` , as in the previous section:
196196
0 commit comments