Opinionated and effortless infrastructure and application management
okctl
- Opinionated and effortless infrastructure and application management
To download the latest release, run the command matching your operating system:
# Linux
curl --silent --location "https://github.com/oslokommune/okctl/releases/latest/download/okctl_$(uname -s)_amd64.tar.gz" | tar xz -C /tmp
sudo mv /tmp/okctl /usr/local/bin
# macOS
brew tap oslokommune/tap
brew install oslokommune/tap/okctl
The following is a guide for how to create an environment that contains the elements described in Compare and contrast.
Go to github.com/oslokommune and create a new private or internal git repository. No credentials are stored in this repository, we want it private as a precaution until we are certain it is safe to have it set as public.
:information_source: This repository will be used by okctl to store infrastructure-as-code, which means files containing various configuration for your up-and-coming cluster.
Now, run:
# Clone the repository you just made
$ git clone [email protected]:oslokommune/<the new repository>.git
$ cd <the new repository>
A "cluster" is a Kubernetes cluster with many addons and integrations, creating a production grade environment as described in Functionality.
You will soon be running okctl apply cluster
, which will ask you for the following information:
# Scaffold a cluster. Format:
okctl scaffold cluster -f cluster.yaml
# <edit cluster.yaml>
okctl apply cluster -f cluster.yaml
Follow the instructions.
When done, verify that you have a working cluster by running
$ okctl venv -c cluster.yaml
$ kubectl get service
The last command should show something like
NAME TYPE CLUSTER-IP EXTERNAL-IP PORT(S) AGE
kubernetes ClusterIP 10.100.0.1 <none> 443/TCP 1h
# Get help for any command
$ okctl --help
# Run a sub shell with environment variables from the above command and a custom command prompt (PS1)
$ okctl venv -c cluster.yaml
# Delete the cluster
$ okctl delete cluster -c cluster.yaml
The core cluster is up and running, and we are currently working on building a seamless experience on top of this cluster with integrations for common functionality:
The intended purpose of okctl
is to be an opinionated solver of infrastructure problems, this includes setting up CI/CD pipelines et al.
The following table is not present to determine what tool is better or worse, but rather how these tools compare to okctl
and the problems we are focused on solving.
okctl | eksctl | kubectl | serverless.tf | |
---|---|---|---|---|
Defines a CI/CD scheme | ✅ | ❌ | ❌ | ❌ |
Creates a Kubernetes cluster | ✅ | ✅ | ❌ | ❌ |
Facilitates with application creation | ✅ | ❌ | ❌ | ✅ |
Integrates with Github (actions, packages, oauth) | ✅ | ❌ | ❌ | ❌ |
Sets up monitoring | ✅ | ❌ | ❌ | ❌ |
We have begged, borrowed and stolen various ideas from the following CLIs: