Oc Cheat Sheet
- Oc Command Cheat Sheet
- Oc Voting Cheat Sheet
- Openshift Oc Client Cheat Sheet
- Oc Cli Cheat Sheet
- Oc Cheat Sheet
Oc -loglevel 999 get pod/dummy-deployment-6d6759c786-5kwth: Start a pod and get a shell for debug: oc debug dc/jorge: Impersonate for oc command: oc -as=jorge get pods, oc -as-group=developers get pods: Use oc to do admin operations: oc adm Try experimental commands of oc: oc ex Explain OpenShift/Kubernetes. When a Cheat Sheet is missing for a point in OPC/ASVS, then the OCSS will handle the missing and create one. When the Cheat Sheet is ready, then the reference is added by OPC/ASVS. If a Cheat Sheet exists for an OPC/ASVS point but the content do not provide the expected help then the Cheat Sheet is updated to provide the required content. CHEAT SHEET Monomers & Polymers. Monomers are individual molecules that make up a polymer. Polymers are long chains that are composed of many individual monomers that have been bonded together in a repeating pattern. Condensation Reactions occurs when two molecules combine to form a more complex molecule with the removal of water.
- PDF Link: cheatsheet-openshift-A4.pdf, Category: Cloud
- Blog URL: https://cheatsheet.dennyzhang.com/cheatsheet-openshift-A4
- Related posts: PKS CheatSheet, Kubectl CheatSheet, #denny-cheatsheets
File me Issues or star this repo.
1.1 OpenShift FAQ
| Name | Summary |
|---|---|
| Kubernetes versions for different OpenShift versions | openshift 3.9, openshift 3.10, openshift 3.11 |
1.2 OpenShift Key Components
| Name | Command |
|---|---|
| Computing virtualization | RHV (Red Hat Virtualization), based on KVM |
| SDN networking | Based upon OVS |
| VM/Cluster lifecycle management | CloudForms ? |
| Node healing | Notification of failed components but no recovery |
| Container optimized OS | |
| Container Image Compliance Scan | CloudForms OpenSCAP, like Harbor Clair |
| Container runtime | dockerd, cri-o |
| Container image registry | OpenShift Container Registry (OCR), powered by Redhat Quay |
| Packages k8s cluster orchestrator | tectonic ? |
| Component Packaging | Ansible modules? |
| CSI for Persistent volume | GlusterFS, NFS, Local storage |
| Authorization | OpenShift Container Platform policy engine |
| Disater Recovery | Notification of failed components but no recovery |
| Control Plane | |
| Reference | Link: OpenShift Container Platform Cluster Limits |
| Reference | Link: OpenShift Key Components, Link: PKS Key Components |
1.3 New Concepts From OpenShift
| Name | Command |
|---|---|
| BuildConfig | |
| Source2Image(s2i) | |
| Templates | Like helm chart |
| Pipelines | Jenkins |
| Fine grained security policies OOTB | Like k8s psp |
| Security Context Contraints(SCC) | |
| Red Hat Container Catalog (RHCC) | |
| Route | Like k8s ingress |
| Metering and Chargeback | |
| Operator SDK |
1.4 OpenShift Solutions
| Name | Command |
|---|---|
| OpenShift Online | Hosted by Red Hat in AWS public cloud |
| OpenShift Dedicated | Virtual private cloud, managed by Red Hat in any AWS region |
| OpenShift Container Platform | Any on-premise, public, or private cloud infra with RedHat Enterprise Linux |
| OKD | |
| Minishift | |
| Reference | Link: OpenShift plans and pricing |
1.5 OpenShift Glossary
| Name | Command |
|---|---|
| OKD | The Origin Community Distribution of Kubernetes that powers Red Hat OpenShift. |
| oc command line | OpenShift command line: oc <action> <object_type> <object_name_or_id> |
| Project | Namespace in Kubernetes. Resources are aggregated by projects. oc get project |
| Build | Builds create a new image from source code, other images, Dockerfiles, etc. oc get build |
| Build Configuration | How to build source code and a base image into a new image. oc get bc |
| Route | Endpoint in Kubernetes. A route is an external DNS entry |
| Deployment Configuration | oc get dc |
| ImageStream | oc get is |
| ImageStreamTag | oc get istag |
| ImageStreamImage | oc get isimage |
| Template | oc get template |
| Template Instance | oc get templateinstance |
| Explain | Online manual oc explain pod |
| Red Hat Registry | By default, all images are pulled from registry.redhat.io. |
| OpenShift SaaS Version | https://openshift.io/ |
| OpenShift online | https://cloud.openshift.com |
| Reference | |
| Reference | OpenShift CheatSheet, Rancher CheatSheet, PKS CheatSheet |
1.6 OpenShift Assumptions
| Name | Summary |
|---|---|
| Single instance of K8S | One OpenShift One K8S. Use k8s namespace soly for multi-tenancy |
| No mixed versions | Versions must match between master and node hosts, excluding upgrade; Old oc can talk to new servers |
| Node roles | Master nodes, worker nodes, and etcd nodes. |
1.7 OpenShift Maintainance
| Name | Command |
|---|---|
| Install clusters | Run ansible playbooks to install OpenShift |
| Upgrade clusters | Support both in-place upgrade and blue-green deployments; Use ansible to upgrade clusters |
| Node problem healing |
1.8 OpenShift Cfg Files
| Name | Summary |
|---|---|
| The default image stream and template files | /usr/share/openshift/examples/, /etc/origin/examples/ |
| Data folder for master and worker nodes | /var/lib |
| Volumes and potential core dumps of the binary | /var/lib/origin |
| Cloud provider specific conf(AWS, Azure, etc) | /etc/origin/cloudprovider |
| Additional third party volume plug-ins | /usr/libexec/kubernetes/kubelet-plugins, /etc/origin/kubelet-plugins |
| All certificates, conf files, admin.kubeconfig, etc | /etc/origin/master |
| Master node conf profile | /etc/origin/master/admin.kubeconfig |
| Used for node bootstrapping nodes other than master | /etc/origin/master/bootstrap.kubeconfig |
| Node conf profile | /etc/origin/node/node.kubeconfig, /etc/origin/node/node-config.yaml |
1.9 OC – Highlights
| Name | Command |
|---|---|
| Get api requests verbose output with kubectl call | oc --loglevel 999 get pod/dummy-deployment-6d6759c786-5kwth |
| Start a pod and get a shell for debug | oc debug dc/jorge |
| Impersonate for oc command | oc --as=jorge get pods, oc --as-group=developers get pods |
| Use oc to do admin operations | oc adm <sub-command> |
| Try experimental commands of oc | oc ex <sub-command> |
| Explain OpenShift/Kubernetes concepts to me | oc explain pod, oc explain replicaset |
| Enable oc shell autocompletion | echo 'source <(oc completion zsh)' >>~/.zshrc, then reload terminal |
| Reference | OpenShift CheatSheet, Kubectl CheatSheet |
1.10 OC – Admin
| Name | Command |
|---|---|
| Login/logout | oc login, oc logout, oc whoami |
| List route | oc get route |
| List all object types | oc types, oc api-resources |
| Start a local OpenShift all-in-one cluster | oc cluster up |
1.11 OC – Developer
| Name | Command |
|---|---|
| Create a project | oc new-project <projectname> --description=<description> --display-name=<display_name> |
| Check status of current project | oc statusLink: OC CLI Operations |
| Show oc cli profile | oc config viewLink: Managing CLI Profiles |
| Get all resource | oc get all |
| Switch project | oc project <projectname> |
| Create an application | oc new-app https://github.com/sclorg/cakephp-ex |
| Create a new build | oc new-build https://github.com/sclorg/cakephp-ex |
| Manually start a build with given conf | oc start-build <buildconfig_name> |
| Stop a build that is in progress | oc cancel-build <build_name> |
| Import an external image | oc import-image <image_stream> |
| Tag an image | oc tag <current_image> <image_stream> |
1.12 OpenShift Source Code
| Name | Command |
|---|---|
| Openshift Ansible Deployment | GitHub: openshift-ansible/playbooks |
1.13 OpenShift Opportunty
| Name | Command |
|---|---|
| Doesn’t support multiple clusters | |
| OC command line could be a strengh or a weakness | |
| Lack of SDN solution | |
| Time-consuming for administrators’ operations |
Oc Command Cheat Sheet
1.14 OpenShift CLI Help All
1.15 OpenShift CLI Help Admin
1.16 More Resources
License: Code is licensed under MIT License.
Which park passes should you buy if you are a family living in Orange County, CA? It’s a question that plagues parents who wants to play outside more, but don’t have the time to research every possible outing or admission price.
I will try to make it easy for you. Your choices range from:

- Spend $0 – see FREE PLAY.
- Spend $55/year – OCParks.com County Regional and Wilderness Parks Annual Pass OR County Beach Parking Pass with Pay & Display Machines. (Purchase online or at some park offices)
- Spend $80/year – OCParks.com All County Parks and Beaches Parking Pass. (Purchase online or at some park offices)
- Spend $195/year – Access to almost all CA state parks and beaches in Orange County with CA Explorer Vehicle Day Use Pass.
- Spend $180/year (or less for Oct-Dec only) – City of Newport Beach Annual Parking Permit.
- Spend $50/year (resident) or $100/year (non-resident) – City of San Clemente Metered Parking Permits
- Spend $150/year – City of Huntington Beach beach parking.
Also, look for Senior parking permits which can be as much as half the price – if you are a grandparent looking for places to go with the grandkids.
Personal Note: Out of all these options I always by an $80/year OCParks.com All County Parks and Beaches Parking Pass AND a CA state parks pass at $195/year. But visiting and reporting on parks is a big part of my life! After chatting with other local park lovers, I found that those who live inland like the county park pass – and those near the beach opt for the state parks pass. Another strategy is to alternate your investment every year so that you get your money’s worth out of the state park pass one year and the county pass the next year. I just included the Newport Beach, San Clemente, and Huntington Beach info for those of you who might live in or near those towns.
FREE PLAY
- Your backyard or patio.
- Your living room.
- The sidewalk around your neighborhood.
- Your neighborhood park.
- Community parks.
- And even some adventure playgrounds, like the one in Irvine.
- Kids can play anytime anywhere – it doesn’t need to be a playground or even a park you pay to support.
OCPARKS.COM COUNTY REGIONAL AND WILDERNESS PARKS ANNUAL PASS (OR choose the COUNTY BEACH PARKING PASS)
Regular Daily Entrance Fee: $3-$5/day .
Annual Passes: $55/year
Do the Math: You need to visit 11 times at the $5 rate. That’s only about once a month to make it worthwhile. It’s especially valuable if you frequent Irvine Park Railroad or the OC Zoo.
Official information:
Regional Park locations:
Wilderness Park locations:
OR you spend $55 just to get access to these beaches:
Beach locations:
OCPARKS.COM ALL COUNTY PARKS AND BEACHES PARKING PASS
Oc Voting Cheat Sheet
This is the same as above, but you get access to ALL the regional, wilderness, and beach parks listed for $80 vs. the $55.
Openshift Oc Client Cheat Sheet
Regular Daily Entrance Fee: $3-$5/day.
Annual Passes: $80/year
Do the Math: You need to visit 16 times at the $5 rate. That’s only a bit more than once a month to make it worthwhile.
Official information:
Oc Cli Cheat Sheet
ANNUAL CALIFORNIA STATE PARKS – CA EXPLORER VEHICLE DAY USE PASS
Hourly: $15.00/daily.
Annual Passes: $195/year.
Do the Math: You need to visit more than 13 days a year to make it worthwhile. That’s only a little more than 1x per month. Here’s a big post about 3 Ways to Make Your Investment in California State Parks More Affordable with ideas for when you want to make this your Year of the State Park!
Get details on these pages:
CITY OF NEWPORT BEACH ANNUAL PARKING PASS
Hourly: $2.55/hour or $25.60/day during summer months – but rates can be less during off-peak season.
Annual Passes: $179.75/year (but less if you purchase Oct-Dec only)
Do the Math: You need to spend around 71 hours at the beach per year – or about 12 six hour days at the beach.
Official information:
Permit basically covers:
- Lots near Balboa Pier and on Newport Peninsula
- Includes Corona del Mar beach lots (NOT included in CA State Beach pass – even though it’s a state beach it’s run by the city)

CITY OF SAN CLEMENTE METERED PARKING PERMITS
Hourly: $1.50/hour unless you can find free street parking.
Annual Passes: $50/year resident or $100/year non-resident.
Do the Math: You need to spend more than 33 hours at the beach per year for residents or 66 hours for non-residents.
Official information:
Permit basically covers:
- Camino Capistrano
- North Beach
- Linda Lane
- Parque Del Mar/Pier Bowl
- Esplanade/T-Street
- Calafia (on street near State Park entrance)
You need a STATE parks pass for Calafia at San Clemente State Beach and Trestles.
CITY OF HUNTINGTON BEACH
Hourly: $1.50/hour or $15 flat during spring/summer.
Annual Passes: $150/year.
Do the Math: You need to spend 10 days or more days at the beach per year to make it worthwhile.

Official information:
According to the City of Huntington Beach website reports the pass covers:
- City beach parking lots from Beach Boulevard to the pier,
- the Pier Plaza “Pay & Display” lots at 6th Street,
- parking meters along PCH and Beach Boulevard,
- meter lots between Goldenwest Street and Seapoint Street “Dog Beach” area,
- parking lot adjacent to the Warner Avenue Fire Station and boat launch
- and at the Main Promenade Parking Structure (200 Main Street).
You need a state parks pass for the Magnolia/PCH entrance to the State Beach. Here is the state parks brochure on Huntington Beach State Beach and Bolsa Chica State Beach.

Oc Cheat Sheet
