Setting up a Kubernetes Cluster on AWS
Set up a Kubernetes cluster with AWS for running Hawk Container Edition components.
Procedure
-
Create an S3 storage to store the cluster configuration and state. You can use either AWS CLI or AWS console to create the storage.
The sample AWS CLI command for creating S3 storage is:
aws s3 mb s3://hkce-bucket
For more information about Amazon Simple Storage Service (Amazon S3), see Amazon S3 Documentation. -
Create the Kubernetes cluster on AWS using the following command:
kops create cluster --zones us-west-2a --master-zones us-west-2a --master-size t2.large --node-size t2.large --name hkcecluster.k8s.local --state s3://<s3-bucket-name> --yes
For more information about the kops create cluster command either use the help parameter or see kops Documentation .
-
Validate your cluster using the validate command.
kops validate cluster
Node and master must be in ready state. The kops utility stores the connection information at ~/.kops/config, and kubectl uses the connection information to connect to the cluster. -
If needed, you can delete the cluster using the following command:
kops delete cluster hkcecluster.k8s.local --state=s3://<s3-bucket-name> --yes
Copyright © Cloud Software Group, Inc. All rights reserved.