Metadata-Version: 2.4
Name: shakenfist_client_k3s
Version: 0.3.0
Summary: A sf-client plugin which orchestrates k3s clusters on Shaken Fist
Author-email: Michael Still <mikal@stillhq.com>
License-Expression: Apache-2.0
Project-URL: Homepage, https://shakenfist.com
Project-URL: Bug Tracker, https://github.com/shakenfist/client-python-k3s/issues
Classifier: Intended Audience :: Information Technology
Classifier: Intended Audience :: System Administrators
Classifier: Operating System :: POSIX :: Linux
Classifier: Programming Language :: Python
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.7
Requires-Python: >=3.7
Description-Content-Type: text/markdown
License-File: LICENSE
Requires-Dist: click>=8.0.0
Requires-Dist: shakenfist_client>=0.7.7
Requires-Dist: packaging
Requires-Dist: pyyaml
Requires-Dist: requests
Requires-Dist: importlib-metadata; python_version < "3.9"
Provides-Extra: test
Requires-Dist: tox; extra == "test"
Requires-Dist: flake8; extra == "test"
Requires-Dist: testtools; extra == "test"
Requires-Dist: mock; extra == "test"
Requires-Dist: stestr; extra == "test"
Dynamic: license-file

# Shaken Fist k3s client plugin

This is a plugin for [sf-client](https://github.com/shakenfist/client-python),
the command line client for the
[Shaken Fist](https://github.com/shakenfist/shakenfist) minimal cloud. It adds
a `k3s` command group which orchestrates [k3s](https://k3s.io/) Kubernetes
clusters on Shaken Fist instances, including [MetalLB](https://metallb.io/)
for load balancer addresses and [Longhorn](https://longhorn.io/) for
persistent storage. Cluster state is stored in Shaken Fist namespace
metadata, so any authorized client can manage a cluster.

## Installation

```bash
pip install shakenfist_client_k3s
```

The plugin registers itself with `sf-client` via an entry point, so once
installed the commands appear automatically.

Cluster nodes communicate with Shaken Fist over the `sf-agent2` side
channel, so clusters require `shakenfist_client` >= 0.7.7 (installed
automatically) and a Shaken Fist server and guest image recent enough
to speak `sf-agent2`.

## Usage

```bash
# Create a cluster with two workers and a highly available control plane
sf-client k3s create mycluster --worker-count 2 --control-plane-count 3

# Fetch a kubeconfig for the new cluster
sf-client k3s getconfig mycluster

# Grow the cluster later
sf-client k3s expand-workers mycluster --worker-count 2

# And clean up when you are done
sf-client k3s delete mycluster
```

`sf-client k3s --help` lists the full command set.

## Documentation

* [Using the k3s command group](https://github.com/shakenfist/client-python-k3s/blob/develop/docs/usage.md)
  -- every command, its options, and where cluster state lives.
* [The library API](https://github.com/shakenfist/client-python-k3s/blob/develop/docs/library-api.md)
  -- calling the same orchestration from Python, with no Click involved.
* [The shakenfist.k3s Ansible collection](https://github.com/shakenfist/client-python-k3s/blob/develop/docs/collection.md)
  -- the `sf_k3s_cluster` module, its connection rules, and why it does not
  manage worker count.
* [Testing and CI](https://github.com/shakenfist/client-python-k3s/blob/develop/docs/testing.md)
  -- how to run the tests, and what the two CI tiers cover.
