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
You can specify readiness and liveness probes for multiple containers. This feature is not enabled by default and you must configure it using the `KnativeServing` custom resource (CR).
12
+
13
+
14
+
.Procedure
15
+
16
+
17
+
. Configure multi-container probing for your service by enabling the `multi-container-probing` feature in the `KnativeServing` CR.
18
+
+
19
+
.Multi-container probing configuration
20
+
[source,yaml]
21
+
----
22
+
...
23
+
spec:
24
+
config:
25
+
features:
26
+
"multi-container-probing": enabled <1>
27
+
...
28
+
----
29
+
<1> Enabled multi-container-probing feature
30
+
31
+
. Apply the updated `KnativeServing` CR.
32
+
+
33
+
[source,terminal]
34
+
----
35
+
$ oc apply -f <filename>
36
+
----
37
+
. Modify your multi-container service to include the specified probes.
38
+
+
39
+
.Multi-container probing
40
+
[source,yaml]
41
+
----
42
+
apiVersion: serving.knative.dev/v1
43
+
kind: Service
44
+
...
45
+
spec:
46
+
template:
47
+
spec:
48
+
containers:
49
+
- name: first-container
50
+
image: ghcr.io/knative/helloworld-go:latest
51
+
ports:
52
+
- containerPort: 8080
53
+
readinessProbe: <1>
54
+
httpGet:
55
+
port: 8080
56
+
- name: second-container
57
+
image: gcr.io/knative-samples/helloworld-java
58
+
readinessProbe: <2>
59
+
httpGet:
60
+
port: 8090
61
+
----
62
+
<1> Readiness probe of the first container
63
+
<2> Readiness probe of the second container
64
+
65
+
== Additional resources
66
+
* link:https://knative.dev/docs/serving/services/configure-probing/#general-understanding-of-knative-probing[General understanding of Knative Probing]
0 commit comments