This message was deleted.
# k3d
a
This message was deleted.
m
I'm guessing yes but with multiple command invocations or at least by using
for
loop
πŸ‘ 1
w
Yep, what @many-telephone-82541 wrote. You at least need to overwrite the cluster name.
b
@many-telephone-82541 Yeah a
for
loop works, but I was hoping to use a command such as
k3d cluster create --config multi-clusters.yaml
using a config file such as
Copy code
---
apiVersion: <http://k3d.io/v1alpha4|k3d.io/v1alpha4>
kind: Simple
metadata:
  name: cluster1
servers: 1
agents: 4
image: <http://docker.io/rancher/k3s:v1.22.7-k3s1|docker.io/rancher/k3s:v1.22.7-k3s1>
kubeAPI:
  hostPort: "30001"
ports:
  - port: 8081:80
    nodeFilters:
      - loadbalancer
  - port: 8444:443
    nodeFilters:
      - loadbalancer    

---
apiVersion: <http://k3d.io/v1alpha4|k3d.io/v1alpha4>
kind: Simple
metadata:
  name: cluster2
servers: 1
agents: 4
image: <http://docker.io/rancher/k3s:v1.22.7-k3s1|docker.io/rancher/k3s:v1.22.7-k3s1>
kubeAPI:
  hostPort: "30002"
ports:
  - port: 8082:80
    nodeFilters:
      - loadbalancer
  - port: 8445:443
    nodeFilters:
      - loadbalancer
w
That could be fairly simple to implement. Feel free to open a feature request for this. Back when I put in config file support, I was thinking of a ClusterList API type. That would be something for v6... If I will ever get to enough funding to spend more time on this... Or more contributors πŸ™‚
b
@wide-garage-9465 Thanks for all your hard work and your suggestion. I will put in a feature request. Unfortunately I'm not familiar enough with Go or I would contribute to this feature.
❀️ 1
w
@brash-businessperson-80975 thanks for the coffee πŸ™ Much appreciated πŸ™‚
πŸ‘ 3
β˜• 1