In this tutorial, we will provide you with the process of how to upgrade an Elastigroup cluster created by KOPS to an Ocean cluster.
Are you new to Ocean?
Spotinst Ocean allows you to run K8s containers, eliminating the operational overhead of worrying about the underlying VM infrastructure, while gaining a deeper cluster visibility and dramatically reducing costs by utilizing Spot and reserved instances.
In case you require more information, you can checkout our Ocean product page.
In addition to that, you can have another read on using KOPS.
- KOPS version is 1.11.1 or above.
- List of Elastigroups you wish to upgrade.
Please notice: If you are using multiple Instance-Groups, Kops version should be 1.12 and above.
Step 1: Modify the KOPS Feature Flag variable
This step is taking into account that you have created your K8s with Spotinst’s official provider version of KOPS.
*In case you are using the unofficial version of KOPS with Spotinst, we highly recommend migrating your ASG to the official version, as it will add an additional layer of visualization and visibility of your K8s cluster in the Spotinst UI.
Please browse to the location of the Spotinst script and modify the environmental variables in the 00-env.sh file
Modify KOPS_FEATURE_FLAGS to as follows:
Step 2: Upgrade the current Elastigroup to Ocean from Spotinst UI
Browse to Spotinst console and select the Elastigroup you wish to upgrade.
Please note the Upgrade should be done only to your Node instance groups, the Master’s will still be managed in Elastigroup.
Click on the icon on the top-right menu, and then select “Upgrade” on the pop-up window:
Please wait for the message to validate that the upgrade process is complete.
Step 3: Modifying the Ocean Cluster Name
On Ocean’s cluster page, please click on Actions->Edit Cluster:
Navigate to the “REVIEW” tab and switch to JSON view:
Enter edit mode and Change the group name by removing the ‘Ocean::’ prefix:
From now on, Ocean will be hosting your cluster, and you will be able to continue to manage your cluster using KOPS
The main difference is that now you can stop worrying about your infrastructure and enjoy a serverless experience.
Step 4: Multiple Instance Groups
In the case of having multiple instance groups, Ocean supports Launch Specification per IG.
To achieve that, please follow the next steps:
- Set the Ocean default launch specification label on your primary Instance Group called “nodes” (the one you have imported to Ocean).
- run KOPS Update
- Kops will now identify and create the missing launch specifications on your Ocean Cluster.