Commands to create a Test KOPS Cluster
Ensure that the machine you are running the kops commands on has proper AWS access to be able to create the cluster.
Ensure that the machine you are running has kops installed
Download the kops configuration file
wget https://raw.githubusercontent.com/prakarsh-dt/kops-cluster/main/test/kops-spots-use1-cluster-config.yaml
Set the KOPS_STATE_STORE environment variable with the statestore bucket
export KOPS_STATE_STORE=" s3://statestore-bucket-name"
Create the cluster with the configs from the downloaded file (Please change the cluster name/other configs if you have to before issuing the kops create command)
To change the cluster name please replace cluster name mentioned in the nodegroup labels as well.
kops create -f kops-spots-use1-cluster-config.yaml
kops update cluster test.devtron.k8s.local --yes
Create Secret
kops create secret --name test.devtron.k8s.local sshpublickey admin -i ~ /.ssh/id_rsa.pub
kops update cluster test.devtron.k8s.local --yes
To delete the cluster please use the following command (make sure the KOPS_STATE_STORE environment variable is set)
kops delete cluster test.devtron.k8s.local --yes