forked from AbsaOSS/k3d-action
-
Notifications
You must be signed in to change notification settings - Fork 0
36 lines (33 loc) · 1.11 KB
/
multi-cluster-config.yaml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
name: Two clusters on default networks with config
on:
[workflow_dispatch, push]
jobs:
k3d-multicluster-demo:
name: Two clusters on default networks with config
runs-on: ubuntu-20.04
steps:
- uses: actions/checkout@v2
- uses: ./
name: "Create 1st k3d Cluster"
with:
cluster-name: "test-cluster-1"
args: --config=.github/workflows/assets/1.yaml
- uses: ./
name: "Create 2nd k3d Cluster"
with:
cluster-name: "test-cluster-2"
args: --config=.github/workflows/assets/3.yaml # test: k3s version is different from 1.yaml
- name: Cluster info
run: |
kubectl cluster-info --context k3d-test-cluster-1 && kubectl cluster-info --context k3d-test-cluster-2
- name: Nodes
run: |
docker ps -a
kubectl config use-context k3d-test-cluster-1
kubectl get nodes -o wide
kubectl config use-context k3d-test-cluster-2
kubectl get nodes -o wide
- name: Network
run: |
docker network inspect nw01
docker network inspect nw02