This file contains hidden or 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
| kubectl apply -f - <<EOF | |
| apiVersion: v1 | |
| kind: Service | |
| metadata: | |
| name: vm1ssh | |
| spec: | |
| externalTrafficPolicy: Cluster | |
| ports: | |
| - port: 22 | |
| name: ssh |
This file contains hidden or 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
| kubectl apply -f - <<EOF | |
| apiVersion: kubevirt.io/v1alpha3 | |
| kind: VirtualMachine | |
| metadata: | |
| generation: 1 | |
| labels: | |
| kubevirt.io/os: linux | |
| name: vm1 | |
| spec: | |
| running: true |
This file contains hidden or 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 << END > startup-script | |
| #cloud-config | |
| hostname: vm1 | |
| ssh_authorized_keys: | |
| - $(cat ~/.ssh/id_rsa.pub) | |
| END | |
| kubectl create secret generic vm1-cloudconfig --from-file=userdata=startup-script |
This file contains hidden or 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
| VERSION=v0.31.0 | |
| kubectl create ns kubevirt | |
| kubectl apply -f https://github.com/kubevirt/kubevirt/releases/download/${VERSION}/kubevirt-operator.yaml | |
| kubectl apply -f https://github.com/kubevirt/kubevirt/releases/download/${VERSION}/kubevirt-cr.yaml |
This file contains hidden or 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: testvm | |
| spec: | |
| running: false | |
| template: | |
| metadata: | |
| labels: | |
| kubevirt.io/size: small |
This file contains hidden or 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: | |
| labels: | |
| kubevirt.io/vm: vmurl | |
| name: vmurl | |
| spec: | |
| dataVolumeTemplates: | |
| - metadata: | |
| name: vmurl |
This file contains hidden or 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
| kubectl create ns fluxcd | |
| GHUSER=ams0 | |
| GHREPO=rancher-home | |
| helm upgrade -i flux fluxcd/flux --wait \ | |
| --namespace fluxcd \ | |
| --set git.url="https://github.com/${GHUSER}/${GHREPO}.git" \ | |
| --set git.readonly=true \ | |
| --set sync.state=secret \ |
This file contains hidden or 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: v1 | |
| kind: Namespace | |
| metadata: | |
| name: sock-shop | |
| --- | |
| apiVersion: apps/v1 | |
| kind: Deployment | |
| metadata: | |
| name: carts-db | |
| labels: |
This file contains hidden or 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
| --- | |
| # Source: calico/templates/calico-config.yaml | |
| # This ConfigMap is used to configure a self-hosted Calico installation. | |
| kind: ConfigMap | |
| apiVersion: v1 | |
| metadata: | |
| name: calico-config | |
| namespace: kube-system | |
| data: | |
| # Typha is disabled. |
This file contains hidden or 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: apps/v1 | |
| kind: Deployment | |
| metadata: | |
| name: nginx | |
| labels: | |
| app: nginx | |
| spec: | |
| replicas: 1 | |
| selector: | |
| matchLabels: |