Around 6 months ago I gave a small presentation on how to use Go to develop tools and applications for k8s, as a demostration on the capabilities of go I made a small program to create batch jobs with just one command. I took the code and made a some changes to it, these changes include some other functionality like delete and run (an all in one command) and some changes in the CLI, and thus uxmal was born.
uxmal is a CLI program to manage jobs in k8s, it is programmed in golang and its main use is to test apps, permissions, programs or images in k8s, this is not a CD tool, primary use is for troubleshooting.
uxmal consist of 5 subcommands.
-
create it takes 3 parameters, name of the job, image to use and command to execute, and creates a simple batch job that will execute the given command.
uxmal create --name myJob --img ubuntu --cmd "ls -ltr"
-
status It prints the status of the job, basically if it was successful, failed or running.
uxmal status --name myJob
-
logs this will print any logs generated by the command specified.
uxmal logs --name myJob
-
run this subcommand is a combination of the last 3. it creates the job and is constantly checking the status of it, if the job was successful, it prints the generated logs.
uxmal run --name myJob --img ubuntu --cmd "ls -ltr"
-
delete Deletes a job given the name of it.
uxmal delete --name myJob
Unlike many other tools, uxmal is really simple to operate and manage jobs with it. There’s no need for yaml files or helm charts or any configuration whatsoever, just a simple command.
Downloads
ready to use for various platforms and several architectures. The first compiled binaries are available in the github page.
github.com/mental12345/uxmal/releases/tag/v1.0.0
Where does the name come from?
Uxmal is an ancient maya city located in Yucatán, México. The meaning of Uxmal, is three times built, in the same sense uxmal (the CLI tool) was also developed several times. Today Uxmal is a UNESCO World Heritage Site.
Next iterations and features.
The next features that I would like to develop is support for k8s cronjobs, in the same style as the jobs, obviously these comes with rewriting the CLI part in order to have more subcommands and flags.