Installing OpenShift Serverless Red Hat OpenShift Serverless 1.35 Installing the Serverless Operator, Knative CLI, Knative Serving, and Knative Eventing Red Hat OpenShift Documentation Team

Commands:
--- apiVersion: v1 kind: Namespace metadata: name: openshift-serverless --- apiVersion: operators.coreos.com/v1 kind: OperatorGroup metadata: name: serverless-operators namespace: openshift-serverless spec: {} --- apiVersion: operators.coreos.com/v1alpha1 kind: Subscription metadata: name: serverless-operator namespace: openshift-serverless spec: channel: stable 1 name: serverless-operator 2 source: redhat-operators 3 sourceNamespace: openshift-marketplace 4
oc apply -f serverless-subscription.yaml
oc get csv
NAME DISPLAY VERSION REPLACES PHASE serverless-operator.v1.25.0 Red Hat OpenShift Serverless 1.25.0 serverless-operator.v1.24.0 Succeeded
kn: No such file or directory
tar -xf <file>
echo USDPATH
oc get ConsoleCLIDownload
NAME DISPLAY NAME AGE kn kn - OpenShift Serverless Command Line Interface (CLI) 2022-09-20T08:41:18Z oc-cli-downloads oc - OpenShift Command Line Interface (CLI) 2022-09-20T08:00:20Z
oc get route -n openshift-serverless
NAME HOST/PORT PATH SERVICES PORT TERMINATION WILDCARD kn kn-openshift-serverless.apps.example.com knative-openshift-metrics-3 http-cli edge/Redirect None
subscription-manager register
subscription-manager refresh
subscription-manager attach --pool=<pool_id> 1
subscription-manager repos --enable="openshift-serverless-1-for-rhel-8-x86_64-rpms"
subscription-manager repos --enable="openshift-serverless-1-for-rhel-8-s390x-rpms"
subscription-manager repos --enable="openshift-serverless-1-for-rhel-8-ppc64le-rpms"
yum install openshift-serverless-clients
dnf install 'dnf-command(versionlock)'
dnf versionlock add --raw 'openshift-serverless-clients-1.7.*'
dnf search --showduplicates openshift-serverless-clients
dnf versionlock delete openshift-serverless-clients
dnf versionlock add --raw 'openshift-serverless-clients-1.8.*'
dnf install --upgrade openshift-serverless-clients
kn: No such file or directory
tar -xf <filename>
echo USDPATH
echo USDPATH
C:\> path
apiVersion: operator.knative.dev/v1beta1 kind: KnativeServing metadata: name: knative-serving namespace: knative-serving
oc apply -f serving.yaml
oc get knativeserving.operator.knative.dev/knative-serving -n knative-serving --template='{{range .status.conditions}}{{printf "%s=%s\n" .type .status}}{{end}}'
DependenciesInstalled=True DeploymentsAvailable=True InstallSucceeded=True Ready=True
oc get pods -n knative-serving
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
oc get pods -n knative-serving-ingress
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
apiVersion: operator.knative.dev/v1beta1 kind: KnativeEventing metadata: name: knative-eventing namespace: knative-eventing
oc apply -f eventing.yaml
oc get knativeeventing.operator.knative.dev/knative-eventing -n knative-eventing --template='{{range .status.conditions}}{{printf "%s=%s\n" .type .status}}{{end}}'
InstallSucceeded=True Ready=True
oc get pods -n knative-eventing
NAME READY STATUS RESTARTS AGE broker-controller-58765d9d49-g9zp6 1/1 Running 0 7m21s eventing-controller-65fdd66b54-jw7bh 1/1 Running 0 7m31s eventing-webhook-57fd74b5bd-kvhlz 1/1 Running 0 7m31s imc-controller-5b75d458fc-ptvm2 1/1 Running 0 7m19s imc-dispatcher-64f6d5fccb-kkc4c 1/1 Running 0 7m18s
apiVersion: operator.serverless.openshift.io/v1alpha1 kind: KnativeKafka metadata: name: knative-kafka namespace: knative-eventing spec: channel: enabled: true 1 bootstrapServers: <bootstrap_servers> 2 source: enabled: true 3 broker: enabled: true 4 defaultConfig: bootstrapServers: <bootstrap_servers> 5 numPartitions: <num_partitions> 6 replicationFactor: <replication_factor> 7 sink: enabled: true 8 logging: level: INFO 9
oc get pods -n knative-eventing
NAME READY STATUS RESTARTS AGE kafka-broker-dispatcher-7769fbbcbb-xgffn 2/2 Running 0 44s kafka-broker-receiver-5fb56f7656-fhq8d 2/2 Running 0 44s kafka-channel-dispatcher-84fd6cb7f9-k2tjv 2/2 Running 0 44s kafka-channel-receiver-9b7f795d5-c76xr 2/2 Running 0 44s kafka-controller-6f95659bf6-trd6r 2/2 Running 0 44s kafka-source-dispatcher-6bf98bdfff-8bcsn 2/2 Running 0 44s kafka-webhook-eventing-68dc95d54b-825xs 2/2 Running 0 44s
apiVersion: operator.serverless.openshift.io/v1alpha1 kind: KnativeKafka metadata: name: knative-kafka namespace: knative-eventing spec: channel: enabled: true 1 bootstrapServers: <bootstrap_servers> 2 source: enabled: true 3 broker: enabled: true 4 defaultConfig: bootstrapServers: <bootstrap_servers> 5 numPartitions: <num_partitions> 6 replicationFactor: <replication_factor> 7 sink: enabled: true 8 logging: level: INFO 9
oc get pods -n knative-eventing
NAME READY STATUS RESTARTS AGE kafka-broker-dispatcher-7769fbbcbb-xgffn 2/2 Running 0 44s kafka-broker-receiver-5fb56f7656-fhq8d 2/2 Running 0 44s kafka-channel-dispatcher-84fd6cb7f9-k2tjv 2/2 Running 0 44s kafka-channel-receiver-9b7f795d5-c76xr 2/2 Running 0 44s kafka-controller-6f95659bf6-trd6r 2/2 Running 0 44s kafka-source-dispatcher-6bf98bdfff-8bcsn 2/2 Running 0 44s kafka-webhook-eventing-68dc95d54b-825xs 2/2 Running 0 44s
apiVersion: operator.serverless.openshift.io/v1alpha1 kind: KnativeKafka metadata: name: knative-kafka namespace: knative-kafka spec: config: deployment: "kube-rbac-proxy-cpu-request": "10m" 1 "kube-rbac-proxy-memory-request": "20Mi" 2 "kube-rbac-proxy-cpu-limit": "100m" 3 "kube-rbac-proxy-memory-limit": "100Mi" 4
systemctl start --user podman.socket
export DOCKER_HOST="unix://USD{XDG_RUNTIME_DIR}/podman/podman.sock"
kn func build -v
podman machine init --memory=8192 --cpus=2 --disk-size=20
podman machine start Starting machine "podman-machine-default" Waiting for VM Mounting volume... /Users/myuser:/Users/user [...truncated output...] You can still connect Docker API clients by setting DOCKER_HOST using the following command in your terminal session: export DOCKER_HOST='unix:///Users/myuser/.local/share/containers/podman/machine/podman-machine-default/podman.sock' Machine "podman-machine-default" started successfully
export DOCKER_HOST='unix:///Users/myuser/.local/share/containers/podman/machine/podman-machine-default/podman.sock'
kn func build -v
kn: No such file or directory
tar xvzf <tar_archive>
mv <filename> kn-workflow
chmod +x <path/to/downloaded/kn-workflow>
mv <path/to/downloaded/kn-workflow> /usr/local/bin/kn-workflow
kn plugin list
tar xvzf <tar_archive>
mv <filename> kn-workflow
chmod +x <path/to/downloaded/kn-workflow>
mv <path/to/downloaded/kn-workflow> /usr/local/bin/kn-workflow
kn plugin list
Expand-Archive -Path <filename>.zip -DestinationPath <destination>
Rename-Item -Path <destination>\<filename>.exe -NewName kn-workflow.exe
Copy-Item -Path <destination>\kn-workflow.exe -Destination "C:\Program Files\kn-workflow.exe"
kn plugin list
podman login registry.redhat.io
export KN_IMAGE=registry.redhat.io/openshift-serverless-1/logic-kn-workflow-cli-artifacts-rhel8:1.33.0
export KN_CONTAINER_ID=USD(podman run -di USDKN_IMAGE)
podman cp USDKN_CONTAINER_ID:<path_to_binary> .
podman stop USDKN_CONTAINER_ID
podman rm USDKN_CONTAINER_ID
tar xvzf kn-workflow-linux-amd64.tar.gz
mv kn kn-workflow
cp path/to/downloaded/kn-workflow /usr/local/bin/kn-workflow
chmod +x /usr/local/bin/kn-workflow
kn plugin list
kn-workflow
Manage OpenShift Serverless Logic Workflow projects Usage: kn workflow [command] Aliases: kn workflow, kn-workflow Available Commands: completion Generate the autocompletion script for the specified shell create Creates a new OpenShift Serverless Logic Workflow project deploy Deploy an OpenShift Serverless Logic Workflow project on Kubernetes via SonataFlow Operator help Help about any command quarkus Manage OpenShift Serverless Logic Workflow projects built in Quarkus run Run an OpenShift Serverless Logic Workflow project in development mode undeploy Undeploy an OpenShift Serverless Logic Workflow project on Kubernetes via SonataFlow Operator version Show the version Flags: -h, --help help for kn -v, --version version for kn Use "kn [command] --help" for more information about a command.
stable stable-1.28 +--------------+ +--------------------------------------------+ | | | | | +--------+ | corresponds to | +--------+ +--------+ +--------+ | | | 1.28.0 |----------------------> | 1.28.0 | | 1.28.1 | | 1.28.2 | | | +--------+ | | +--------+ +--------+ +--------+ | | | | | ^ | | | | +-----|-------------------|------------|-----+ | +--------+ | created| |upgrades | | | 1.28.1 | | from | hotfix_xyz |to | | +--------+ | | +------------+ | | | | +-->| |--+ | | | | | | | +--------+ | upgrades to +------------+ | | | 1.29.0 |<----------------------------------------------------------+ | +--------+ | | | | | | +--------+ | | | 1.30.0 | | | +--------+ | | | +--------------+
stable stable-1.28 +--------------+ +--------------+ | | | | | +--------+ | | +--------+ | | | 1.28.0 | | | | 1.28.0 | | | +--------+ | | +--------+ | | | | | | | | | | | | +--------+ | | | | | | 1.29.0 |<-------- | v | | +--------+ | | | +--------+ | | | +---------| 1.28.1 | | | | | +--------+ | | +--------+ | | | | | 1.30.0 | | | | | +--------+ | | | | | | | +--------------+ +--------------+
stable stable-1.29 +--------------+ +--------------+ | | | | | +--------+ | | +--------+ | | | 1.29.0 | | | | 1.29.0 | | | +--------+ | | +--------+ | | | | | | | | | v | | +--------+ | | +--------+ | | | 1.29.1 | | | | 1.29.1 | | | +--------+ | | +--------+ | | | | | | | | | | | | +--------+ | | | | | | 1.30.0 |<---------------------+ | | +--------+ | | | | | | | +--------------+ +--------------+
stable-1.29 stable-1.30 +--------------+ +--------------+ | | | | | +--------+ | | +--------+ | | | 1.29.0 | | ------> | 1.30.0 | | | +--------+ | | | +--------+ | | | | | | | | | | | | +--------+ | | | | | | 1.29.1 |-------+ | | | +--------+ | | | | | | | +--------------+ +--------------+
The installed KnativeServing version is v1.5.0.
apiVersion: operators.coreos.com/v1alpha1 kind: Subscription metadata: name: serverless-operator namespace: openshift-serverless spec: channel: stable name: serverless-operator source: redhat-operators sourceNamespace: openshift-marketplace installPlanApproval: Manual startingCSV: serverless-operator.v1.26.0
oc apply -f serverless-subscription.yaml