fbpx

Custom launch specifications allow you to configure multiple workload types on the same ocean cluster.
With custom launch specs you can configure sets of labels and taints to go along with a custom AMI and user data script that will be used for the nodes that will serve your labeled pods.
If a pod have no node-selector labels configured, the default AMI and user data configured on the Ocean cluster will be used.

Configuration
  1. Log in to Spotinst Console
  2. Navigate to your Ocean Cluster
  3. Click on the Actions menu and select Custom Launch Specifications
  4. Click Add Specification
    1. Add the labels which identify your Nodes
    2. Set the User Data script and make sure to label you Nodes according to your labels selection
    3. Optional: Set a custom AMI for the custom launch specification

 

Example

Use case: Running a Windows-based node in a Linux-based cluster
In the given scenario, the default Ocean AMI will include a Linux OS, for a specific Pod – ‘WinPod’ a Windows image is required.
To ensure that the pod WinPod is using a Windows image you will need to perform the following steps:

  1. Configure your WinPod Pod with a dedicated nodeSelector
    1. i.e:
      apiVersion: v1
      kind: Pod
      metadata:
      name: WinPod
      spec:
        containers:
        - name: WinPodCon
          image: WinPodCon
          imagePullPolicy: IfNotPresent
        nodeSelector:
          runOnWin: true
  2. Configure your Ocean cluster with a custom launch specification that serves the WinPod nodeSelector label
    1. Log in to Spotinst Console
    2. Navigate to your Ocean Cluster
    3. Click on the Actions menu and select Custom Launch Specifications
    4. Click Add Specification
      1. Add the the following label:
        1. Key: runOnWin
        2. Value: true
      2. Set the User Data script and make sure to label you Nodes with the “runOnWin”: “true” label
      3. Set the custom launch specification AMI to Windows OS