Setting up a Kubernetes Cluster on AWS

Set up a Kubernetes cluster with AWS for running TIBCO BusinessEvents® application.

Procedure

Creating Cluster

  1. 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://be-bucket
    For more information on Amazon Simple Storage Service (Amazon S3), see the Amazon S3 Documentation at https://aws.amazon.com/documentation/s3/.
  2. 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 becluster.k8s.local --state s3://<s3-bucket-name> --yes
    Where,
    • s3-bucket-name is the name of the S3 storage created earlier.
    • becluster.k8s.local is the name of the cluster being created. Use k8s.local prefix to identify a gossip-based Kubernetes cluster and you can skip the DNS configuration.
    For more information on the kops create cluster command either use the help parameter or refer to the kops tool documentation at https://github.com/kubernetes/kops/tree/master/docs.

Validating Cluster

  1. 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.

Deleting the Cluster

  1. If needed, you can delete the cluster using the following command:
    kops delete cluster becluster.k8s.local --state=s3://<s3-bucket-name> --yes