Heptio Contour on the Canonical Distribution of Kubernetes

Konstantinos Tsakalozos

Konstantinos Tsakalozos

on 1 November 2017

I read the Hacker News post Heptio Contour and I thought “Cool! A project from our friends at Heptio, lets see what they got for us”. I wont lie to you, at first I was a bit disappointed because there was no special mention for Canonical Distribution of Kubernetes (CDK) but I understand, I am asking too much :). Let me cover this gap here.

Deploy CDK

To deploy CDK on Ubuntu you need to just do a:

sudo snap install conjure-up --classic
conjure-up kubernetes-core

Using ‘kubernetes-core’ will give you a minimal k8s cluster — perfect for our use case. For a larger, more robust cluster, try ‘canonical-kubernetes.’

Deploy Contour and Demo App

CDK already comes with an ingress solution so you need to disable it and deploy Contour. Here we also deploy the demo kuard application:

> juju config kubernetes-worker ingress=false
> kubectl --kubeconfig=/home/jackal/.kube/config apply -f http://j.hept.io/contour-deployment-norbac
> kubectl --kubeconfig=/home/jackal/.kube/config apply -f http://j.hept.io/contour-kuard-example

Get Your App

The Contour service will be on a port that (depending on the cloud you are targeting) might be closed, so you need to open it before accessing kuard:

> kubectl --kubeconfig=/home/jackal/.kube/config get service -n heptio-contour  contour -o wide                                                                                                        
contour LoadBalancer <pending> 80:31226/TCP 2m app=contour
juju run --application kubernetes-worker open-port 31226

And here it is running on AWS:

Instead of opening the ports to the outside world you could set the right DNS entries. However, this is specific to the cloud you are deploying to.

As the Contour README says “On AWS, create a CNAME record that maps the host in your Ingress object to the ELB address.”
“If you have an IP address instead (on GCE, for example), create an A record.”
For a localhost deployment your ports should not be blocked and you can fake a DNS entry by editing /etc/hosts.

Thank you Heptio. Keep it up!


Talk to us today

Interested in running Ubuntu Desktop in your organisation?

Sign up for email updates

Choose the topics you're interested in


Related posts


Event Information Date: March 27 – 29 City/State: San Jose, CA Location: San Jose McEnery Convention Center Booth: #1227 GTC is the premier AI and deep learning conference, providing unparalleled training, industry insights, and…

LXD weekly status #36

Introduction This past week we’ve been working very hard to land all those last few bits ahead of us tagging a number of 3.0.0.beta1 releases of all our repositories. We’re now waiting for a few last bits to land, including LXD clustering…

LXD Weekly Status #35

Introduction This past week we’ve been focusing on a number of open pull requests, getting closer to merging improvements to our storage volume handling, unix char/block devices handling and the massive clustering branch that’s been…