Please refer to this postagem for the latest version.

O Operador autônomo do Couchbase makes it extremely easy to configure and manage Couchbase Server deployments on kubernetes clusters on public and private clouds. Couchbase Mobile deployments require a Sync Gateway cluster in addition to Couchbase Server clusters. A Sync Gateway cluster typically consisting of two or more Sync Gateway nodes fronted by a Load Balancer responsible for balancing inbound requests from clients.

A Sync Gateway container must be treated like any other Application server container. To that end, the Couchbase operator does not manage the deployment of Sync Gatway cluster. However, the good news is that the deployment and management of Sync Gateway cluster using Kubernetes is extremely straightforward and takes a few steps to get going.

Reference Architecture

This is a reference architecture of a Couchbase Mobile cluster on Kubernetes :

While there is nothing “Couchbase specific” in the deployment of Sync Gateway, we do make the following recommendations

  • Use the Kubernetes Deployment Controller for deploying Sync Gateway containers. Deployment Containers allow you to define replicas and manage rollouts and rollbacks.
  • Use a secret for storing the Sync Gatway Config file. This is important as the Sync Gateway config file holds the RBAC credentials that is used for the Sync Gateway node to connect to Couchbase Server cluster.
  • Configure a Load Balancer with an external IPAddress that Couchbase Lite and other external clients can connect to. A load balancer can only be configured in a cloud environment.

Note that at the present time, Sync Gateway pods must be deployed on the same Kubernetes cluster as Couchbase Server. You can enforce separation of concerns and avoid resource contention by configurando the nodes that would run Couchbase Server or Sync Gateway pods, through Espaços de nomes, by specifying strict resource usage limits and configurating network access rules to control traffic between Couchbase Server and Sync Gateway cluster.

Tutorial

We have put together a step-by-step tutorial of how to deploy and manage a Sync Gateway cluster on Kubernetes. The tutorial also includes relevant .yaml files for configuring the Sync gateway cluster and Load Balancer.

The instructions in the tutorial apply to any Kubernetes enviornment. The differences that you will encounter between the managed environments will primarily be in the use of platform specific command line tools, in the console UI and in the configuration of RBAC. For instance, you would use nuvem on Google Kubernetes Engine (GKE), Azure CLI on Azure Container Service (AKS) and AWS IAM Authenticator for Kubernetes for Amazon Elastic Container Service(EKS). The instructions on how RBAC is setup is also platform specific. However, these platform specific variations have no bearing on the Sync Gateway deployment instructions.

Here are the direct links for setting up Couchbase server cluster on popular managed Kubernetes environments. Once the Couchbase Server is deployed, follow the steps in Sync Gateway tutorial to deploy the Sync Gateway cluster.

  • Instructions for setting up Couchbase Server cluster with Amazon Elastic Container Service for Kubernetes (EKS) on Amazon Web Services (AWS) is outlined in this tutorial
  • Instructions for setting up Couchbase Server cluster with Azure Container Service (AKS) on Azure Cloud Platform is outlined in this postagem no blog
  • Instructions for setting up Couchbase Server cluster Google Kubernetes Engine (GKE) on Google Cloud Platform (GCP) will be coming soon.

O que vem a seguir

As you probably gathered from the tutorial, it only takes a couple of steps to deploy your Sync Gateway containers using Kubernetes.

Se tiver dúvidas ou comentários, deixe um comentário abaixo ou entre em contato comigo pelo Twitter @rajagp ou envie-me um e-mail priya.rajagopal@couchbase.com. O Fóruns do Couchbase são outro bom lugar para entrar em contato com perguntas.

Agradecimentos

Gostaria de agradecer a Matt Carabine and James Nocentini for their feedback and support towards the development of the tutorial.

 

Autor

Postado por Priya Rajagopal, Diretora Sênior, Gerenciamento de Produtos

Priya Rajagopal é diretora sênior de gerenciamento de produtos da Couchbase, responsável pelas plataformas de desenvolvedor para a nuvem e a borda. Ela desenvolve software profissionalmente há mais de 20 anos em vários cargos técnicos e de liderança de produtos, com mais de 10 anos de foco em tecnologias móveis. Como delegada de padrões de IPTV da TISPAN, ela foi uma das principais colaboradoras das especificações de padrões de IPTV. Ela tem 22 patentes nas áreas de rede e segurança de plataforma.

Deixar uma resposta