×

Before you begin

  • Review Accessing the web console.

  • You must be able to access a running instance of OpenShift Container Platform. If you do not have access, contact your cluster administrator.

Logging in to the web console

You can log in to the OpenShift Container Platform web console to access and manage your cluster.

Prerequisites
  • You must have access to an OpenShift Container Platform cluster.

Procedure
  • Log in to the OpenShift Container Platform web console using your login credentials.

You are redirected to the Projects page. For non-administrative users, the default view is the Developer perspective. For cluster administrators, the default view is the Administrator perspective. If you do not have cluster-admin privileges, you will not see the Administrator perspective in your web console.

The web console provides two perspectives: the Administrator perspective and Developer perspective. The Developer perspective provides workflows specific to the developer use cases.

500
Figure 1. Perspective switcher

Use the perspective switcher to switch to the Developer perspective. The Topology view with options to create an application is displayed.

Creating a new project

A project enables a community of users to organize and manage their content in isolation. Projects are OpenShift Container Platform extensions to Kubernetes namespaces. Projects have additional features that enable user self-provisioning.

Users must receive access to projects from administrators. Cluster administrators can allow developers to create their own projects. In most cases, users automatically have access to their own projects.

Each project has its own set of objects, policies, constraints, and service accounts.

Prerequisites
  • You are logged in to the OpenShift Container Platform web console.

  • You are in the Developer perspective.

  • You have the appropriate roles and permissions in a project to create applications and other workloads in OpenShift Container Platform.

Procedure
  1. In the +Add view, select ProjectCreate Project.

  2. In the Name field, enter user-getting-started.

  3. Optional: In the Display name field, enter Getting Started with OpenShift.

    Display name and Description fields are optional.

  4. Click Create.

You have created your first project on OpenShift Container Platform.

Granting view permissions

OpenShift Container Platform automatically creates a few special service accounts in every project. The default service account takes responsibility for running the pods. OpenShift Container Platform uses and injects this service account into every pod that launches.

The following procedure creates a RoleBinding object for the default ServiceAccount object. The service account communicates with the OpenShift Container Platform API to learn about pods, services, and resources within the project.

Prerequisites
  • You are logged in to the OpenShift Container Platform web console.

  • You have a deployed image.

  • You are in the Administrator perspective.

Procedure
  1. From the Administrator perspective, navigate to User Management and then click RoleBindings.

  2. Click Create binding.

  3. Select Namespace role binding (RoleBinding).

  4. In the Name field, enter sa-user-account.

  5. In the Namespace field, search for and select user-getting-started.

  6. In the Role name field, search for view and select view.

  7. In the Subject field, select ServiceAccount.

  8. In the Subject namespace field, search for and select user-getting-started.

  9. In the Subject name field, enter default.

  10. Click Create.

Deploying your first image

The simplest way to deploy an application in OpenShift Container Platform is to run an existing container image. The following procedure deploys a front end component of an application called national-parks-app. The web application displays an interactive map. The map displays the location of major national parks across the world.

Prerequisites
  • You are logged in to the OpenShift Container Platform web console.

  • You are in the Developer perspective.

  • You have the appropriate roles and permissions in a project to create applications and other workloads in OpenShift Container Platform.

Procedure
  1. From the +Add view in the Developer perspective, click Container images to open a dialog.

  2. In the Image Name field, enter the following: quay.io/openshiftroadshow/parksmap:latest

  3. Ensure that you have the current values for the following:

    1. Application: national-parks-app

    2. Name: parksmap

  4. Select Deployment as the Resource.

  5. Select Create route to the application.

  6. In the Advanced Options section, click Labels and add labels to better identify this deployment later. Labels help identify and filter components in the web console and in the command line. Add the following labels:

    • app=national-parks-app

    • component=parksmap

    • role=frontend

  7. Click Create.

You are redirected to the Topology page where you can see the parksmap deployment in the national-parks-app application.

Examining the pod

OpenShift Container Platform leverages the Kubernetes concept of a pod, which is one or more containers deployed together on one host, and the smallest compute unit that can be defined, deployed, and managed. Pods are the rough equivalent of a machine instance, physical or virtual, to a container.

The Overview panel enables you to access many features of the parksmap deployment. The Details and Resources tabs enable you to scale application pods, check build status, services, and routes.

Prerequisites
  • You are logged in to the OpenShift Container Platform web console.

  • You are in the Developer perspective.

  • You have a deployed image.

Procedure
  • Click D parksmap in the Topology view to open the Overview panel.