GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — devops-resources/resources/openshift.md at master · SudyLiu/devops-resources

Expand file tree

/

openshift.md

Copy path
More file actions
More file actions

Latest commit

 

History

History
History
46 lines (28 loc) · 1.27 KB
/

openshift.md

Copy path

File metadata and controls

46 lines (28 loc) · 1.27 KB
Raw
Copy raw file
Download raw file
Outline
Edit and raw actions

OpenShift

Learn OpenShift

Name Comments
Learn OpenShift Interactive way to learn OpenShift

CheatSheet

  • Login: oc login -u my_user -p my_password

Projects

  • Highlevel overview of the project: oc status
  • Create a new project: oc new-project my_project
  • List projects: oc get projects

Accounts

  • The username of the user currently logged in: oc whoami

  • Add to user "user1" the ability to view the project "wonderland": oc adm policy add-role-to-user view user1 -n wonderland

  • Add a user as admin to the project "wonderland": oc adm policy add-role-to-user admin some_user -n wonderland

  • Get a list of all context whihc have ever been created: oc config get-contexts

  • Check what is the current context: oc whoami --show-context

  • The OpenShift server currently used: oc whoami --show-server

  • Get the list of all the OpenShift clusters you have ever logged into: oc config get-clusters

Pods

  • List pods: oc get po
  • List pods with with node info: oc get po -o wide

Deployments

  • List deployments: oc get deployments

Service Accounts

  • List service accounts: oc get serviceaccounts

Misc

  • Login: oc login --token=<TOKEN> --server=https://<ADDRESS>:<PORT>
You are visitor 01402792 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.