Last active
January 3, 2020 17:02
-
-
Save thebsdbox/61b5457accaf4c0f0109a3dff2903479 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/sh | |
CLUSTERS=250 | |
MACHINES=5 | |
echo "About to build a configuration for $CLUSTERS deployed clusters with $MACHINES each and written to the file $1" | |
sleep 5 | |
for i in $( seq $CLUSTERS ); do | |
echo "apiVersion: cluster.x-k8s.io/v1alpha2 | |
kind: Cluster | |
metadata: | |
name: cluster-$i | |
spec: | |
clusterNetwork: | |
pods: | |
cidrBlocks: [\"192.168.0.0/16\"] | |
infrastructureRef: | |
apiVersion: infrastructure.cluster.x-k8s.io/v1alpha1 | |
kind: InceptionCluster | |
name: cluster-$i | |
--- | |
apiVersion: infrastructure.cluster.x-k8s.io/v1alpha1 | |
kind: InceptionCluster | |
metadata: | |
name: cluster-$i | |
--- | |
kind: MachineDeployment | |
apiVersion: cluster.x-k8s.io/v1alpha2 | |
metadata: | |
name: deployment-$i | |
namespace: default | |
labels: | |
cluster.x-k8s.io/cluster-name: cluster-$i | |
nodepool: nodepool-0 | |
spec: | |
replicas: $MACHINES | |
selector: | |
matchLabels: | |
cluster.x-k8s.io/cluster-name: cluster-$i | |
nodepool: nodepool-0 | |
template: | |
metadata: | |
labels: | |
cluster.x-k8s.io/cluster-name: cluster-$i | |
nodepool: nodepool-0 | |
spec: | |
version: \"v1.15.3\" | |
bootstrap: | |
data: \"\" | |
infrastructureRef: | |
apiVersion: infrastructure.cluster.x-k8s.io/v1alpha1 | |
kind: InceptionMachine | |
name: imachinetemplate | |
namespace: default | |
---" >> $1 | |
done |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment