mirror of
https://github.com/rancher/k3k.git
synced 2026-03-02 09:40:31 +00:00
Compare commits
7 Commits
v0.0.0-alp
...
v0.0.0-alp
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
0682b11100 | ||
|
|
1f2595edfb | ||
|
|
b0f1fc1184 | ||
|
|
8f5de4a5d2 | ||
|
|
46491a4310 | ||
|
|
a299353eca | ||
|
|
eb4e5dd099 |
2
.github/workflows/chart.yml
vendored
2
.github/workflows/chart.yml
vendored
@@ -3,7 +3,7 @@ name: Chart Release
|
||||
on:
|
||||
push:
|
||||
branches:
|
||||
- k3k-chart
|
||||
- main
|
||||
|
||||
jobs:
|
||||
release:
|
||||
|
||||
1
.github/workflows/release.yml
vendored
1
.github/workflows/release.yml
vendored
@@ -26,6 +26,7 @@ jobs:
|
||||
overwrite: 'true'
|
||||
files: |
|
||||
${{ github.workspace }}/bin/k3k
|
||||
${{ github.workspace }}/bin/k3kcli
|
||||
- name: Docker Hub Login
|
||||
uses: docker/login-action@v2
|
||||
with:
|
||||
|
||||
48
README.md
Normal file
48
README.md
Normal file
@@ -0,0 +1,48 @@
|
||||
# K3K
|
||||
|
||||
A Kubernetes in Kubernetes tool, k3k provides a way to run multiple embedded isolated k3s clusters on your kubernetes cluster.
|
||||
|
||||
## Why?
|
||||
|
||||

|
||||
|
||||
|
||||
## Usage
|
||||
|
||||
K3K consists of a controller and a cli tool, the controller can be deployed via a helm chart and the cli can be downloaded from the releases page.
|
||||
|
||||
### Deploy Controller
|
||||
|
||||
[Helm](https://helm.sh) must be installed to use the charts. Please refer to
|
||||
Helm's [documentation](https://helm.sh/docs) to get started.
|
||||
|
||||
Once Helm has been set up correctly, add the repo as follows:
|
||||
|
||||
helm repo add k3k https://galal-hussein.github.io/k3k
|
||||
|
||||
If you had already added this repo earlier, run `helm repo update` to retrieve
|
||||
the latest versions of the packages. You can then run `helm search repo
|
||||
k3k` to see the charts.
|
||||
|
||||
To install the k3k chart:
|
||||
|
||||
helm install my-k3k k3k/k3k
|
||||
|
||||
To uninstall the chart:
|
||||
|
||||
helm delete my-k3k
|
||||
|
||||
### Create a new cluster
|
||||
|
||||
To create a new cluster you need to install and run the cli or create a cluster object, to install the cli:
|
||||
|
||||
```
|
||||
wget https://github.com/galal-hussein/k3k/releases/download/v0.0.0-alpha2/k3k
|
||||
chmod +x k3k
|
||||
sudo cp k3k /usr/local/bin
|
||||
```
|
||||
|
||||
To create a new cluster you can use:
|
||||
```
|
||||
k3k cluster create --name example-cluster --token test
|
||||
```
|
||||
@@ -2,5 +2,5 @@ apiVersion: v2
|
||||
name: k3k
|
||||
description: A Helm chart for K3K
|
||||
type: application
|
||||
version: 0.1.0
|
||||
appVersion: 0.1.0
|
||||
version: 0.1.1
|
||||
appVersion: 0.0.0-alpha3
|
||||
@@ -23,12 +23,4 @@ spec:
|
||||
- containerPort: 8080
|
||||
name: https
|
||||
protocol: TCP
|
||||
livenessProbe:
|
||||
httpGet:
|
||||
path: /
|
||||
port: https
|
||||
readinessProbe:
|
||||
httpGet:
|
||||
path: /
|
||||
port: https
|
||||
serviceAccountName: {{ include "k3k.serviceAccountName" . }}
|
||||
@@ -5,7 +5,7 @@ image:
|
||||
repository: husseingalal/k3k
|
||||
pullPolicy: IfNotPresent
|
||||
# Overrides the image tag whose default is the chart appVersion.
|
||||
tag: ""
|
||||
tag: "v0.0.0-alpha3"
|
||||
|
||||
imagePullSecrets: []
|
||||
nameOverride: ""
|
||||
|
||||
@@ -34,6 +34,7 @@ var (
|
||||
agents int64
|
||||
serverArgs cli.StringSlice
|
||||
agentArgs cli.StringSlice
|
||||
version string
|
||||
|
||||
clusterCreateFlags = []cli.Flag{
|
||||
cli.StringFlag{
|
||||
@@ -77,6 +78,12 @@ var (
|
||||
Usage: "agents extra arguments",
|
||||
Value: &agentArgs,
|
||||
},
|
||||
cli.StringFlag{
|
||||
Name: "version",
|
||||
Usage: "k3s version",
|
||||
Destination: &version,
|
||||
Value: "v1.26.1+k3s1",
|
||||
},
|
||||
}
|
||||
)
|
||||
|
||||
@@ -146,6 +153,7 @@ func newCluster(name, token string, servers, agents int32, clusterCIDR, serviceC
|
||||
ServiceCIDR: serviceCIDR,
|
||||
ServerArgs: serverArgs,
|
||||
AgentArgs: agentArgs,
|
||||
Version: version,
|
||||
},
|
||||
}
|
||||
}
|
||||
|
||||
BIN
hack/becausewecan.jpg
Normal file
BIN
hack/becausewecan.jpg
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 137 KiB |
Reference in New Issue
Block a user