https://github.com/onmetal/kolm
kolm - Kubernetes on your local machine
https://github.com/onmetal/kolm
development kubernetes local
Last synced: 4 months ago
JSON representation
kolm - Kubernetes on your local machine
- Host: GitHub
- URL: https://github.com/onmetal/kolm
- Owner: onmetal
- License: apache-2.0
- Created: 2022-05-04T10:22:20.000Z (about 4 years ago)
- Default Branch: main
- Last Pushed: 2023-03-02T16:03:54.000Z (over 3 years ago)
- Last Synced: 2025-03-05T01:35:28.619Z (over 1 year ago)
- Topics: development, kubernetes, local
- Language: Go
- Homepage:
- Size: 308 KB
- Stars: 6
- Watchers: 3
- Forks: 0
- Open Issues: 13
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# kolm - Kubernetes on your local machine
[](https://github.com/onmetal/kolm/actions/workflows/test.yml)
[](https://makeapullrequest.com)
[](LICENSE)
kolm is a tool for running a Kubernetes 'cluster' consisting of an `etcd` and a `kube-apiserver` on your local
machine. The primary use of kolm is for testing aggregated api servers, as debugging aggregated api servers
in-cluster is a complex and troublesome task.
> ⚠️ kolm is a *testing-only* tool. Practices employed in this tool are inherently unsafe and should
> never be used in production and is plumbing-only.
## Installation
To install kolm, simply run
```shell
go install github.com/onmetal/kolm/cmd/kolm@latest
```
> 👆 For now, kolm also requires `etcd` and `kube-apiserver` to be on your path.
> This will change in the future with automated binary management but wasn't implemented
> in the initial scope.
## Usage
### Controlling your `api`s
kolm has the primary type called `api`. An `api` is the previously mentioned 'cluster' with only a
`kube-apiserver` and `etcd`.
The create such an `api`, simply run
```shell
kolm create api
```
This will create an `api` called `kolm`. Your kubeconfig will be modified to contain an entry pointing
towards the new `kolm` cluster.
Once created, you can now start the `api`:
```shell
kolm start api
```
This runs the `etcd` and `kube-apiserver`. Both are running until terminated or the user interrupts via
`ctrl-c`.
To remove an `api`, simply run
```shell
kolm delete api
```
All the previously described steps can also be done in a one-shot manner with:
```shell
kolm run api --rm
```
### Using your `api` with an aggregated api server
If you have an aggregated api server & its `APIService`s at hand, you can let them 'join' your `api`.
To do so, in a new terminal, first install your `APIService`s:
```shell
kolm apply apiservices
```
Then, start your api server with flags similar to the following:
```shell
\
--etcd-servers=$(kolm get etcd-address) \
--kubeconfig=$HOME/.kube/config \
--authentication-kubeconfig=$HOME/.kube/config \
--authorization-kubeconfig=$HOME/.kube/config \
--tls-private-key-file $(kolm get host-key) \
--tls-cert-file $(kolm get host-cert) \
--secure-port=6443 \
--feature-gates=APIPriorityAndFairness=false
```
After a short while, your api server should have joined the `api`.