Skip to main content
Redhat Developers  Logo
  • Products

    Platforms

    • Red Hat Enterprise Linux
      Red Hat Enterprise Linux Icon
    • Red Hat AI
      Red Hat AI
    • Red Hat OpenShift
      Openshift icon
    • Red Hat Ansible Automation Platform
      Ansible icon
    • View All Red Hat Products

    Featured

    • Red Hat build of OpenJDK
    • Red Hat Developer Hub
    • Red Hat JBoss Enterprise Application Platform
    • Red Hat OpenShift Dev Spaces
    • Red Hat OpenShift Local
    • Red Hat Developer Sandbox

      Try Red Hat products and technologies without setup or configuration fees for 30 days with this shared Openshift and Kubernetes cluster.
    • Try at no cost
  • Technologies

    Featured

    • AI/ML
      AI/ML Icon
    • Linux
      Linux Icon
    • Kubernetes
      Cloud icon
    • Automation
      Automation Icon showing arrows moving in a circle around a gear
    • View All Technologies
    • Programming Languages & Frameworks

      • Java
      • Python
      • JavaScript
    • System Design & Architecture

      • Red Hat architecture and design patterns
      • Microservices
      • Event-Driven Architecture
      • Databases
    • Developer Productivity

      • Developer productivity
      • Developer Tools
      • GitOps
    • Automated Data Processing

      • AI/ML
      • Data Science
      • Apache Kafka on Kubernetes
    • Platform Engineering

      • DevOps
      • DevSecOps
      • Ansible automation for applications and services
    • Secure Development & Architectures

      • Security
      • Secure coding
  • Learn

    Featured

    • Kubernetes & Cloud Native
      Openshift icon
    • Linux
      Rhel icon
    • Automation
      Ansible cloud icon
    • AI/ML
      AI/ML Icon
    • View All Learning Resources

    E-Books

    • GitOps Cookbook
    • Podman in Action
    • Kubernetes Operators
    • The Path to GitOps
    • View All E-books

    Cheat Sheets

    • Linux Commands
    • Bash Commands
    • Git
    • systemd Commands
    • View All Cheat Sheets

    Documentation

    • Product Documentation
    • API Catalog
    • Legacy Documentation
  • Developer Sandbox

    Developer Sandbox

    • Access Red Hat’s products and technologies without setup or configuration, and start developing quicker than ever before with our new, no-cost sandbox environments.
    • Explore Developer Sandbox

    Featured Developer Sandbox activities

    • Get started with your Developer Sandbox
    • OpenShift virtualization and application modernization using the Developer Sandbox
    • Explore all Developer Sandbox activities

    Ready to start developing apps?

    • Try at no cost
  • Blog
  • Events
  • Videos

Four creative ways to create an OpenShift/Kubernetes dev environment

 

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

Share:

    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

    • How to enable Ansible Lightspeed intelligent assistant

    • Why some agentic AI developers are moving code from Python to Rust

    • Confidential VMs: The core of confidential containers

    • Benchmarking with GuideLLM in air-gapped OpenShift clusters

    • Run Qwen3-Next on vLLM with Red Hat AI: A step-by-step guide

    Red Hat Developers logo LinkedIn YouTube Twitter Facebook

    Products

    • Red Hat Enterprise Linux
    • Red Hat OpenShift
    • Red Hat Ansible Automation Platform

    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
    © 2025 Red Hat

    Red Hat legal and privacy links

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

    Report a website issue