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.
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.’
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
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
NAME TYPE CLUSTER-IP EXTERNAL-IP PORT(S) AGE SELECTOR
contour LoadBalancer 10.152.183.201 <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.
Interested in running Ubuntu Desktop in your organisation?
London, UK, 18th October 2018; Canonical today announced the release of Ubuntu 18.10, focused on multi-cloud deployments, AI software development, a new community desktop theme and richer snap desktop integration. “Ubuntu is now the…
Artificial intelligence and machine learning (AI/ML) have stolen the hearts and minds of the public, the press and businesses. The technological advances in the field have helped to transport AI from the world of fiction, into something…
This article on Kubernetes & vSphere integration originally appeared at Kevin Monroe’s blog Background Recently, Juju began supporting cloud-native features via “integrator” charms (e.g.: aws-integrator, gcp-integrator,…