Oc login: Difference between revisions

From NovaOrdis Knowledge Base
Jump to navigation Jump to search
Line 8: Line 8:


The user must exists on server, and its identity must be correctly resolved by the [identity provider|OpenShiftSecurity#IdentityProviders].
The user must exists on server, and its identity must be correctly resolved by the [identity provider|OpenShiftSecurity#IdentityProviders].
More about authentication:
{{Internal|OpenShift_Concepts#Authentication_Layer|OpenShift Concepts - Authentication}}


Example:
Example:
Line 18: Line 14:
oc login -u system:admin
oc login -u system:admin
</pre>
</pre>
If -u is not specified, <tt>oc login</tt> will query for user.
More about authentication:
{{Internal|OpenShift_Concepts#Authentication_Layer|OpenShift Concepts - Authentication}}


=Options=
=Options=

Revision as of 19:20, 14 May 2017

Internal

Overview

Establishes an authenticated command-line session with the server and saves configuration under <.kube/config.If there is no state saved under .kube/config, it queries the user for OpenShift server, username and password.

The user must exists on server, and its identity must be correctly resolved by the [identity provider|OpenShiftSecurity#IdentityProviders].

Example:

oc login -u system:admin

If -u is not specified, oc login will query for user.

More about authentication:

OpenShift Concepts - Authentication

Options

-u --username

Sets the user name.

-p --password

Sets the user name.

-n

Sets the project (namespace) to log into.

-s --server

--server="https://my-openshift-master:8443"

--certificate-authority

Specifies the path to the certificate authority file.

--insecure-skip-tls-verify

Allows interaction with HTTPS server while bypassing server certificate checks.