Skip to content

Commit 98f724b

Browse files
Merge pull request #7760 from ovh/ava-fix-knative
Upgrade knative doc for MKS
2 parents aca0a1f + 170b0a4 commit 98f724b

File tree

16 files changed

+1083
-798
lines changed

16 files changed

+1083
-798
lines changed

pages/public_cloud/containers_orchestration/managed_kubernetes/installing-knative/guide.de-de.md

Lines changed: 72 additions & 53 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
---
22
title: Run Serverless containers on OVHcloud Managed Kubernetes with Knative
33
excerpt: Find out how to install Knative on OVHcloud Managed Kubernetes and deploy your first serverless containers
4-
updated: 2023-01-02
4+
updated: 2025-04-15
55
---
66

77
## Objective
@@ -60,15 +60,15 @@ Here is an example of the result:
6060

6161
```console
6262
$ kn version
63-
Version: v0.26.0
64-
Build Date: 2021-09-22T09:11:17Z
65-
Git Revision: 61b8a754
63+
Version: v1.17.0
64+
Build Date: 2025-01-22 16:25:15
65+
Git Revision: f7347245
6666
Supported APIs:
6767
* Serving
68-
- serving.knative.dev/v1 (knative-serving v0.26.0)
68+
- serving.knative.dev/v1 (knative-serving v1.17.0)
6969
* Eventing
70-
- sources.knative.dev/v1 (knative-eventing v0.26.0)
71-
- eventing.knative.dev/v1 (knative-eventing v0.26.0)
70+
- sources.knative.dev/v1 (knative-eventing v1.17.0)
71+
- eventing.knative.dev/v1 (knative-eventing v1.17.0)
7272
```
7373

7474
### Installing Knative
@@ -79,7 +79,7 @@ The first thing to do is to install the Knative Serving component:
7979

8080
- Install the required custom resources by running the command:
8181

82-
```
82+
```console
8383
kubectl apply -f https://github.com/knative/serving/releases/latest/download/serving-crds.yaml
8484
```
8585

@@ -103,7 +103,7 @@ customresourcedefinition.apiextensions.k8s.io/images.caching.internal.knative.de
103103

104104
- Install the core components of Knative Serving by running the command:
105105

106-
```
106+
```console
107107
kubectl apply -f https://github.com/knative/serving/releases/latest/download/serving-core.yaml
108108
```
109109

@@ -112,6 +112,8 @@ Here is an example of the result:
112112
```console
113113
$ kubectl apply -f https://github.com/knative/serving/releases/latest/download/serving-core.yaml
114114
namespace/knative-serving created
115+
role.rbac.authorization.k8s.io/knative-serving-activator created
116+
clusterrole.rbac.authorization.k8s.io/knative-serving-activator-cluster created
115117
clusterrole.rbac.authorization.k8s.io/knative-serving-aggregated-addressable-resolver created
116118
clusterrole.rbac.authorization.k8s.io/knative-serving-addressable-resolver created
117119
clusterrole.rbac.authorization.k8s.io/knative-serving-namespaced-admin created
@@ -123,7 +125,11 @@ serviceaccount/controller created
123125
clusterrole.rbac.authorization.k8s.io/knative-serving-admin created
124126
clusterrolebinding.rbac.authorization.k8s.io/knative-serving-controller-admin created
125127
clusterrolebinding.rbac.authorization.k8s.io/knative-serving-controller-addressable-resolver created
128+
serviceaccount/activator created
129+
rolebinding.rbac.authorization.k8s.io/knative-serving-activator created
130+
clusterrolebinding.rbac.authorization.k8s.io/knative-serving-activator-cluster created
126131
customresourcedefinition.apiextensions.k8s.io/images.caching.internal.knative.dev unchanged
132+
certificate.networking.internal.knative.dev/routing-serving-certs created
127133
customresourcedefinition.apiextensions.k8s.io/certificates.networking.internal.knative.dev unchanged
128134
customresourcedefinition.apiextensions.k8s.io/configurations.serving.knative.dev unchanged
129135
customresourcedefinition.apiextensions.k8s.io/clusterdomainclaims.networking.internal.knative.dev unchanged
@@ -135,10 +141,9 @@ customresourcedefinition.apiextensions.k8s.io/revisions.serving.knative.dev unch
135141
customresourcedefinition.apiextensions.k8s.io/routes.serving.knative.dev unchanged
136142
customresourcedefinition.apiextensions.k8s.io/serverlessservices.networking.internal.knative.dev unchanged
137143
customresourcedefinition.apiextensions.k8s.io/services.serving.knative.dev unchanged
138-
secret/serving-certs-ctrl-ca created
139-
secret/knative-serving-certs created
140144
image.caching.internal.knative.dev/queue-proxy created
141145
configmap/config-autoscaler created
146+
configmap/config-certmanager created
142147
configmap/config-defaults created
143148
configmap/config-deployment created
144149
configmap/config-domain created
@@ -157,18 +162,12 @@ deployment.apps/autoscaler created
157162
service/autoscaler created
158163
deployment.apps/controller created
159164
service/controller created
160-
deployment.apps/domain-mapping created
161-
deployment.apps/domainmapping-webhook created
162-
service/domainmapping-webhook created
163165
horizontalpodautoscaler.autoscaling/webhook created
164166
poddisruptionbudget.policy/webhook-pdb created
165167
deployment.apps/webhook created
166168
service/webhook created
167169
validatingwebhookconfiguration.admissionregistration.k8s.io/config.webhook.serving.knative.dev created
168170
mutatingwebhookconfiguration.admissionregistration.k8s.io/webhook.serving.knative.dev created
169-
mutatingwebhookconfiguration.admissionregistration.k8s.io/webhook.domainmapping.serving.knative.dev created
170-
secret/domainmapping-webhook-certs created
171-
validatingwebhookconfiguration.admissionregistration.k8s.io/validation.webhook.domainmapping.serving.knative.dev created
172171
validatingwebhookconfiguration.admissionregistration.k8s.io/validation.webhook.serving.knative.dev created
173172
secret/webhook-certs created
174173
```
@@ -179,13 +178,27 @@ As the networking layer, you can [install the one you want](https://knative.dev/
179178

180179
Install the Knative Kourier controller by running the command:
181180

182-
```
181+
```console
183182
kubectl apply -f https://github.com/knative/net-kourier/releases/latest/download/kourier.yaml
183+
184+
namespace/kourier-system created
185+
configmap/kourier-bootstrap created
186+
configmap/config-kourier created
187+
serviceaccount/net-kourier created
188+
clusterrole.rbac.authorization.k8s.io/net-kourier created
189+
clusterrolebinding.rbac.authorization.k8s.io/net-kourier created
190+
deployment.apps/net-kourier-controller created
191+
service/net-kourier-controller created
192+
deployment.apps/3scale-kourier-gateway created
193+
service/kourier created
194+
service/kourier-internal created
195+
horizontalpodautoscaler.autoscaling/3scale-kourier-gateway created
196+
poddisruptionbudget.policy/3scale-kourier-gateway-pdb created
184197
```
185198

186199
Configure Knative Serving to use Kourier by default by running the command:
187200

188-
```
201+
```console
189202
kubectl patch configmap/config-network \
190203
--namespace knative-serving \
191204
--type merge \
@@ -202,7 +215,7 @@ NAME READY UP-TO-DATE AVAILABLE AGE
202215

203216
Fetch the External IP address or CNAME by running the command:
204217

205-
```
218+
```console
206219
kubectl get service kourier -n kourier-system
207220
```
208221

@@ -211,33 +224,31 @@ Here is an example of the result:
211224
```console
212225
$ kubectl get service kourier -n kourier-system
213226
NAME TYPE CLUSTER-IP EXTERNAL-IP PORT(S) AGE
214-
kourier LoadBalancer 10.3.65.167 135.125.83.166 80:31357/TCP,443:31782/TCP 2m19s
227+
kourier LoadBalancer 10.3.15.239 135.125.83.166 80:31357/TCP,443:31782/TCP 2m19s
215228
```
216229

217-
Warning: As the `LoadBalancer` creation is asynchronous, and the provisioning of the load balancer can take several minutes, you will surely get a `pending` state for the `EXTERNAL-IP` field. Please try again in a few minutes to get the external IP.
230+
Warning: As the `LoadBalancer` creation is asynchronous, and the provisioning of the load balancer can take several minutes, you will surely get a `<pending>` state for the `EXTERNAL-IP` field. Please try again in a few minutes to get the external IP.
218231

219232
Save this to use in the following Configure DNS section.
220233

221234
### Verifying the installation
222235

223236
A new `knative-serving` namespace has been created on your Kubernetes cluster with knative serving components, so let's check if Knative Serving components are correctly running:
224237

225-
```
238+
```console
226239
kubectl get pods -n knative-serving
227240
```
228241

229242
Here is an example of the result:
230243

231244
```console
232245
$ kubectl get pods -n knative-serving
233-
NAME READY STATUS RESTARTS AGE
234-
activator-68b7698d74-hwrj6 1/1 Running 0 33m
235-
autoscaler-6c8884d6ff-6g6pv 1/1 Running 0 33m
236-
controller-76cf997d95-5b4l4 1/1 Running 0 33m
237-
domain-mapping-57fdbf97b-6vdft 1/1 Running 0 33m
238-
domainmapping-webhook-66c5f7d596-l97d9 1/1 Running 0 33m
239-
net-kourier-controller-6f68cbb74f-cgqvx 1/1 Running 0 107s
240-
webhook-7df8fd847b-rm9q2 1/1 Running 0 33m
246+
NAME READY STATUS RESTARTS AGE
247+
activator-7c48c6944d-rk6mz 1/1 Running 0 20m
248+
autoscaler-775c659bc6-vnljf 1/1 Running 0 20m
249+
controller-7cf4fbd94-vl8tc 1/1 Running 0 20m
250+
net-kourier-controller-568fb445b-f8kwl 1/1 Running 0 19m
251+
webhook-57ccdb4884-md5jq 1/1 Running 0 20m
241252
```
242253

243254
And we can check the Knative Serving installed version:
@@ -250,34 +261,35 @@ Here is an example of the result:
250261

251262
```console
252263
$ kubectl get namespace knative-serving -o 'go-template={{index .metadata.labels "app.kubernetes.io/version"}}'
253-
v1.8.3
264+
1.17.0
254265
```
255266

256-
Knative Serving version 1.8.3 is correctly deployed in our cluster, Cool!
267+
Knative Serving version 1.17.0 is correctly deployed in our cluster, Cool!
257268

258269
#### Configuring DNS
259270

260-
By default, Knative Serving uses `example.com` as the default domain.
261-
262271
For this tutorial, though it is not mandatory, you can configure DNS to prevent the need to run `curl` commands with a host header.
263272

264-
To configure DNS for Knative, take the External IP from setting up networking, and configure it with your DNS provider as follows:
273+
To configure DNS for Knative, take the External IP from setting up networking (`135.125.83.166` in this example), and configure it with your DNS provider as follows:
265274

266275
Configure a wildcard A record for the domain:
267276

268-
```
269-
# Here knative.my-website.com is the domain suffix for your cluster
270-
*.knative.my-website.com == A 135.125.83.166
277+
```console
278+
# Here knative.example.com is the domain suffix for your cluster
279+
*.knative.example.com == A 135.125.83.166
271280
```
272281

282+
On OVHcloud you can create a new entry to an existant DNS zone, like this:
283+
![OVHcloud New entry in DNS zone for Knative](images/ovhcloud-entry-dns.png)
284+
273285
Once your DNS provider has been configured, direct Knative to use that domain:
274286

275-
```
276-
# Replace knative.example.com with your domain suffix
287+
```console
288+
# Replace example.com with your domain suffix
277289
kubectl patch configmap/config-domain \
278290
--namespace knative-serving \
279291
--type merge \
280-
--patch '{"data":{"knative.my-website.com":""}}'
292+
--patch '{"data":{"knative.example.com":""}}'
281293
```
282294

283295
For more information about DNS on OVHcloud, please read our guide on [how to configure a DNS zone](/pages/web_cloud/domains/dns_zone_edit).
@@ -361,16 +373,16 @@ And also Knative service, route and revision:
361373

362374
```console
363375
$ kn service list -n knative-apps
364-
NAME URL LATEST AGE CONDITIONS READY REASON
365-
hello-world http://hello-world.knative-apps.example.com hello-world-00001 26m 3 OK / 3 True
376+
NAME URL LATEST AGE CONDITIONS READY REASON
377+
hello-world http://hello-world.knative-apps.knative.example.com hello-world-00001 51s 3 OK / 3 True
366378

367379
$ kn route list -n knative-apps
368-
NAME URL READY
369-
hello-world http://hello-world.knative-apps.example.com True
380+
NAME URL READY
381+
hello-world http://hello-world.knative-apps.knative.example.com True
370382

371383
$ kn revision list -n knative-apps
372384
NAME SERVICE TRAFFIC TAGS GENERATION AGE CONDITIONS READY REASON
373-
hello-world-00001 hello-world 100% 1 26m 3 OK / 4 True
385+
hello-world-00001 hello-world 100% 1 58s 4 OK / 4 True
374386
```
375387

376388
As we can see, by default, 100% of the traffic goes to the `hello-world-00001` revision.
@@ -382,16 +394,23 @@ $ kn service describe hello-world -n knative-apps -o url
382394
http://hello-world.knative-apps.example.com
383395
```
384396

385-
With this information, and with the Load Balancer external IP, we can test to call our app:
397+
With this information, we can test to call our app:
386398

387399
```
388-
$ curl -H "Host: hello-world.knative-apps.example.com" http://135.125.83.166:80
400+
$ curl http://hello-world.knative-apps.knative.example.com
389401
<!doctype html>
390402
391403
<html>
392404
<head>
393405
<title>OVH K8S</title>
394406
</head>
407+
<style>
408+
.title {
409+
font-size: 3em;
410+
padding: 2em;
411+
text-align: center;
412+
}
413+
</style>
395414
<body>
396415
<div class="title">
397416
<p>Hello from Kubernetes!</p>
@@ -426,26 +445,26 @@ If you want, you can uninstall Knative apps, serving and core components.
426445

427446
First, delete our Hello World app:
428447

429-
```
448+
```console
430449
kubectl delete -f service.yaml -n knative-apps
431450
```
432451

433452
Then, delete Knative CRDs:
434453

435-
```
454+
```console
436455
kubectl api-resources -o name | grep knative | xargs kubectl delete crd
437456
```
438457

439458
Then, delete Knative resources:
440459

441-
```
460+
```console
442461
kubectl -n knative-serving delete po,svc,daemonsets,replicasets,deployments,rc,secrets --all
443462
kubectl -n kourier-system delete po,svc,daemonsets,replicasets,deployments,rc,secrets --all
444463
```
445464

446465
Finally, delete namespaces:
447466

448-
```
467+
```console
449468
kubectl delete namespace knative-serving
450469
kubectl delete namespace kourier-system
451470
kubectl delete namespace knative-apps

0 commit comments

Comments
 (0)