mirror of
https://github.com/openshift/openshift-docs.git
synced 2026-02-06 06:46:26 +01:00
82 lines
2.1 KiB
Plaintext
82 lines
2.1 KiB
Plaintext
// Module included in the following assemblies:
|
|
//
|
|
// * serverless/installing_serverless/installing-knative-serving.adoc
|
|
|
|
[id="serverless-install-serving-yaml_{context}"]
|
|
= Installing Knative Serving using YAML
|
|
|
|
.Procedure
|
|
|
|
. Create a file named `serving.yaml` and copy the following example YAML into it:
|
|
+
|
|
|
|
[source,yaml]
|
|
----
|
|
apiVersion: operator.knative.dev/v1alpha1
|
|
kind: KnativeServing
|
|
metadata:
|
|
name: knative-serving
|
|
namespace: knative-serving
|
|
----
|
|
|
|
. Apply the `serving.yaml` file:
|
|
+
|
|
|
|
[source,terminal]
|
|
----
|
|
$ oc apply -f serving.yaml
|
|
----
|
|
|
|
.Verification steps
|
|
|
|
. To verify the installation is complete, enter the following command:
|
|
+
|
|
|
|
[source,terminal]
|
|
----
|
|
$ oc get knativeserving.operator.knative.dev/knative-serving -n knative-serving --template='{{range .status.conditions}}{{printf "%s=%s\n" .type .status}}{{end}}'
|
|
----
|
|
|
|
+
|
|
.Example output
|
|
+
|
|
|
|
[source,terminal]
|
|
----
|
|
DependenciesInstalled=True
|
|
DeploymentsAvailable=True
|
|
InstallSucceeded=True
|
|
Ready=True
|
|
----
|
|
+
|
|
[NOTE]
|
|
====
|
|
It may take a few seconds for the Knative Serving resources to be created.
|
|
====
|
|
. If the conditions have a status of `Unknown` or `False`, wait a few moments and then check again after you have confirmed that the resources have been created.
|
|
. Check that the Knative Serving resources have been created by entering:
|
|
+
|
|
|
|
[source,terminal]
|
|
----
|
|
$ oc get pods -n knative-serving
|
|
----
|
|
|
|
+
|
|
.Example output
|
|
+
|
|
|
|
[source,terminal]
|
|
----
|
|
NAME READY STATUS RESTARTS AGE
|
|
activator-5c596cf8d6-5l86c 1/1 Running 0 9m37s
|
|
activator-5c596cf8d6-gkn5k 1/1 Running 0 9m22s
|
|
autoscaler-5854f586f6-gj597 1/1 Running 0 9m36s
|
|
autoscaler-hpa-78665569b8-qmlmn 1/1 Running 0 9m26s
|
|
autoscaler-hpa-78665569b8-tqwvw 1/1 Running 0 9m26s
|
|
controller-7fd5655f49-9gxz5 1/1 Running 0 9m32s
|
|
controller-7fd5655f49-pncv5 1/1 Running 0 9m14s
|
|
kn-cli-downloads-8c65d4cbf-mt4t7 1/1 Running 0 9m42s
|
|
webhook-5c7d878c7c-n267j 1/1 Running 0 9m35s
|
|
----
|