Skill Level: Any Skill Level

In this recipe we are going deploy an knative app in OCP 4.2 containing Cloud Pak for Application 4.0

Here we are going to focus more on "Virtual Service not ready" error while deploying knative app.


Cloud Pak for App v4.0 installed on Red Hat OpenShift Container Platform V.4.2 and it is running.


  1. Previous Recipe

    As we are more focusing on Virtual Service not ready error here, we will not be discussing about versioning concepts. You can see the previous recipe on Deploying Knative app using the below url to understand about the versioning and all.




  2. About Helloworld Application

    We are going to use this hello-world application to demonstrate the Serverless deployment using Knative.


    You can also refer the same in https://docs.openshift.com/container-platform/4.2/serverless/getting-started-knative-services.html

  3. Deploying Knative Application

    1) Login into OpenShift.

    oc login https://52.117.AAA.BBB.nip.io:8443 –token=7QJvowNjE2uEbsadfdasfklaCpC3Bk


    2) Create a new project

    oc new-project gandhi


    3) Deploy k-native application

    kubectl apply –filename sample.yaml

  4. Viewing error in the deployment

    1) View all the available resources after the service is created. You can see some resources are with uninitialized error.

    kubectl get ksvc,revision,route,pod,configuration,svc,all




    2) Oc describe shows the error “Virtual service is not ready“.



  5. Fixing error in the deployment

    1) Add this new project gandhi into ServiceMeshMemberRoll using the below command.

    oc edit ServiceMeshMemberRoll default -n istio-system




    2) Now the knative application status becomes ready and application is accessible..

    kubectl get ksvc,revision,route,pod,configuration,svc,all





  6. Access the application

    1) Access the application in the browser and see the results.


Join The Discussion