Creating and accessing a Kubernetes cluster on OpenStack, part 1: Create the cluster
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
Create the Kubernetes cluster with MuranoThe 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 appThe first step is to get the actual Kubernetes cluster app, which is available on the OpenStack Foundation's Community App Catalog. Follow these steps:
- Log into Horizon and go to Applications->Manage->Packages.
- 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.
- Back in Horizon, click Import Package.
- For the Package Source, choose URL, and add the URL from step 2, then click Next:
- 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:
- Once they're finished saving, you'll see that their status has changed to Active:
Create the Kubernetes Murano environment
- In Horizon, choose Applications->Browse. You should see the new app under Recent Activity.
- To make things simple, click the Quick Deploy button.
- Keep all the defaults, then scroll down and click Next.
- Choose the Debian image and click Create.
- Horizon will automatically take you to the new environment. At this point, it's been created, but not deployed:
- 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:
- When deployment is complete, you'll see the status change to Ready:
- All that's great, but where do you access the cluster? Click Latest Deployment Log to see the IP address assigned to the cluster:
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.