-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathauto-script.sh
More file actions
executable file
·34 lines (23 loc) · 930 Bytes
/
auto-script.sh
File metadata and controls
executable file
·34 lines (23 loc) · 930 Bytes
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
#!/bin/bash
########################
# include the magic
########################
. demo-magic.sh
# hide the evidence
clear
# Demo time!
export CLUSTER_NAME=kcduk-demo
export CAPMVM_VERSION=v0.7.0
# start
p "export CAPMVM_VERSION=v0.7.0\n$ export EXP_CLUSTER_RESOURCE_SET=true\n$ clusterctl init --infrastructure microvm"
pe "k9s"
p "export CLUSTER_NAME=kcduk-demo\n$ export CONTROL_PLANE_MACHINE_COUNT=1\n$ export WORKER_MACHINE_COUNT=3\n$ export CONTROL_PLANE_VIP=192.168.10.25\n$ clusterctl generate cluster -i microvm:$CAPMVM_VERSION -f flannel $CLUSTER_NAME > cluster.yaml"
pe "kubectl apply -f cluster-demo.yaml"
pe "nvim cluster-demo.yaml"
clear
pe "dhcp-lease-list"
pe "sudo firewall-cmd --direct --get-all-rules"
pe "kubectl get secret $CLUSTER_NAME-kubeconfig -o json | jq -r .data.value | base64 -d > config.yaml"
pe "watch kubectl --kubeconfig config.yaml get nodes"
pe "k9s --kubeconfig config.yaml"
clear