Skip to main content

Cluster Management

This section describes the process of deploying a Kubernetes cluster via Astro platform on your AWS or GCP account.

Introduction

There are two types of Kubernetes clusters that you can deploy on your AWS or GCP account:

  • Self-Hosted K8s Clusters: These are Vanilla Kubernetes clusters that Astro platform will manage on your behalf.
  • Managed K8s Clusters: These are Kubernetes clusters that are deployed and managed by Astro platform but uses the cloud provider's managed service for the control plane.

More specifically, you can choose between the following cloud providers:

  • AWS: You can choose to deploy your cluster on your own VPC or use the dedicated VPC that Astro platform will create for you.
  • GCP: You can choose to deploy your cluster on your own VPC or use the dedicated VPC that Astro platform will create for you.

Self-Hosted Clusters

This is vanilla kubernetes cluster that astro platform will manage on your behalf.

AWS

This section describes the process of deploying a Kubernetes cluster on your AWS account.

API Specification
Cluster API Specification
clusterName: aws-k8s-dev # name of the cluster
provider: aws # provider of the cluster
notification: # optional, notification will be sent to the slack channel
type: slack
slack:
webhookURL: https://hooks.slack.com/services/XXXXX # your slack webhook url
region: us-west-2 # region of the cluster
provisioner:
type: selfHosted # type of the provisioner
selfHosted:
accountId: <your-aws-account-id> # your aws account id
# networkId: vpc-018f2dec8bb5ddfdd # bring your own VPC
bucketName: <bucket-name> # bucket name to store the cluster configuration
credentials: # credentials to access the cluster
type: static # type of the credentials
data:
AWS_ACCESS_KEY_ID: <your-aws-access-key-id> # your aws access key id
AWS_SECRET_ACCESS_KEY: <your-aws-secret-access-key> # your aws secret access key
clusterSpec:
dataPlane: # specification of the data plane
nodeGroups: # specification of the node groups
- name: test-mg # name of the node group
minNode: 3 # minimum number of nodes, 3 is good default given we use three availability zones
maxNode: 6 # maximum number of nodes
machineTypes: # machine types of the nodes
- t3.large # machine type of the nodes
labels: # labels of the nodes
foo: "bar"
controlPlane: # specification of the control plane
nodeGroup:
name: control-plane
machineTypes:
- t3.medium
Prerequisites

Make sure to follow the prerequisites before you start.

For more information about the cluster specification, see

Operations

GCP

This section describes the process of deploying a Kubernetes cluster on your GCP account.

API Specification
Cluster API Specification
clusterName: foo-cluster # name of the cluster
provider: gcp # provider of the cluster
notification: # optional, notification will be sent to the slack channel
type: slack # type of the notification
slack:
webhookURL: https://hooks.slack.com/services/xxxx # your slack webhook url
region: us-west2 # region of the cluster
provisioner:
type: selfHosted # type of the provisioner
selfHosted:
# this is the gcp project id
accountId: xxxx # your gcp project id
# networkId: vpc-018f2dec8bb5ddfdd
bucketName: <bucket-name> # bucket name to store the cluster configuration
credentials: # credentials to access the cluster
type: static # type of the credentials
data:
GOOGLE_APPLICATION_CREDENTIALS: <path-to-your-gcp-credentials> # path to your gcp credentials
clusterSpec:
dataPlane: # specification of the data plane
nodeGroups: # specification of the node groups
- name: test-mg # name of the node group
minNode: 3 # minimum number of nodes, 3 is good default given we use three availability zones
maxNode: 6 # maximum number of nodes
instanceType: spot # ondemand or spot
machineTypes:
- e2-medium # machine type of the nodes
labels: # labels of the nodes
hello: "test"
controlPlane: # specification of the control plane
nodeGroup: # specification of the node group
name: control-plane # name of the node group
machineTypes: # machine type of the nodes
- e2-medium # machine type of the nodes\

For more information about the cluster specification, see

Operations

Managed Clusters

This is the version of Kubernetes cluster that is deployed and managed by Astro platform but uses the cloud provider's managed service for the control plane.

EKS

This section describes the process of deploying a Kubernetes cluster on your AWS account.

API Specification
Cluster API Specification
clusterName: <cluster-name> # name of the cluster
provider: aws # provider of the cluster
notification: # optional, notification will be sent to the slack channel
type: slack # type of the notification
slack:
webhookURL: https://hooks.slack.com/services/xxxx # your slack webhook url
region: us-west-2 # region of the cluster
provisioner:
type: eks # type of the provisioner
eks:
accountId: <your-aws-account-id> # your aws account id
credentials: # credentials to access the cluster
type: dynamic # type of the credentials
#approvalWorkflow: true
clusterSpec: # specification of the cluster
dataPlane: # specification of the data plane
nodeGroups: # specification of the node groups
- name: test-node-group
minNode: 3 # minimum number of nodes, 3 is good default given we use three availability zones
maxNode: 6 # maximum number of nodes
machineTypes: # machine types of the nodes
- t3.medium
labels: # labels of the nodes
hello: test
Prerequisites

Make sure to follow the prerequisites before you start.

Please refer to the following documents for more information about the cluster specification:

Operations

Cluster Operations

These are the operations that you can perform on the cluster.

🚀 Cluster Operations

These are the operations that you can perform on the cluster.

📈 Apply Cluster Configuration

To apply the updated cluster configuration, execute the following command (admin role required):

astroctl clusters apply -f <cluster-config.yaml>

🗑️ Delete Cluster

To delete a cluster, execute the following command (admin role required):

astroctl clusters delete <cluster-name>

🛠️ Get Cluster Details

To get the details of a cluster, execute the following command (no admin required):

astroctl clusters get <cluster-name>

🔑 Manage Kubeconfig

To generate the kubeconfig file for a cluster, execute the following command (no admin required):

astroctl clusters generate-kubeconfig <cluster-name>

To set the context for a cluster, execute the following command (no admin required):

astroctl clusters set-context <cluster-name>

📊 Check Cluster Status

This command will show the status of the cluster.

astroctl clusters get <cluster-name>

Note The status subcommand is not available yet!. If your cluster is stuck in INPROGRESS, Please contact Astro platform team for help.

🔄 Upgrade Cluster

TBD