Skip to content

Commit 5e5228b

Browse files
committed
Add command to obtain k3sup pro
Signed-off-by: Alex Ellis (OpenFaaS Ltd) <alexellis2@gmail.com>
1 parent 7f985f3 commit 5e5228b

File tree

416 files changed

+63740
-441
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

416 files changed

+63740
-441
lines changed

README.md

Lines changed: 55 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ How do you say it? Ketchup, as in tomato.
1010

1111
**Introducing K3sup Pro 🎉**
1212

13-
Whilst the CE edition is ideal for experimentation, we built `k3sup pro` for an IaaC/GitOps experience.
13+
Whilst the CE edition is ideal for experimentation, `k3sup pro` was built to satisfy long standing requests for an IaaC/GitOps experience.
1414

1515
`k3sup pro` adds a `plan` and `apply` command to automate installations both small and large - running in parallel. The plan file can be customised and retained in Git for maintenance and updates.
1616

@@ -20,29 +20,30 @@ Whilst the CE edition is ideal for experimentation, we built `k3sup pro` for an
2020
[![Github All Releases](https://img.shields.io/github/downloads/alexellis/k3sup/total.svg)]()
2121

2222
## Contents:
23+
2324
- [k3sup 🚀 (said 'ketchup')](#k3sup--said-ketchup)
2425
- [Contents:](#contents)
2526
- [What's this for? 💻](#whats-this-for-)
2627
- [Are you a `k3sup` user?](#are-you-a-k3sup-user)
2728
- [Use-cases](#use-cases)
2829
- [Bootstrapping Kubernetes](#bootstrapping-kubernetes)
29-
- [Download `k3sup` (tl;dr)](#download-k3sup-tldr)
30-
- [A note for Windows users](#a-note-for-windows-users)
31-
- [Demo 📼](#demo-)
30+
- [Download `k3sup` CE (tl;dr)](#download-k3sup-ce-tldr)
31+
- [Demo of K3sup CE📼](#demo-of-k3sup-ce)
3232
- [Usage ✅](#usage-)
33-
- [Pre-requisites for k3sup servers and agents](#pre-requisites-for-k3sup-servers-and-agents)
34-
- [K3sup pro](#k3sup-pro)
35-
- [K3sup plan / apply for automation and large installations](#k3sup-plan--apply-for-automation-and-large-installations)
33+
- [Pre-requisites for k3sup servers and agents](#pre-requisites-for-k3sup-servers-and-agents)
34+
- [K3sup Pro](#k3sup-pro)
35+
- [Getting `k3sup pro`](#getting-k3sup-pro)
36+
- [Activating K3sup Pro](#activating-k3sup-pro)
37+
- [K3sup `plan` / `apply` for automation and large installations](#k3sup-plan--apply-for-automation-and-large-installations)
3638
- [Rapid uninstallation / reset with `k3sup pro uninstall`](#rapid-uninstallation--reset-with-k3sup-pro-uninstall)
37-
- [K3sup pro exec](#k3sup-pro-exec)
38-
- [Get a kubeconfig from an existing installation](#get-a-kubeconfig-from-an-existing-installation)
39+
- [K3sup `pro exec` - run a command everywhere](#k3sup-pro-exec---run-a-command-everywhere)
40+
- [K3sup `pro get-config` - work with an existing cluster](#k3sup-pro-get-config---work-with-an-existing-cluster)
3941
- [K3sup Community Edition (CE)](#k3sup-community-edition-ce)
4042
- [👑 Setup a Kubernetes *server* with `k3sup`](#-setup-a-kubernetes-server-with-k3sup)
4143
- [Checking if a cluster is ready](#checking-if-a-cluster-is-ready)
4244
- [Merging clusters into your KUBECONFIG](#merging-clusters-into-your-kubeconfig)
4345
- [😸 Join some agents to your Kubernetes server](#-join-some-agents-to-your-kubernetes-server)
4446
- [Use your hardware authentication / 2FA or SSH Agent](#use-your-hardware-authentication--2fa-or-ssh-agent)
45-
- [K3sup plan for automation](#k3sup-plan-for-automation)
4647
- [Create a multi-master (HA) setup with external SQL](#create-a-multi-master-ha-setup-with-external-sql)
4748
- [Create a multi-master (HA) setup with embedded etcd](#create-a-multi-master-ha-setup-with-embedded-etcd)
4849
- [👨‍💻 Micro-tutorial for Raspberry Pi (2, 3, or 4) 🥧](#-micro-tutorial-for-raspberry-pi-2-3-or-4-)
@@ -68,7 +69,7 @@ You may wonder why a tool like this needs to exist when you can do this sort of
6869

6970
k3sup was developed to automate what can be a very manual and confusing process for many developers, who are already short on time. Once you've provisioned a VM with your favourite tooling, `k3sup` means you are only 60 seconds away from running `kubectl get pods` on your own computer. If you are a local computer, you can bypass SSH with `k3sup install --local`
7071

71-
## Are you a `k3sup` user?
72+
### Are you a `k3sup` user?
7273

7374
`k3sup` was created by [Alex Ellis](https://github.com/users/alexellis/sponsorship) - the founder of [OpenFaaS &reg;](https://www.openfaas.com/) & [inlets](https://inlets.dev/).
7475

@@ -94,7 +95,7 @@ K3sup runs from your local machine, without ever having to log into a remote ser
9495
![Conceptual architecture](./docs/k3sup-cloud.png)
9596
*Conceptual architecture, showing `k3sup` running locally against any VM such as AWS EC2 or a VPS such as DigitalOcean.*
9697

97-
## Download `k3sup` (tl;dr)
98+
### Download `k3sup` CE (tl;dr)
9899

99100
`k3sup` is distributed as a static Go binary. You can use the installer on MacOS and Linux, or visit the [Releases page](https://github.com/alexellis/k3sup/releases) to download the executable for Windows.
100101

@@ -105,9 +106,7 @@ sudo install k3sup /usr/local/bin/
105106
k3sup --help
106107
```
107108

108-
### A note for Windows users
109-
110-
Windows users can use `k3sup install` and `k3sup join` with a normal "Windows command prompt".
109+
> A note for Windows users. Windows users can use `k3sup install` and `k3sup join` with a normal "Windows command prompt".
111110
112111
## Demo of K3sup CE📼
113112

@@ -124,7 +123,7 @@ Watch the demo:
124123

125124
The `k3sup` tool is a client application which you can run on your own computer. It uses SSH to connect to remote servers and creates a local KUBECONFIG file on your disk. Binaries are provided for MacOS, Windows, and Linux (including ARM).
126125

127-
## Pre-requisites for k3sup servers and agents
126+
### Pre-requisites for k3sup servers and agents
128127

129128
Some Linux hosts are configured to allow `sudo` to run without having to repeat your password. For those which are not already configured that way, you'll need to make the following changes if you wish to use `k3sup`:
130129

@@ -142,8 +141,13 @@ As an alternative, if you only need a single server you can log in interactively
142141

143142
## K3sup Pro
144143

145-
K3sup Pro is available as a free extra to [GitHub Sponsors](https://github.com/sponsors/alexellis) on a 25 USD / mo tier and higher to individuals. A separate option to purchase on an annual basis is available via email for commercial use. Contact [contact@openfaas.com](mailto:contact@openfaas.com) for more.
144+
K3sup Pro is available as a free extra to [GitHub Sponsors](https://github.com/sponsors/alexellis) on a 25 USD / mo tier and higher to individuals. A separate option to purchase on an annual basis is available via email for commercial use. Contact [sales@openfaas.com](mailto:sales@openfaas.com) for more information.
145+
146+
The binary name for K3sup Pro is `k3sup` which is intended to replace the existing `k3sup` CE binary, if you have it. You'll find all the additional commands behind a new sub-command `k3sup pro`.
146147

148+
Support for all K3sup Pro users is provided by the Issue Tracker for the [K3sup CE repository](https://github.com/alexellis/k3sup-pro/).
149+
150+
* `activate` - used by GitHub Sponsors to obtain/refresh a license key valid for 30 days. Commercial users just place your key at `~/.k3sup/LICENSE`
147151
* `plan` - take one or more JSON files and generate a YAML plan for a HA installation of K3s
148152
* `apply` - run the installation in parallel, optionally pre-downloading the K3s binary and copying it via SSH beforehand
149153
* `exec` - run a command on all nodes in the cluster
@@ -152,10 +156,41 @@ K3sup Pro is available as a free extra to [GitHub Sponsors](https://github.com/s
152156

153157
The `--predownload` flag for `k3sup pro apply` is the first step towards a fully airgapped solution, and reduces bandwidth whilst speeding up installation.
154158

155-
Walkthrough of plan, apply, get-config and exec:
159+
Walkthrough of `plan`, `apply`, `get-config` and `exec`:
156160

157161
[![asciicast](https://asciinema.org/a/HpHLjHFjXXAJ3uHiD4jKgvvaN.svg)](https://asciinema.org/a/HpHLjHFjXXAJ3uHiD4jKgvvaN)
158162

163+
### K3sup Pro roadmap
164+
165+
The initial version of K3sup Pro is largely feature-complete, however there are some additional features planned for commercial users:
166+
167+
* Use K3sup Pro Plan/Apply via bastion hosts
168+
* Airgapped installation via initial download of packages on a local machine
169+
170+
### Getting `k3sup pro`
171+
172+
The `k3sup pro` binary is packaged in a container image, rather than being downloaded via GitHub Releases.
173+
174+
The recommended option is to use K3sup CE to obtain K3sup Pro:
175+
176+
```bash
177+
# Get the latest K3sup CE version
178+
curl -sLS https://get.k3sup.dev | sudo sh
179+
180+
# Use K3sup CE to replace itself with the Pro edition
181+
sudo k3sup get pro
182+
```
183+
184+
For the `k3sup get pro` command, you can omit `sudo` by passing a `--path` variable to a writeable location by your user.
185+
186+
You can browse specific versions at [ghcr.io/openfaasltd/k3sup-pro](https://ghcr.io/openfaasltd/k3sup-pro) then pass the `--version` flag accordingly.
187+
188+
### Activating K3sup Pro
189+
190+
Individual users need to become GitHub Sponsors. After which, you can run `k3sup pro activate` to verify your identity using GitHub.com. You'll only need to do this on your laptop/workstation - machines which will host K3s do not need any additional steps.
191+
192+
Commercial users will be emailed a license key to be placed at `$HOME/.k3sup/LICENSE` and do not need to run `k3sup pro activate`.
193+
159194
### K3sup `plan` / `apply` for automation and large installations
160195

161196
The `k3sup pro plan` command reads a set of JSON files containing your hosts, and will generate a YAML plan file that you can edit to customize the installation.
@@ -275,7 +310,7 @@ export KUBECONFIG=`pwd`/kubeconfig
275310

276311
Watch a demo with dozens of Firecracker VMs: [Testing Kubernetes at Scale with bare-metal](https://youtu.be/o4UxRw-Cc8c)
277312

278-
## Rapid uninstallation / reset with `k3sup pro uninstall`
313+
### Rapid uninstallation / reset with `k3sup pro uninstall`
279314

280315
The `k3sup pro uninstall` command will uninstall k3s from all nodes in the cluster.
281316

@@ -292,7 +327,7 @@ k3sup pro uninstall \
292327
--ssh-key ~/.ssh/id_rsa
293328
```
294329

295-
## K3sup `pro exec` - run a command everywhere
330+
### K3sup `pro exec` - run a command everywhere
296331

297332
The `k3sup pro exec` command allows you to run a command on all nodes in the cluster. You can specify `--servers` or `--agents` to run the command on only the servers or agents.
298333

cmd/get-config.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -117,7 +117,7 @@ Provide the --local-path flag with --merge if a kubeconfig already exists in som
117117
return err
118118
}
119119

120-
getConfigcommand := fmt.Sprintf(sudoPrefix + "cat /etc/rancher/k3s/k3s.yaml\n")
120+
getConfigcommand := fmt.Sprintf("%scat /etc/rancher/k3s/k3s.yaml\n", sudoPrefix)
121121

122122
if local {
123123
operator := operator.ExecOperator{}

cmd/get.go

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
package cmd
2+
3+
import (
4+
"github.com/alexellis/k3sup/pkg"
5+
"github.com/spf13/cobra"
6+
)
7+
8+
// MakeGet creates the get parent command
9+
func MakeGet() *cobra.Command {
10+
var command = &cobra.Command{
11+
Use: "get",
12+
Short: "Helper for downloading K3sup Pro",
13+
Long: `Helper for downloading K3sup Pro.
14+
15+
` + pkg.SupportMessageShort + `
16+
`,
17+
SilenceUsage: true,
18+
}
19+
20+
return command
21+
}

0 commit comments

Comments
 (0)