Gravity, Terraform and AWS for Kubernetes cluster creation


I’m new to Gravity and have not used it yet.

I’m currently trying to build Kubernetes clusters (i.e. the infrastructure) on EC2 (I’m not allowed to use EKS) using Terraform (mandatory) via Jenkins pipelines.

I want a generic way to build, deploy and manage k8s cluster deployments across AWS and on premise via Terraform. I’ve been exploring ways to do this that will also help with on premise deployments e.g. KOPS and Kubespray. Could Gravity be an alternative approach to KOPs and Kubespray?


As discussed on Slack.

Our reference AWS implementation of gravity is available in this repo: It’s not well polished, but we do have customers who have based their deployments off our reference terraform within EC2 (including GovCloud regions). It’s built as terraform modules, with the idea that it can be integrated with your own terraform configuration as imports.

Gravity can definitely be used instead of KOPS or Kubespray, but I don’t know enough about either of those solutions to really contrast the strengths and weaknesses of gravity vs. those particular distributions.

Feel free to reach out to our sales team if you would like a demo ( or assistance with doing a proof of concept.

I’m getting the following error when trying to install the gravity image on the target machine:

[ERROR]: failed to enable /home/ec2-user/gravity/.gravity/gravity-installer.service: Failed to enable unit: Access denied
, error enabling the service

@Sayeed try disabling selinux: setenforce 0 and see if you can proceed.

Can you show the command you use for installation and describe your environment (user, SELinux status, OS distro, etc.)?

Thanks. I’ve set this to 0.

I’ve actually rebuilt the node and I’m using RHEL7.7. I’ve made sure selinux is disabled and no longer get the installer error. However, I am using the following command:

./gravity install --advertise-addr= --token=sayeed --cluster=“devetest” --flavor=“triple” --cloud-provider=generic

The error I now get is: Connecting to installer [ERROR]: context deadline exceeded

The gravity-system.log output:

INFO [PROCESS] Stopping listener mode:installer utils/logginghook.go:56
DEBU [PROC:1] Service is completed and removed. service:gravity.listener utils/logginghook.go:56
WARN Command failed. error:[
Original Error: trace.NotFoundError install flavor "triple" not found
Stack Trace:
** /gopath/src/
** /gopath/src/*
** /gopath/src/**
** /gopath/src/**
** /gopath/src/**
** /gopath/src/**
** /gopath/src/**
** /gopath/src/**
** /gopath/src/ main.main**
** /go/src/runtime/proc.go:200 runtime.main**
** /go/src/runtime/asm_amd64.s:1337 runtime.goexit**
User Message: install flavor "triple" not found
] utils/logginghook.go:56

install flavor “triple” not found I assume that the command l parameters I’m using are incorrect?

Found the issue - triple isn’t specified as a flavor in the manifest.