curl -sL https://get.rke2.io | sh
systemctl daemon-reload
systemctl start rke2-server
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
apiVersion: provisioning.cattle.io/v1 | |
kind: Cluster | |
metadata: | |
annotations: | |
field.cattle.io/creatorId: user-2hb4j | |
creationTimestamp: "2021-09-14T15:18:49Z" | |
finalizers: | |
- wrangler.cattle.io/provisioning-cluster-remove | |
generation: 3 | |
name: rke2-test |
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
creating a file to work with | |
1175000+0 records in | |
1175000+0 records out | |
601600000 bytes (602 MB) copied, 5.6939 s, 106 MB/s | |
Testing block size = 1k | |
587500+0 records in | |
587500+0 records out | |
601600000 bytes (602 MB) copied, 4.45826 s, 135 MB/s | |
Testing block size = 2k |
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
cat <<EOF | kubectl create -f - | |
apiVersion: v1 | |
kind: Pod | |
metadata: | |
name: samplepod-2 | |
annotations: | |
k8s.v1.cni.cncf.io/networks: '[ | |
{ | |
"name": "ovs-ipam-net", | |
"ips": ["10.10.10.1/24"] |
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/bash | |
set -e | |
function prepare(){ | |
#precheck | |
echo "Pre-checking..." | |
command -v fdisk >/dev/null 2>&1 || { echo >&2 "fdisk is required but it's not installed. Please install it first."; exit 1; } | |
command -v mkfs.ext4 >/dev/null 2>&1 || { echo >&2 "mkfs.ext4 is required but it's not installed. Please install it first."; exit 1; } | |
command -v mount >/dev/null 2>&1 || { echo >&2 "mount is required but it's not installed. Please install it first."; exit 1; } | |
echo "Pre-checking done" |
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/bash | |
set -e | |
[ -z "${MYSQL_PASSWD}" ] && MYSQL_PASSWD=root | |
[ -z "${MYSQL_ADMIN_USER}" ] && MYSQL_ADMIN_USER=wordpress | |
[ -z "${MYSQL_ADMIN_PASSWD}" ] && MYSQL_ADMIN_PASSWD=wordpress | |
mysql_install() | |
{ |
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
apiVersion: kubevirt.io/v1alpha3 | |
kind: VirtualMachine | |
metadata: | |
name: centos-net2 | |
spec: | |
dataVolumeTemplates: | |
- metadata: | |
name: centos-net2-rootdisk-kfg0p | |
spec: | |
pvc: |
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
apiVersion: kubevirt.io/v1 | |
kind: VirtualMachine | |
metadata: | |
name: ubuntu | |
spec: | |
dataVolumeTemplates: | |
- metadata: | |
name: ubuntu-disk | |
spec: | |
pvc: |
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
apiVersion: kubevirt.io/v1alpha3 | |
kind: VirtualMachine | |
metadata: | |
name: k3os-img | |
spec: | |
dataVolumeTemplates: | |
- metadata: | |
name: k3os-cdroom-disk | |
spec: | |
pvc: |
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
apiVersion: k8s.cni.cncf.io/v1 | |
kind: NetworkAttachmentDefinition | |
metadata: | |
name: macvlan-conf | |
namespace: default | |
spec: | |
config: '{ | |
"cniVersion": "0.3.0", | |
"type": "macvlan", | |
"master": "eth0", |
NewerOlder