Authentication, new project and basics
Objective
Learn how to authenticate, create new projects, and some basic commands in Openshift. Enter the Openshift Castle.
Prerequisites
To embark on this adventure, you'll need:
- Access to an Openshift cluster or a terminal emulator connected to one.
- Basic familiarity with command-line interfaces (CLI) and Kubernetes concepts.
Introduction
In the vast landscape of the digital realm, where clusters of containers flourish like bustling kingdoms, there lies the imposing fortress of Openshift. Built upon the foundation of Kubernetes, this castle stands as a bastion of security and scalability, protecting its treasures with unwavering vigilance.
Our hero, a brave adventurer seeking knowledge and mastery, stands before the gates of Openshift. The castle looms above, its architecture intricate and imposing, a testament to the power it holds within.
Authentication Gates
Before venturing forth, our hero must authenticate at the castle gates. With the oc login command, he present their credentials:
Forging New Projects
A strange sensation courses through our hero's veins as they enter the castle, as if the fortress were under their command. The first thing noticed is the multitude of different wings within the castle, each isolated from the others. With newfound powers, our hero invokes the creation of a new project to carve out a new realm:
Commanding the Castle
Adorning the walls are inscriptions in a mysterious language. Armed with the knowledge of oc commands, our hero delves deeper into the castle's inner workings:
oc cluster-info
oc api-versions
oc get clusteroperator
oc get pod
oc get pod <pod_name>
oc get pod <pod_name> -o yaml
oc get pod <pod_name> -o json
oc get deploy <deploy_name> -o wide
oc get all
oc describe <resource_type> <resource_name>
oc explain <jsonpath_identifier>
oc explain <jsonpath_identifier> --recursive
oc create -f <pod.yaml>
oc status --suggest
oc delete <resource_type> <resource_name>
To make these commands influence a different wing of the castle, than the one where he is in that moment, our hero needs to add the option --namespace or -n to the instruction:
Token of Entry - OAuth
For those who seek passage via OAuth, the castle offers tokens of entry:
These tokens grant access to the castle's inner sanctums.Conclusion
And thus, the hero took his first steps inside the castle.