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: PersistentVolumeClaim | |
metadata: | |
name: winhd | |
spec: | |
accessModes: | |
- ReadWriteOnce | |
resources: | |
requests: |
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: storage.k8s.io/v1 | |
kind: StorageClass | |
metadata: | |
name: managed-ultra-csi | |
provisioner: disk.csi.azure.com | |
parameters: | |
skuname: UltraSSD_LRS # alias: storageaccounttype, available values: Standard_LRS, Premium_LRS, StandardSSD_LRS, UltraSSD_LRS | |
reclaimPolicy: Delete |
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: windows | |
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
kubectl apply -f - <<EOF | |
apiVersion: kubevirt.io/v1alpha3 | |
kind: VirtualMachine | |
metadata: | |
generation: 1 | |
labels: | |
kubevirt.io/os: windows | |
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
kubectl apply -f - <<EOF | |
apiVersion: v1 | |
kind: PersistentVolumeClaim | |
metadata: | |
name: winhd | |
spec: | |
accessModes: | |
- ReadWriteOnce | |
resources: | |
requests: |
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
FROM scratch | |
ADD en_windows_server_2019_updated_sep_2020_x64_dvd_2d6f25f2.iso /disk/ | |
END |
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 |