Acorn - Bringing Kubernetes to Developers
3 min read
When I initially learned about Kubernetes, I was amazed by its capabilities for developers. I believed I could build my own cloud, but as I got farther into it, I discovered how difficult it is to solve all the challenges and that sometimes there are hundreds of ways to do the same thing.
I need a solution to deploy my application to the cloud, possibly several clouds or edges. Kubernetes can do it, but its complexity scares me.
Well, enter Acorn. Acorn removed the complexity by providing a sane default and requiring me to run the application consistently from my laptop across the cloud.
This blog will demonstrate how Acorn simplifies Kubernetes and gives a uniform way to build, package, and run apps on any Kubernetes runtime.
Let us compare and contrast how to deploy an application using Kubernetes and Acorn to better understand Acorn.
Before you can deploy and make a simple application available for use, you need to know about pods, deployment, and services.
Acorn takes advantage of all of them, but hides the details from developers by hiding behind abstractions.
Here we go to see the difference.
That's only the beginning; returning to my dream, I should be able to execute the application on my local machine, in the cloud, or anywhere Kubernetes is running.
Awesome, Kubernetes allows you to run the application on any Kubernetes, but there is no standard way to package, store, and run the application. Well, I am aware of Helm, but Helm is simply another Yaml Soup with bells and whistles.
Hence, let us begin by installing Acorn to see how it facilitates application deployment.
You can install the acorn and Acorn CLI in windows using a package manager called Scoop
scoop install acorn
You can read about other platforms on this page. This command installs Acorn on your local cluster, and it can do it on any cluster too.
You can run the acorn using
acorn run -n numbers . But what If I want to distribute the application so that It can run anywhere
You can build the application using the
acorn build -t
. This should sound familiar to any docker command users.
It packages the files in the Open Container Interface project and marks them in the registry. In this scenario, I'm using the GitHub container registry (GHCR), but this can be done with any repository or local Docker as well.
Once you have built the application, You can push the application using
acorn push ghcr.io/user/number
This makes your application available to the world with a single command.
Now you can run the application
acorn run --name my-app
If you've used Docker or Docker compose, you'll recognize this workflow. Acorn leverages simplicity to drive a huge change in Kubernetes, and you can learn more about it at https://www.acorn.io/. It is currently in version 0.6, and they have simplified a number of models that were previously difficult to achieve with Kubernetes. I am convinced that the project will be among the best in its field.
I'll be providing a step-by-step tutorial on operating a larger application using Acorn in the coming days, as well as deploying to other cloud providers. I'm going on a fun project. To discover more about my experiences, follow me or subscribe.
Learn Kubernetes in 30 days of Lunch - https://www.manning.com/books/learn-kubernetes-in-a-month-of-lunches
Kubernetes in production: https://www.manning.com/liveprojectseries/kubernetes-in-production-ser
The Docker I used in the blog post was from the Learn Kubernetes book, which I highly recommend anyone read. Also follow elton stoneman to learn more - https://twitter.com/EltonStoneman
Acorn Twitter : https://twitter.com/acornlabs
You can join their slack to discuss more about it : https://acorn-users.slack.com/ssb/redirect
Did you find this article valuable?
Support satish by becoming a sponsor. Any amount is appreciated!