1.

What is the OpenShift Command Line Interface (CLI)?

Answer»

The OpenShift CLI tool is a command-line tool for managing OpenShift applications. We can manage the application's life cycle from start to finish using the OpenShift CLI. It provides basic and COMPLEX application setup features. It also has tools for managing, distributing, and adding new apps.

You can create applications and manage OpenShift Container PLATFORM projects from a terminal using the OpenShift command-line interface (CLI). After you've INSTALLED the CLI, you can use the oc command to access it. In the following scenarios, the OpenShift CLI is ideal:

  • Working directly with the source code of the project
  • OpenShift Container Platform operations can be scripted.
  • Project management while bandwidth is limited and the web console is unavailable.

A few of the major CLI commands are listed below:

  • Create a new project with the oc new-project command. 
  • Create a new application with the oc new-app command.
  • To see the pods for the current project, use the oc get pods command.
  • To access logs for a specific pod, use the oc logs command.
  • To see the current project, use the oc project command.
  • To get information about the current project, including as services, deployments, and build configs, use the oc status command.
  • The oc api-resources command displays a list of the server's supported API resources.
  • To see the description and FIELDS for a specific resource, use the oc explain command.
  • To see a list and description of all AVAILABLE CLI commands, type oc help.


Discussion

No Comment Found