Chapter 3. Deploying applications with OpenShift Client


You can use OpenShift Client (oc) for application deployment.

Procedure

  1. Create a new OpenShift project:

    $ oc new-project sample-project
    Copy to Clipboard Toggle word wrap
  2. Add the ASP.NET Core application:

    $ oc new-app --name=example-app 'dotnet:9.0-ubi8~https://github.com/redhat-developer/s2i-dotnetcore-ex#dotnet-9.0' --build-env DOTNET_STARTUP_PROJECT=app
    Copy to Clipboard Toggle word wrap
  3. Track the progress of the build:

    $ oc logs -f bc/example-app
    Copy to Clipboard Toggle word wrap
  4. View the deployed application once the build is finished:

    $ oc logs -f dc/example-app
    Copy to Clipboard Toggle word wrap

    The application is now accessible within the project.

  5. Optional: Make the project accessible externally:

    $ oc expose svc/example-app
    Copy to Clipboard Toggle word wrap
  6. Obtain the shareable URL:

    $ oc get routes
    Copy to Clipboard Toggle word wrap
Back to top
Red Hat logoGithubredditYoutubeTwitter

Learn

Try, buy, & sell

Communities

About Red Hat Documentation

We help Red Hat users innovate and achieve their goals with our products and services with content they can trust. Explore our recent updates.

Making open source more inclusive

Red Hat is committed to replacing problematic language in our code, documentation, and web properties. For more details, see the Red Hat Blog.

About Red Hat

We deliver hardened solutions that make it easier for enterprises to work across platforms and environments, from the core datacenter to the network edge.

Theme

© 2026 Red Hat