Skip to main content
Redhat Developers  Logo
  • AI

    Get started with AI

    • Red Hat AI
      Accelerate the development and deployment of enterprise AI solutions.
    • AI learning hub
      Explore learning materials and tools, organized by task.
    • AI interactive demos
      Click through scenarios with Red Hat AI, including training LLMs and more.
    • AI/ML learning paths
      Expand your OpenShift AI knowledge using these learning resources.
    • AI quickstarts
      Focused AI use cases designed for fast deployment on Red Hat AI platforms.
    • No-cost AI training
      Foundational Red Hat AI training.

    Featured resources

    • OpenShift AI learning
    • Open source AI for developers
    • AI product application development
    • Open source-powered AI/ML for hybrid cloud
    • AI and Node.js cheat sheet

    Red Hat AI Factory with NVIDIA

    • Red Hat AI Factory with NVIDIA is a co-engineered, enterprise-grade AI solution for building, deploying, and managing AI at scale across hybrid cloud environments.
    • Explore the solution
  • Learn

    Self-guided

    • Documentation
      Find answers, get step-by-step guidance, and learn how to use Red Hat products.
    • Learning paths
      Explore curated walkthroughs for common development tasks.
    • Guided learning
      Receive custom learning paths powered by our AI assistant.
    • See all learning

    Hands-on

    • Developer Sandbox
      Spin up Red Hat's products and technologies without setup or configuration.
    • Interactive labs
      Learn by doing in these hands-on, browser-based experiences.
    • Interactive demos
      Click through product features in these guided tours.

    Browse by topic

    • AI/ML
    • Automation
    • Java
    • Kubernetes
    • Linux
    • See all topics

    Training & certifications

    • Courses and exams
    • Certifications
    • Skills assessments
    • Red Hat Academy
    • Learning subscription
    • Explore training
  • Build

    Get started

    • Red Hat build of Podman Desktop
      A downloadable, local development hub to experiment with our products and builds.
    • Developer Sandbox
      Spin up Red Hat's products and technologies without setup or configuration.

    Download products

    • Access product downloads to start building and testing right away.
    • Red Hat Enterprise Linux
    • Red Hat AI
    • Red Hat OpenShift
    • Red Hat Ansible Automation Platform
    • See all products

    Featured

    • Red Hat build of OpenJDK
    • Red Hat JBoss Enterprise Application Platform
    • Red Hat OpenShift Dev Spaces
    • Red Hat Developer Toolset

    References

    • E-books
    • Documentation
    • Cheat sheets
    • Architecture center
  • Community

    Get involved

    • Events
    • Live AI events
    • Red Hat Summit
    • Red Hat Accelerators
    • Community discussions

    Follow along

    • Articles & blogs
    • Developer newsletter
    • Videos
    • Github

    Get help

    • Customer service
    • Customer support
    • Regional contacts
    • Find a partner

    Join the Red Hat Developer program

    • Download Red Hat products and project builds, access support documentation, learning content, and more.
    • Explore the benefits

Four creative ways to create an OpenShift/Kubernetes dev environment

<p>&nbsp;</p> <quillbot-extension-portal></quillbot-extension-portal>

October 11, 2016
Rafael Benevides
Related topics:
ContainersDevOpsLinuxKubernetes
Related products:
Red Hat Enterprise LinuxRed Hat OpenShift Container Platform

    Developers have a lot of choices when deciding how to start using OpenShift and Kubernetes locally --- without going through a native OS installation.

    We all need to have a development environment as close as possible to production (to prevent defects caused by environmental differences), but ideally we need to do this without spending a lot of time to setup and a lot of computational resources (cpu, memory and disk space). This post will present four alternatives to create a local OpenShift cluster easily.

    1 - oc cluster up

    There's a new feature that was introduced in OpenShift Origin 1.3 and Enterprise 3.3 that has become one of my favorite ways to start an OpenShift cluster. This option downloads a containerized version of OpenShift and execute it locally.

    Given that it executes OpenShift in a container, the only requirement needed, besides the oc 1.3.x+ command itself, is to have a docker daemon executing (locally or via docker-machine) and the following command will do the rest:

    $ oc cluster up --create-machine=true   \
                    --use-existing-config   \
                    --host-data-dir=/mydata \
                    --metrics=true

    "oc cluster up" also allows you to try Openshift Container Platform (previously called OpenShift Enterprise)  by specifying Red Hat registry and the proper image and version. Example:

    $ oc cluster up --create-machine=true   \
                    --use-existing-config   \
                    --host-data-dir=/mydata \
                    --metrics=true          \
                    --image=registry.access.redhat.com/openshift3/ose \
                    --version=latest

    Both methods creates a ~/.kube/config file that allows you also to use the kubectl command to interact with the Kubernetes cluster that runs together with OpenShift.

     

    2 - Minishift

    Minikube is a tool created by the Kubernetes community that "runs a single-node Kubernetes cluster inside a VM on your laptop for users looking to try out Kubernetes or develop with it day-to-day" 

    To provide a seamless experience to people who are already familiarized with Minikube, Jimmi Dyson from Red Hat, created a project  called Minishift.

    Just like Minikube, it uses drivers (xhyve, hyperv, virtualbox,  vmware fusion, and kvm) to create a virtual machine. Minishift allows you to specify cpu, memory, disk and some other customization parameters for the virtualized Openshift daemon. Example:

    $ minishift start --cpus=2 --deploy-router=true --memory=2048

    Once your OpenShift cluster is running, you can run "$ oc minshift console" and the OpenShift console will be opened in the default browser.

     

    3 - All-In-One Virtual Machine

    The OpenShift community also provides a "All-In-One Virtual Machine".  It's essentially a Vagrant file that will automatically download and execute a VirtualBox VM image. Two commands and you will have an Openshift cluster running:

    $ vagrant init openshift/origin-all-in-one
    
    $ vagrant up --provider=virtualbox

    Note that  this option only supports VirtualBox at this moment.

     

    4 - CDK / ADB

    CDK means Container Development Kit. Just like the "All-In-One Virtual Machine", it's a Vagrant file that support different providers (VirtualBox, HyperV and libvirt). The provided image runs OpenShift Enterprise (OSE) running on  Red Hat Enterprise Linux (RHEL) with a no-cost developer subscription. It can be very useful for developers that want to have your development environment as close as possible to the production environment.

    You can download CDK from https://developers.redhat.com/products/cdk/download. You can use your Red Hat Developers portal registration to have access to this product. If you are not yet registered, don't loose more time and register now.

    Once you have all the requirenments of CDK installed (Vagrant, the virtualization provider and its proper image), just execute "vagrant up" and you will have OpenShift Enterprise running in a VM.

    $ vagrant up
    

    Update: CDK is based on the upstream project called ADB (Atomic Developer Bundle)  that allows you to get any version of OpenShift Origin.

    Update: Windows users can automate the installation of a complete Development environment through Red Hat Development Suite. If you have a brand new Windows machine, the Red Hat Development Suite will not only install CDK/OpenShift and its dependencies (vagrant and VirtualBox), but it will also install OpenJDK, JBoss Development Studio (JBDS).

    Conclusion

    Among these options, CDK and "oc cluster up"  are the only two options that allow the developer to execute the enterprise version of Openshift.

    Once the developers have a local cluster running with OpenShift, they can use the kubectl command line to interact with the Kubernetes API Server managed by OpenShift, or use the oc command line to have full access to all features provided by OpenShift like Role based access control (RBAC), Source to image (S2I), Security context constraints (SCC), ImageStreams, builds, etc.

    OpenShift also provides an awesome web console that allows Kubernetes users to graphically visualize and manage almost all cluster objects.

    With all these options, developers are encouraged to choose one method and run a an application inside OpenShift to try it. Read the "Creating an Application Using the CLI" chapter and see how it's easy to deploy an application.

    UPDATE (5 - Fabric8 plugin)

    If you are a Java Developer, I would like to suggest the blog post:  Installing Kubernetes from Copenhagen Airport in one command from Claus Ibsen. The blog post shows how a simple Maven command can be used to create a Kubernetes/OpenShift cluster for you.

    mvn io.fabric8:fabric8-maven-plugin:3.1.62:cluster-start

    For more information, you can read the plugin documentation provided by  the Fabric8 community.

    About the author:

    Rafael Benevides is a Director of Developer Experience at Red Hat. With many years of experience in several fields of the IT industry, he helps developers and companies all over the world to be more effective in software development. Rafael considers himself a problem solver who has a big love for sharing. He is a member of Apache DeltaSpike PMC - a Duke’s Choice Award winner project, and a speaker in conferences like JavaOne, Devoxx, TDC, DevNexus and many others. Twitter | LinkedIn | rafabene.com

    Last updated: February 24, 2025

    Recent Posts

    • Red Hat Enterprise Linux 10.2 and 9.8: Top features for developers

    • What GPU kernels mean for your distributed inference

    • Debugging image mode with Red Hat OpenShift 4.20: A practical guide

    • EvalHub: Because "looks good to me" isn't a benchmark

    • SQL Server HA on RHEL: Meet Pacemaker HA Agent v2 (tech preview)

    Red Hat Developers logo LinkedIn YouTube Twitter Facebook

    Platforms

    • Red Hat AI
    • Red Hat Enterprise Linux
    • Red Hat OpenShift
    • Red Hat Ansible Automation Platform
    • See all products

    Build

    • Developer Sandbox
    • Developer tools
    • Interactive tutorials
    • API catalog

    Quicklinks

    • Learning resources
    • E-books
    • Cheat sheets
    • Blog
    • Events
    • Newsletter

    Communicate

    • About us
    • Contact sales
    • Find a partner
    • Report a website issue
    • Site status dashboard
    • Report a security problem

    RED HAT DEVELOPER

    Build here. Go anywhere.

    We serve the builders. The problem solvers who create careers with code.

    Join us if you’re a developer, software engineer, web designer, front-end designer, UX designer, computer scientist, architect, tester, product manager, project manager or team lead.

    Sign me up

    Red Hat legal and privacy links

    • About Red Hat
    • Jobs
    • Events
    • Locations
    • Contact Red Hat
    • Red Hat Blog
    • Inclusion at Red Hat
    • Cool Stuff Store
    • Red Hat Summit
    © 2026 Red Hat

    Red Hat legal and privacy links

    • Privacy statement
    • Terms of use
    • All policies and guidelines
    • Digital accessibility

    Chat Support

    Please log in with your Red Hat account to access chat support.