OpenShift Command Line Tools: Difference between revisions
No edit summary |
|||
(One intermediate revision by the same user not shown) | |||
Line 20: | Line 20: | ||
=Context= | =Context= | ||
{{Internal|.kube_config#Contexts|.kube/config Context}} | |||
=Namespace Selection= | =Namespace Selection= |
Latest revision as of 01:08, 20 November 2020
Internal
Overview
User may interact with OpenShift by sending REST API invocations into an OpenShift master. Project-related queries and administrative commands may be sent with oc. Special administrative commands related to core OpenShift services, may be sent with oadm.
Configuration
The tool configuration is maintained in user's ~/<user>/.kube/config.
State
Both oc and oadm maintain state on the client host, under ~/<user>/.kube/<cluster-identifier> directories, and configuration in ~/<user>/.kube/config. Example:
~ovidiu/.kube/master.openshift.novaordis.io_443
Context
Namespace Selection
By default, oc selects objects from the current project, which is the project oc commands apply to, without to explicitly having to use the -n <project-name> qualifier. The current project is part of the CLI tool's current context, maintained in user's .kube/config. To switch to a different current project, use:
oc project <new-current-project>