An open API service indexing awesome lists of open source software.

https://github.com/bashtools/mok-docs

Documentation for mokctl.
https://github.com/bashtools/mok-docs

Last synced: 11 months ago
JSON representation

Documentation for mokctl.

Awesome Lists containing this project

README

          

# My Own Kind Documentation

Build verifiably conformant kubernetes multi-node clusters in containers.

## Documentation

The FAQ, integrating the Parser in your own project, and how `mokctl` was created are all in [Documentation](/docs/README.md).

## Contributing

All types of contributions are welcome, from giving this project a STAR, bug reports, success stories, feature requests, fixing typppos, correcting documentation, to coding. Also check the [CONTRIBUTING.md](/CONTRIBUTING.md) document.

## Try mokctl

Take note of the [Status](#status) below and the [Releases](https://github.com/mclarkson/my-own-kind/releases) page.

### Status

- stable version - not yet.

- development version - 0.8.10

| OS | Version | Terminal | Status | Notes |
| ------- | ------- | -------------- | --------------------------------- | ------------------------------------- |
| Ubuntu | 18.04.4 | gnome terminal | works | install as below |
| Fedora | 31 | gnome terminal | works | disable cgroups2
install as below |
| Fedora | 32 | gnome terminal | works | disable cgroups2
install as below |
| Mac OS | | | not tried
no reports received | |
| Windows | | | not tried
no reports received | |

### Install on Linux, Mac and Windows

> Note for **Linux** users: Cgroups 2 must be disabled. See [Linux Installation Options](https://github.com/my-own-kind/mokctl/blob/master/docs/install-linux.md).

Ensure [Docker](https://www.docker.com/get-started) or [Moby](https://github.com/moby/moby) are installed first.

Add the following to your shell startup file, for example `~/.bashrc` or `~/.zshrc`:

```bash
alias mokbox='docker run --rm -ti --hostname mokbox --name mokbox -v /var/run/docker.sock:/var/run/docker.sock -v /var/tmp:/var/tmp myownkind/mokbox'
```

Close the terminal and start it again so the alias is created.

Then 'log in' to the work container:

```bash
mokbox
```

Use `mokctl` and `kubectl`, which are already installed in the 'mokbox' container:

```bash
mokctl build image --get-prebuilt-image

mokctl create cluster myk8s --masters 1

export KUBECONFIG=/var/tmp/admin-myk8s.conf

kubectl get pods -A
```

Type `exit` or `Ctrl-d` to 'log out' of the mokbox. The mokbox container will be deleted but the kubernetes cluster will remain, as will the `kubectl` file,`/var/tmp/admin-myk8s.conf`.

To remove the kubernetes cluster:

```bash
mokbox

export KUBECONFIG=/var/tmp/admin-myk8s.conf

mokctl delete cluster myk8s

exit
```

Two docker images will remain, 'myownkind/mokbox' and 'myownkind/mok-centos-7-v1.19.1'. Remove them to reclaim disk space, or keep them around to be able to quickly build kubernetes clusters.

See also:

* [Mokctl on Docker Hub](https://hub.docker.com/repository/docker/myownkind/mokctl) - to alias the `mokctl` command only, no mokbox.

* [Linux installation options](/docs/install-linux.md)