Over the next couple of years some users of nmesos might decide to move off Mesos and switch to Kubernetes.
nmesos-k8s is a tool that uses the same configs as nmesos,
but deploys the service to Kubernetes.
- Clone the repo
- Run
make build- Note: You need to use
ruby 3.0.0or higher. You should rungem update --systemfirst
- Note: You need to use
- Move
./nmesos-k8sto a directory on your path (e.g.~/.local/bin)
With asdf
First you need to run ...
asdf plugin add nmesos-k8s https://github.com/ninesstack/nmesos-k8s
Afterwards you can run ...
asdf list-all nmeos-k8s
asdf install nmesos-k8s <version>
asdf global nmesos-k8s <version>
... to install whatever version(s) you want.
Note: To get/see the latest version(s) you might need to run
asdf plugin update nmesos-k8s to refresh the plugin.
Note: For this to work you need to have [gh][] installed.
Run the cli with nmesos-k8s. It works more less identically to
nmesos in terms of the commands and supplied arguments. There are
two notable differences:
- You must supply
-sor--service-filein front of the service name - You must use
--no-dry-runin the standard way, rather than the non-standard--dry-run falsethatnmesosuses.
Run nmesos-k8s to see all available options.
releaseis for both deployment and any other changes that need to be made to a service, including scalingdeletewill remove the service and all associated resourcesprintgenerates the full Kubernetes manifest that would be submitted to the API
There are a few settings that are supported by nmesos-k8s that are
specific to K8s. These will not interfere with nmesos operation on
Mesos. They are the following:
-
kubernetes_unfreeze: This can overridedeploy_freezeagainst a Kubernetes cluster. It is used to allow a service that is not allowed to be deployed to Mesos to be deployes to K8s anyway. The tool still respectsdeploy_freezeunless it is overridden in this manner. It is not in thek8sconfig section so that it can sit in the config right next todeploy_freeze. This is so that humans can try to reason about it. -
k8sconfig section. This supports the following:namespace: enables a specific namespace to be used for this serviceservice_account_name: sets the service account to a specific account