Here’s a clean and well-structured table listing all the crc
commands along with their descriptions:
Command | Description |
---|---|
bundle | Manage CRC bundles (download, add, list bundles for OpenShift) |
cleanup | Undo system changes made by CRC setup (DNS, networking, etc.) |
completion | Generate the autocompletion script for bash, zsh, etc. |
config | Modify CRC configuration options (CPU, memory, etc.) |
console | Open the OpenShift Web Console in the default browser |
delete | Delete the CRC VM and cluster data |
help | Show help about any CRC command |
ip | Get the IP address of the running OpenShift cluster |
oc-env | Add the oc (OpenShift CLI) executable to your system PATH |
podman-env | Set environment variables to use podman with CRC |
setup | Set up system prerequisites for CRC (run before first use) |
start | Start the OpenShift cluster |
status | Display the current status of the OpenShift cluster |
stop | Stop the running cluster instance |
version | Print CRC version, OpenShift version, and bundle information |
Here’s a complete breakdown of each crc
command, including explanations and multiple practical examples for each. This will help you master the crc
CLI when working with your local OpenShift 4.x cluster.
crc
– Overview
CRC (CodeReady Containers) allows you to spin up a local single-node OpenShift 4 cluster ideal for testing and development. You run commands using:
crc <command> [flags]
1. crc start
Starts the local OpenShift cluster.
Usage:
crc start
Examples:
crc start --memory 12288 --cpus 4
Start the cluster with 12GB RAM and 4 CPUs.
crc start --log-level debug
Start with detailed logs for troubleshooting.
2. crc stop
Stops the running OpenShift cluster.
Usage:
crc stop
Examples:
crc stop
Gracefully stops the cluster, freeing up system resources.
3. crc delete
Completely deletes the CRC VM and data (non-reversible).
Usage:
crc delete
Examples:
crc delete --force
Forcefully delete CRC without confirmation prompt.
4. crc setup
Prepares your system for running CRC (sets DNS, network, etc.).
Usage:
crc setup
Examples:
crc setup
Run this once before the first
crc start
.
5. crc status
Shows the current state of the CRC VM and OpenShift cluster.
Usage:
crc status
Examples:
crc status --log-level debug
View detailed status info for debugging.
6. crc console
Opens the OpenShift web console in your default browser.
Usage:
crc console
Examples:
crc console --credentials
Displays login credentials along with opening the console.
7. crc config
View and modify CRC config settings.
Usage:
crc config <subcommand>
Examples:
crc config view
See all current config settings.
crc config set memory 8192
crc config set cpus 4
Set RAM and CPU for the cluster.
crc config unset memory
Remove a previously set value.
8. crc version
Displays CRC, OpenShift, and bundle versions.
Usage:
crc version
Examples:
crc version
Useful for support or checking compatibility.
9. crc ip
Gets the IP address of the running cluster.
Usage:
crc ip
Examples:
export CRC_IP=$(crc ip)
Store the IP in a shell variable for use in scripts.
10. crc oc-env
Outputs environment variables to use oc
CLI.
Usage:
crc oc-env
Examples:
eval $(crc oc-env)
Sets up the shell so you can run
oc
commands directly.
11. crc podman-env
Sets up environment for podman
CLI to work with CRC.
Usage:
crc podman-env
Examples:
eval $(crc podman-env)
Sets environment variables to use
podman
with the CRC container runtime.
12. crc cleanup
Reverts changes CRC made to your system (use cautiously).
Usage:
crc cleanup
Examples:
crc cleanup
Removes system DNS, network, and other tweaks made by CRC setup.
13. crc bundle
Manage OpenShift bundles (images and VM base files).
Usage:
crc bundle <subcommand>
Examples:
crc bundle list
List available bundles.
crc bundle add ~/Downloads/crc_libvirt_4.13.9.crcbundle
Add a new bundle manually.
14. crc completion
Generate shell completion scripts for bash, zsh, etc.
Usage:
crc completion bash
Examples:
crc completion zsh > ~/.crc-completion.sh
Then source the file in your
.zshrc
.
15. crc help
Displays help for any command.
Usage:
crc help
crc <command> --help
Examples:
crc help start
Detailed help for the
start
command.
Flags (Global)
--log-level
(debug, info, warn, error)--help
– Show help for commands
Would you like me to generate a cheat sheet image or step-by-step beginner tutorial for this?
I’m a DevOps/SRE/DevSecOps/Cloud Expert passionate about sharing knowledge and experiences. I am working at Cotocus. I blog tech insights at DevOps School, travel stories at Holiday Landmark, stock market tips at Stocks Mantra, health and fitness guidance at My Medic Plus, product reviews at I reviewed , and SEO strategies at Wizbrand.
Please find my social handles as below;
Rajesh Kumar Personal Website
Rajesh Kumar at YOUTUBE
Rajesh Kumar at INSTAGRAM
Rajesh Kumar at X
Rajesh Kumar at FACEBOOK
Rajesh Kumar at LINKEDIN
Rajesh Kumar at PINTEREST
Rajesh Kumar at QUORA
Rajesh Kumar at WIZBRAND