-
Notifications
You must be signed in to change notification settings - Fork 63
Automate and deploy Linux VMs of Kubernetes nodes
John Sundarraj edited this page Sep 10, 2024
·
1 revision
You can use the below commands to create, deploy, and automate Linux VMs of Kubernetes nodes on the Windows operating system using Vagrant.
- Open the Git Bash terminal in administrator mode.
- Execute the below commands in the Git Bash terminal to build, deploy, and automate Linux VMs of Kubernetes nodes.
# Switch to Kubernetes starter-kit directory.
$ cd /opt/kickstart-kubernetes
# Boot Linux VM of Kubernetes node using Vagrant.
$ VAGRANT_CWD=./vagrant/alma-linux-9/virtualbox/amd64/server vagrant up sloopstash-k8s-mtr-1
$ VAGRANT_CWD=./vagrant/alma-linux-9/virtualbox/amd64/server vagrant up sloopstash-k8s-wkr-1
$ VAGRANT_CWD=./vagrant/alma-linux-9/virtualbox/amd64/server vagrant up sloopstash-k8s-wkr-2
# Halt Linux VM of Kubernetes node using Vagrant.
$ VAGRANT_CWD=./vagrant/alma-linux-9/virtualbox/amd64/server vagrant halt sloopstash-k8s-mtr-1
$ VAGRANT_CWD=./vagrant/alma-linux-9/virtualbox/amd64/server vagrant halt sloopstash-k8s-wkr-1
$ VAGRANT_CWD=./vagrant/alma-linux-9/virtualbox/amd64/server vagrant halt sloopstash-k8s-wkr-2
# SSH to Linux VM of Kubernetes node using Vagrant.
$ VAGRANT_CWD=./vagrant/alma-linux-9/virtualbox/amd64/server vagrant ssh sloopstash-k8s-mtr-1
$ VAGRANT_CWD=./vagrant/alma-linux-9/virtualbox/amd64/server vagrant ssh sloopstash-k8s-wkr-1
$ VAGRANT_CWD=./vagrant/alma-linux-9/virtualbox/amd64/server vagrant ssh sloopstash-k8s-wkr-2
# Provision Linux VM of Kubernetes node using Vagrant.
$ VAGRANT_CWD=./vagrant/alma-linux-9/virtualbox/amd64/server vagrant provision sloopstash-k8s-mtr-1
$ VAGRANT_CWD=./vagrant/alma-linux-9/virtualbox/amd64/server vagrant provision sloopstash-k8s-wkr-1
$ VAGRANT_CWD=./vagrant/alma-linux-9/virtualbox/amd64/server vagrant provision sloopstash-k8s-wkr-2
# Destroy Linux VM of Kubernetes node using Vagrant.
$ VAGRANT_CWD=./vagrant/alma-linux-9/virtualbox/amd64/server vagrant destroy sloopstash-k8s-mtr-1
$ VAGRANT_CWD=./vagrant/alma-linux-9/virtualbox/amd64/server vagrant destroy sloopstash-k8s-wkr-1
$ VAGRANT_CWD=./vagrant/alma-linux-9/virtualbox/amd64/server vagrant destroy sloopstash-k8s-wkr-2
You can use the following commands to build, deploy, and automate Linux VMs of Kubernetes nodes on a Mac or Linux operating system using Vagrant.
- Open the terminal.
- Execute the below commands in the terminal to build, deploy, and automate Linux VMs of Kubernetes nodes.
# Switch to Kubernetes starter-kit directory.
$ cd /opt/kickstart-kubernetes
# Boot Linux VM of Kubernetes node using Vagrant.
$ sudo VAGRANT_CWD=./vagrant/alma-linux-9/virtualbox/amd64/server vagrant up sloopstash-k8s-mtr-1
$ sudo VAGRANT_CWD=./vagrant/alma-linux-9/virtualbox/amd64/server vagrant up sloopstash-k8s-wkr-1
$ sudo VAGRANT_CWD=./vagrant/alma-linux-9/virtualbox/amd64/server vagrant up sloopstash-k8s-wkr-2
# Halt Linux VM of Kubernetes node using Vagrant.
$ sudo VAGRANT_CWD=./vagrant/alma-linux-9/virtualbox/amd64/server vagrant halt sloopstash-k8s-mtr-1
$ sudo VAGRANT_CWD=./vagrant/alma-linux-9/virtualbox/amd64/server vagrant halt sloopstash-k8s-wkr-1
$ sudo VAGRANT_CWD=./vagrant/alma-linux-9/virtualbox/amd64/server vagrant halt sloopstash-k8s-wkr-2
# SSH to Linux VM of Kubernetes node using Vagrant.
$ sudo VAGRANT_CWD=./vagrant/alma-linux-9/virtualbox/amd64/server vagrant ssh sloopstash-k8s-mtr-1
$ sudo VAGRANT_CWD=./vagrant/alma-linux-9/virtualbox/amd64/server vagrant ssh sloopstash-k8s-wkr-1
$ sudo VAGRANT_CWD=./vagrant/alma-linux-9/virtualbox/amd64/server vagrant ssh sloopstash-k8s-wkr-2
# Provision Linux VM of Kubernetes node using Vagrant.
$ sudo VAGRANT_CWD=./vagrant/alma-linux-9/virtualbox/amd64/server vagrant provision sloopstash-k8s-mtr-1
$ sudo VAGRANT_CWD=./vagrant/alma-linux-9/virtualbox/amd64/server vagrant provision sloopstash-k8s-wkr-1
$ sudo VAGRANT_CWD=./vagrant/alma-linux-9/virtualbox/amd64/server vagrant provision sloopstash-k8s-wkr-2
# Destroy Linux VM of Kubernetes node using Vagrant.
$ sudo VAGRANT_CWD=./vagrant/alma-linux-9/virtualbox/amd64/server vagrant destroy sloopstash-k8s-mtr-1
$ sudo VAGRANT_CWD=./vagrant/alma-linux-9/virtualbox/amd64/server vagrant destroy sloopstash-k8s-wkr-1
$ sudo VAGRANT_CWD=./vagrant/alma-linux-9/virtualbox/amd64/server vagrant destroy sloopstash-k8s-wkr-2