Using Percona Kubernetes Operators for Percona XtraDB Cluster and Percona Server for MongoDB in Amazon

Percona Kubernetes Operators AWSUnless you are using Amazon Aurora or RDS, setting up clustering software still can be complicated and that’s why we want to offer options to simplify database cluster management in Amazon AWS. This time I will be looking at Percona Kubernetes Operators, for both Percona XtraDB Cluster and Percona Server for MongoDB.

Some time ago I showed some examples in Google Cloud in my post Percona DBaaS CLI to Simplify Deployment in Kubernetes, and now it’s time to take a look at AWS. The assumption is that you have Amazon Elastic Kubernetes Service running already; if not, there should be plenty of resources to look at and this is out of our scope.

To manage Kubernetes resources and Percona Kubernetes Operators we need access to a kubeconfig. Although it is possible to create kubeconfig manually, the easiest way to get it is to use the aws command line utility:

Now I also assume you have a node pool running, which will be used to run our database instances on.

The easiest way to create Percona XtraDB Cluster is:

You will see confirmation of the successful operation:

And for Percona Server for MongoDB, the command is:

And just in a single command, we have 3 nodes of MongoDB replica-sets running, which we can check with:

There are a few points to review.

External Connection

As you can see, the command  mongo mongodb://clusterAdmin:LkXSJHhgZMg2UiYlgC@localhost:27017/admin?ssl=false offers to connect from the localhost. How do we connect to the replica set from the outside network?

This can be done by creating LoadBalancer service in EKS, and AWS will automatically assign the public IP address:

And we can connect to our Percona Server for MongoDB instances as:

Or you can create external access from the percona-dbaas with:

Storage Type

Another thing you may want to customize is the storage type.

By default, you will see:

The default-created storage class is “gp2”, which you can confirm from Amazon EC2 console:


(volumes were created and assigned automatically)


Volume Size

The default volume size is 6Gi, and it is also customizable:

The command will create volumes 250Gi in size.


The points I wanted to show with this post are:

  • Creating database clusters in AWS should not be complicated, even beside Aurora and RDS.
  • At Percona we offer solutions you can use to create Percona XtraDB Cluster and Percona Server for MongoDB replicasets in minutes.
  • Kubernetes by itself may sound complicated, but it really allows us to simplify a lot of operations.

Learn more about the history of Oracle, the growth of MongoDB, and what really qualifies software as open source. If you are a DBA, or an executive looking to adopt or renew with MongoDB, this is a must-read!

Download “Is MongoDB the New Oracle?”

Share this post

Leave a Reply