Mirantis named a Challenger in 2024 Gartner® Magic Quadrant™ for Container Management  |  Learn More

< BLOG HOME

Creating and accessing a Kubernetes cluster on OpenStack, part 1: Create the cluster

Nick Chase - November 14, 2016
image
In honor of this week's Kubecon, we're bringing you information on how to get started with the Kubernetes container orchestration engine.  On Monday we explained what Kubernetes is. Now let's show you how to actually use it.
In this three part series, we'll take you through the steps to run an Nginx container on Kubernetes over OpenStack, including:
  • Deploying a Kubernetes cluster with Murano
  • Configuring OpenStack security to make a Kubernetes cluster usable from within OpenStack
  • Downloading and configuring the Kubernetes client
  • Creating a Kubernetes application
  • Running an application on Kubernetes
Let's get started.

Create the Kubernetes cluster with Murano

The first step is to get a cluster created. There are several ways to do that, but the easiest is to use a Murano Package. If you don't have Murano handy, you can get access to it in several ways, but the easiest is to deploy Mirantis OpenStack with Murano.

Import the Kubernetes cluster app

The first step is to get the actual Kubernetes cluster app, which is available on the OpenStack Foundation's Community App Catalog.  Follow these steps:
  1. Log into Horizon and go to Applications->Manage->Packages.
  2. Go to the Community App Catalog and choose Murano Apps -> Kubernetes Cluster to get the Kubernetes Cluster App.  You're looking for the URL for the package itself. In this case, that's http://storage.apps.openstack.org/apps/com.mirantis.docker.kubernetes.KubernetesCluster.zip.
  3. Back in Horizon, click Import Package.
  4. For the Package Source, choose URL, and add the URL from step 2, then click Next:import murano package
  5. Murano will automatically start downloading the images it needs, then mark them for use with Murano; you won't have to do anything there but click Import and wait. To see the images downloading, choose Project->Images. If the images didn't already exist, you'll see them Saving:saving images
  6. Once they're finished saving, you'll see that their status has changed to Active:available images
Next, we'll deploying an environment that includes the Kubernetes master and minions.

Create the Kubernetes Murano environment

  1. In Horizon, choose Applications->Browse. You should see the new app under Recent Activity.recent activity
  2. To make things simple, click the Quick Deploy button.quick deploy
  3. Keep all the defaults, then scroll down and click Next.quick deploy2
  4. Choose the Debian image and click Create.create
  5. Horizon will automatically take you to the new environment. At this point, it's been created, but not deployed:not deployed
  6. You can add other things if you want, but for now, click Deploy This Environment. Goes through a number of steps, creating VMs, networks, security groups, and so on. You can see that on the main environment page, or by checking the logs:deploying
  7. When deployment is complete, you'll see the status change to Ready:deployment ready
  8. All that's great, but where do you access the cluster?  Click Latest Deployment Log to see the IP address assigned to the cluster:deployment logs
Now, you'll notice that there are references to (in this case) 4 different nodes: gateway-1, kube-1, kube-2, and kube-3.  You can see these instances if you go to Project->Compute->Instances.  Notice that the Kubernetes API is running on kube-1.
In part 2, you'll actually access the Kubernetes cluster.
Sound interesting? If you live in Austin, Texas, you're in luck; we'll be presenting Kubernetes 101 at OpenStack Austin Texas on November 15, and at the Cloud Austin meetup on Nov 16, or you can dive right in and sign up for Mirantis' Kubernetes and Docker Boot Camp.

Choose your cloud native journey.

Whatever your role, we’re here to help with open source tools and world-class support.

GET STARTED

Join Our Exclusive Newsletter

Get cloud-native insights and expert commentary straight to your inbox.

SUBSCRIBE NOW