Just behind the Ketch 0.6 Release, Ketch is now available for the first time in the Civo Marketplace. If you are unfamiliar with Civo, Civo is a Kubernetes based cloud provider allowing for the rapid creation of Kubernetes clusters. No matter where you are in the Kubernetes journey, the pairing of Civo and Ketch can allow you to fast-track your Kubernetes learnings or further your developer experience and guardrails with Kubernetes. Feel free to watch the video and/or follow along in the blog.
The first step to get started is to sign up for a Civo account. Once signed up and signed in, would be a good idea to install the Civo CLI so you can wire the kubectl context with ease.
Ketch does not require an ingress controller to be installed but does require one to deploy an application. By default, Civo at the time of this blog will install a Rancher build [1.7.x] of Traefik which is incompatible with Ketch. When spinning up a new Civo cluster, can unselect the default Traefik for now and select a compatible ingress controller [e.g Traefik 2, Istio, or Nginx]. In this example, we will use Nginx.
In the Civo Management UI, create a new Kubernetes cluster. Can give a name such as “firstcivoketch”. To re-install a compatible ingress controller e.g Traefik can use Helm. This will require access to the Kubernetes API endpoint so can keep port 6443 open.
Scroll down and unselect the Default Traefik.
Next under the Architecture tab in the Marketplace, select Nginx.
You are now good to create the cluster. Once you click Create, in a few moments your Kubernetes cluster will be available. You are now ready to install and wire Ketch.
Installing and Wiring Ketch
To leverage Ketch, you will need to install the Ketch CLI on your local machine.
curl -s https://raw.githubusercontent.com/shipa-corp/ketch/main/install.sh | bash
Next you will need kubectl access to your Civo Kubernetes cluster. The easiest way is to inject the kubeconfig with the Civo CLI. If you don’t have kubectl on your local machine, you can use Homebrew to install it.
civo kubernetes config firstcivoketch --save kubectl config use-context firstcivoketch
Next you can get the Nginx Ingress Controller external IP.
kubectl get services -A
In this case, the external IP is 220.127.116.11. You can also validate this in the Civo Management UI.
You are now ready to install Ketch in the Civo Marketplace.
Back in your Cluster UI, head to your Cluster then Marketplace. In the “Management” tab, select Ketch.
Then click Install Apps and Ketch will be installed.
After a few moments, Ketch will show up in the Installed Applications section along with Cert Manager being installed automatically as a dependency.
Now you are ready for your first Ketch Framework and deployment.
Your First Ketch Deployment
Ketch works off a concept of Frameworks which are logical grouping of rules and policies. With a Framework, you can deploy your application to that Framework.
Adding a “dev” Framework using the Ketch CLI, wiring in your ingress endpoint running a similar command.
ketch framework add dev --ingress-service-endpoint 18.104.22.168 --ingress-type nginx
Now you can deploy an application to your Framework. You can submit another docker image if you would like.
ketch app deploy bulletinboard -k dev -i docker.io/shipasoftware/bulletinboard:1.0 ketch app list
Running ketch app list will expose the created address of your application.
Can head to the address and see your application up and running.
Congratulations on your first Civo and Ketch deployment!
Help Contribute to Ketch
We are always looking for contributors to help further Ketch’s capabilities and help everyone leverage Kubernetes. Can check out where we are thinking of taking Ketch. Take a look at our contributing guide and get a PR in, today.