1
0
mirror of https://github.com/openshift/openshift-docs.git synced 2026-02-05 12:46:18 +01:00
Files
openshift-docs/modules/serverless-install-serving-yaml.adoc
2023-10-30 10:13:25 -04:00

112 lines
4.2 KiB
Plaintext

// Module included in the following assemblies:
//
// * /serverless/install/installing-knative-serving.adoc
:_mod-docs-content-type: PROCEDURE
[id="serverless-install-serving-yaml_{context}"]
= Installing Knative Serving by using YAML
After you install the {ServerlessOperatorName}, you can install Knative Serving by using the default settings, or configure more advanced settings in the `KnativeServing` custom resource (CR). You can use the following procedure to install Knative Serving by using YAML files and the `oc` CLI.
.Prerequisites
ifdef::openshift-enterprise[]
* You have access to an {product-title} account with cluster administrator access.
endif::[]
ifdef::openshift-dedicated,openshift-rosa[]
* You have access to an {product-title} account with cluster administrator or dedicated administrator access.
endif::[]
* You have installed the {ServerlessOperatorName}.
* Install the OpenShift CLI (`oc`).
.Procedure
. Create a file named `serving.yaml` and copy the following example YAML into it:
+
[source,yaml]
----
apiVersion: operator.knative.dev/v1beta1
kind: KnativeServing
metadata:
name: knative-serving
namespace: knative-serving
----
. Apply the `serving.yaml` file:
+
[source,terminal]
----
$ oc apply -f serving.yaml
----
.Verification
. 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:
+
[source,terminal]
----
$ oc get pods -n knative-serving
----
+
.Example output
[source,terminal]
----
NAME READY STATUS RESTARTS AGE
activator-67ddf8c9d7-p7rm5 2/2 Running 0 4m
activator-67ddf8c9d7-q84fz 2/2 Running 0 4m
autoscaler-5d87bc6dbf-6nqc6 2/2 Running 0 3m59s
autoscaler-5d87bc6dbf-h64rl 2/2 Running 0 3m59s
autoscaler-hpa-77f85f5cc4-lrts7 2/2 Running 0 3m57s
autoscaler-hpa-77f85f5cc4-zx7hl 2/2 Running 0 3m56s
controller-5cfc7cb8db-nlccl 2/2 Running 0 3m50s
controller-5cfc7cb8db-rmv7r 2/2 Running 0 3m18s
domain-mapping-86d84bb6b4-r746m 2/2 Running 0 3m58s
domain-mapping-86d84bb6b4-v7nh8 2/2 Running 0 3m58s
domainmapping-webhook-769d679d45-bkcnj 2/2 Running 0 3m58s
domainmapping-webhook-769d679d45-fff68 2/2 Running 0 3m58s
storage-version-migration-serving-serving-0.26.0--1-6qlkb 0/1 Completed 0 3m56s
webhook-5fb774f8d8-6bqrt 2/2 Running 0 3m57s
webhook-5fb774f8d8-b8lt5 2/2 Running 0 3m57s
----
. Check that the necessary networking components have been installed to the automatically created `knative-serving-ingress` namespace:
+
[source,terminal]
----
$ oc get pods -n knative-serving-ingress
----
+
.Example output
[source,terminal]
----
NAME READY STATUS RESTARTS AGE
net-kourier-controller-7d4b6c5d95-62mkf 1/1 Running 0 76s
net-kourier-controller-7d4b6c5d95-qmgm2 1/1 Running 0 76s
3scale-kourier-gateway-6688b49568-987qz 1/1 Running 0 75s
3scale-kourier-gateway-6688b49568-b5tnp 1/1 Running 0 75s
----