fbpx

Finished to handle prerequisites? managed to install the integration?

Great! let’s create our clusters.

Here’s 3 methods to get started:

Option 1: Create A New Cluster

  1. Download the KOPS binary from GitHub releases.
  2. Verify the required scripts from prerequisites are available. if not, Download the updated scripts and open the archive file.
  3. Update all variables in 00-env.sh.
  4. Execute 01-create.sh.

 

Option 2: Migrate an existing cluster managed by Spotinst Elastigroups (created by previous versions of KOPS)

  1. Unset NODEUP_URL environment variable (if using 00-env.sh, remove the first line which loads a hidden file called .internal).
  2. Enable Spotinst support by toggling the feature flag:

    for ElastiGroup:

    export KOPS_FEATURE_FLAGS="+Spotinst"


    for Ocean:

    export KOPS_FEATURE_FLAGS="+Spotinst,SpotinstOcean"
  3. Unset KOPS_CLOUD_PROVIDER environment variable, if you wish to use the same 01-create.sh file, remove –cloud $KOPS_CLOUD_PROVIDER argument from the kops create cluster command.
  4. Edit your cluster configuration files
    1. cluster.spec
    2. config

    replace each cloudProvider: spotinst with cloudProvider: aws. This step MUST be done manually by editing the files in S3.
  5. Replace the KOPS binary.

Option 3: Migrate an existing cluster managed by AWS Auto Scaling Groups (created by all versions of KOPS)

  1. Migrate masters one-by-one:
    1. For each node:
      1. Drain the node (kubectl drain <node>)
      2. Scale down the Auto Scaling Group to zero
      3. Import the Auto Scaling Group into Spotinst
  2. Migrate nodes all-in-once:
    1. Import the Auto Scaling Group into Spotinst
    2. For each node:
      1. Drain the node (kubectl drain <node>)
    3. Scale down the Auto Scaling Group to zero
  3. Clean up (optional):
    1. Delete all Auto Scaling Groups
    2. Delete all Launch Configurations
  4. Enable Spotinst support by toggling the feature flag:

    export KOPS_FEATURE_FLAGS="+Spotinst"