Skip to content

apaterson-ecs/terraform-spotinst-ocean-eks

 
 

Repository files navigation

Spot Ocean EKS Terraform Module

A Terraform module to create an Amazon Elastic Kubernetes Service (EKS) cluster with Spot Ocean. The module will install the Ocean Controller into the cluster.

Table of Contents

Prerequisites

For kubectl to connect and interface properly with your Amazon Elastic Kubernetes Service (EKS) cluster, you have to install and configure the AWS Command Line Interface (CLI) with the aws-iam-authenticator component. Instructions on how to install the following components can be found below:

Usage

module "ocean-eks" {
  source = "spotinst/ocean-eks/spotinst"

  # Credentials.
  spotinst_token   = var.spotinst_token
  spotinst_account = var.spotinst_account
}

Examples

Resources

This module creates and manages the following resources:

  • aws_vpc (optional)
  • aws_eks_cluster
  • spotinst_ocean_aws

Requirements

Name Version
terraform >=0.12.15, <0.13
spotinst >= 1.27.0

Providers

Name Version
aws n/a
random n/a
spotinst >= 1.27.0

Inputs

Name Description Type Default Required
ami_id The image ID for the EKS worker nodes. If none is provided, Terraform will search for the latest version of their EKS optimized worker AMI based on platform string null no
associate_public_ip_address Associate a public IP address to worker nodes bool false no
cluster_identifier Cluster identifier string null no
cluster_name Cluster name string null no
cluster_version Kubernetes supported version string "1.18" no
desired_capacity The number of worker nodes to launch and maintain in the Ocean cluster number 1 no
key_name The key pair to attach to the worker nodes launched by Ocean string null no
max_size The upper limit of worker nodes the Ocean cluster can scale up to number null no
min_size The lower limit of worker nodes the Ocean cluster can scale down to number null no
region The region the EKS cluster will be located string null no
spotinst_account Spot account ID string n/a yes
spotinst_token Spot Personal Access token string n/a yes
subnets A list of subnets to place the EKS cluster and workers within list(string) null no
tags A map of tags to add to all resources map(string) {} no
vpc_id VPC where the cluster and workers will be deployed string null no

Outputs

Name Description
cloudwatch_log_group_name Name of cloudwatch log group created
cluster_arn The Amazon Resource Name (ARN) of the cluster
cluster_certificate_authority_data Nested attribute containing certificate-authority-data for your cluster. This is the base64 encoded certificate data required to communicate with your cluster
cluster_endpoint The endpoint for your EKS Kubernetes API
cluster_iam_role_arn IAM role ARN of the EKS cluster
cluster_iam_role_name IAM role name of the EKS cluster
cluster_id The name/id of the EKS cluster
cluster_oidc_issuer_url The URL on the EKS cluster OIDC Issuer
cluster_security_group_id Security group ID attached to the EKS cluster
cluster_version The Kubernetes server version for the EKS cluster
config_map_aws_auth A kubernetes configuration to authenticate to this EKS cluster
kubeconfig kubectl config file contents for this EKS cluster
kubeconfig_filename The filename of the generated kubectl config
ocean_cluster_id The ID of the Ocean cluster
ocean_controller_id The ID of the Ocean controller
oidc_provider_arn The ARN of the OIDC Provider if enable_irsa = true
worker_iam_role_arn Default IAM role ARN for EKS worker groups

Documentation

If you're new to Spot and want to get started, please checkout our Getting Started guide, available on the Spot Documentation website.

Getting Help

We use GitHub issues for tracking bugs and feature requests. Please use these community resources for getting help:

Community

Contributing

Please see the contribution guidelines.

License

Code is licensed under the Apache License 2.0.

About

A Terraform module to create an Amazon Elastic Kubernetes Service (EKS) cluster with Spot Ocean.

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages

  • HCL 98.5%
  • Makefile 1.5%