Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/rinx/setup-k3d
GitHub Action for setting up k3d (k3s in Docker). It's lighter than KinD (Kubernetes in Docker).
https://github.com/rinx/setup-k3d
actions k3d k3s
Last synced: about 2 months ago
JSON representation
GitHub Action for setting up k3d (k3s in Docker). It's lighter than KinD (Kubernetes in Docker).
- Host: GitHub
- URL: https://github.com/rinx/setup-k3d
- Owner: rinx
- License: mit
- Created: 2020-10-26T10:05:47.000Z (about 4 years ago)
- Default Branch: master
- Last Pushed: 2021-09-09T07:43:09.000Z (over 3 years ago)
- Last Synced: 2024-10-17T23:12:43.425Z (3 months ago)
- Topics: actions, k3d, k3s
- Language: Shell
- Homepage:
- Size: 11.7 KB
- Stars: 0
- Watchers: 3
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# setup-k3d
This is a GitHub Action for setting up [k3d](https://github.com/rancher/k3d).
## Inputs
### `version`
k3d version.
Default: latest
### `name`
cluster name.
Default: mycluster
### `skipClusterCreation`
If "true", the action will not create a cluster, just acquire the tools.
Default: false
### `ingressPort`
If it is not `0`, ingress will be exposed to the specified port.
Default: 0
### `agents`
If it is not `0`, specified number of agents will be created.
Default: 0
### `options`
extra options that will passed to `k3d cluster create` command.
Default: ""
## Examples
To create a single node cluster,
```yaml
on: push
jobs:
setup-k3d:
runs-on: ubuntu-latest
steps:
- uses: rinx/[email protected]
- name: Get cluster info
run: |
kubectl cluster-info
kubectl get pods -n kube-system
kubectl get nodes
echo "current-context:" $(kubectl config current-context)
```To create a cluster with multi agents,
```yaml
on: push
jobs:
setup-k3d:
runs-on: ubuntu-latest
steps:
- uses: rinx/[email protected]
with:
agents: 3
- name: Get cluster info
run: |
kubectl cluster-info
kubectl get pods -n kube-system
kubectl get nodes
echo "current-context:" $(kubectl config current-context)
```To create a cluster with exposed ingress,
```yaml
on: push
jobs:
setup-k3d:
runs-on: ubuntu-latest
steps:
- uses: rinx/[email protected]
with:
ingressPort: 8081
- name: Get cluster info
run: |
kubectl cluster-info
kubectl get pods -n kube-system
kubectl get nodes
echo "current-context:" $(kubectl config current-context)
```## References
- [rancher/k3s](https://github.com/rancher/k3s)
- [rancher/k3d](https://github.com/rancher/k3d)
- [engineerd/setup-kind](https://github.com/engineerd/setup-kind)