Follow these steps to uninstall or restart your YOUnite Cluster using Docker and Kubernetes inside of your Amazon Web Services (AWS) account.

Requirements

  • You will need the tools and environment variables covered in the AWS Deployment Configuration guide.

  • Make sure you are logged in as the appropriate Cluster Administrator IAM user as defined in the AWS Deployment Configuration guide i.e. the IAM user that configured the cluster.

aws iam get-user

Updating the YOUnite Cluster Configuration

If changes are required for one of the YOUnite services, change directories to the cluster_config directory and update the appropriate YAML deployment file(s) or the cluster-props.env file and apply it to the cluster.

For example to update the database configuration:

vi younite-db-deployment.yaml

Save changes and then run the apply.sh script:

./apply.sh

Delete the Password From the Registry

kubectl delete secret younite-registry

Suspend the Cluster

kops edit ig --name $KOPS_CLUSTER_NAME nodes

Set both the spec maxSize and minSize to 0.

Update the cluster:

kops update cluster --yes

Restart the Cluster

First Suspend the Cluster. Then:

kops edit ig --name $KOPS_CLUSTER_NAME nodes

Set both the spec maxSize and minSize to 3 (or larger)

Update the cluster:

kops update cluster --yes

Delete the Cluster

First suspend the cluster (see above).

kops delete cluster --state=$KOPS_STATE_STORE --yes

(it typically makes several retries to deleting resources)

Remove the S3 Bucket

Deleting the cluster should remove its S3 bucket. To be safe check if the S3 bucket exists:

aws s3 ls $KOPS_STATE_STORE

If it exists, then remove it:

aws s3 rb $KOPS_STATE_STORE --force

In Case There is a Versioning Error

By default, bucket versioning is turned off when a bucket is created. If versioning is turned on for the above bucket, then:

  • login to the AWS Management Console

  • In the upper left corner, select US East (N. Virginia)us-east-1 from the region pulldown

  • Navigate to the S3 Dashboard. and remove the bucket - you will get prompted to confirm the deletion.

Validate Your Cluster Has Shutdown

Accessing the URL to the Kubernetes dashboard should return a NOT FOUND response.

Also, login to your AWS console and check if there are any:

  • Running instances containing the cluster’s name e.g. younite-api (make sure you have the correct region selected in the upper right pulldown).

    If you try to terminate them and they restart, then the Auto Scaling group needs to be removed. Navigate to the Auto Scaling Groups page and delete the two groups associated with the cluster:

    100%

    Got back to the ec2 screen and terminate the instances associated with the cluster you are terminating.

  • From the ec2 dashboard, validate that all load balancers associated with the cluster are terminated. You can identify YOUnite cluster load balancers by looking at the name associated with the load balancers Source Security Group:

    AWS SourceSecurityGroup