Install YugabyteDB Anywhere software - Kubernetes
Install YugabyteDB Anywhere on a Kubernetes Cluster
You install YugabyteDB Anywhere on a Kubernetes cluster as follows:
-
Create a namespace by executing the following
kubectl create namespace
command:kubectl create namespace yb-platform
-
Apply the YugabyteDB Anywhere secret that you obtained from Yugabyte by running the following
kubectl create
command:kubectl create -f yugabyte-k8s-secret.yml -n yb-platform
Expect the following output notifying you that the secret was created:secret/yugabyte-k8s-pull-secret created
-
Run the following
helm repo add
command to clone the YugabyteDB charts repository:helm repo add yugabytedb https://charts.yugabyte.com
A message similar to the following should appear:"yugabytedb" has been added to your repositories
To search for the available chart version, run this command:helm search repo yugabytedb/yugaware --version 2.13.1
The latest Helm Chart version and App version will be displayed:NAME CHART VERSION APP VERSION DESCRIPTION yugabytedb/yugaware 2.13.1 2.13.1.0-b112 YugaWare is YugaByte Database's Orchestration a...
-
Run the following
helm install
command to install the YugabyteDB Anywhere (yugaware
) Helm chart:helm install yw-test yugabytedb/yugaware --version 2.13.1 -n yb-platform --wait
-
Optionally, set the TLS version for Nginx frontend by using
ssl_protocols
operational directive in the Helm installation, as follows:helm install yw-test yugabytedb/yugaware --version 2.13.1 -n yb-platform --wait --set tls.sslProtocols="TLSv1.2"
-
Use the following command to check the service:
kubectl get svc -n yb-platform
The following output should appear:NAME TYPE CLUSTER-IP EXTERNAL-IP PORT(S) AGE yw-test-yugaware-ui LoadBalancer 10.111.241.9 34.93.169.64 80:32006/TCP,9090:30691/TCP 2m12s
-
Use the following command to check that all the pods have been initialized and are running:
kubectl get pods -n yb-platform
The following output should appear:NAME READY STATUS RESTARTS AGE yw-test-yugaware-0 4/4 Running 0 12s
Note that even though the preceding output indicates that theyw-test-yugaware-0
pod is running, it does not mean that YugabyteDB Anywhere is ready to accept your queries. If you openlocalhost:80
and see an error (such as 502), it means thatyugaware
is still being initialized. You can check readiness ofyugaware
by executing the following command:kubectl logs --follow -n yb-platform yw-test-yugaware-0 yugaware
And output similar to the following would confirm that there are no errors and that the server is running:[info] AkkaHttpServer.scala:447 [main] Listening for HTTP on /0.0.0.0:9000
If YugabyteDB Anywhere fails to start for the first time, verify that your system meets the installation requirements, as per Prepare the Kubernetes environment.
Customize YugabyteDB Anywhere
You can customize YugabyteDB Anywhere on a Kubernetes cluster in a number of ways, such as the following:
-
You can change CPU and memory resources by executing a command similar to the following:
helm install yw-test yugabytedb/yugaware -n yb-platform \ --version 2.13.1 \ --set yugaware.resources.requests.cpu=2 \ --set yugaware.resources.requests.memory=4Gi \ --set yugaware.resources.limits.cpu=2 \ --set yugaware.resources.limits.memory=4Gi \ --set prometheus.resources.requests.mem=6Gi
-
You can disable the public-facing load balancer by providing the annotations to YugabyteDB Anywhere service for disabling that load balancer. Since every cloud provider has different annontations for doing this, refer to the following documentation:
For example, for a GKE version earlier than 1.17, you would run a command similar to the following:helm install yw-test yugabytedb/yugaware -n yb-platform \ --version 2.13.1 \ --set yugaware.service.annotations."cloud\.google\.com\/load-balancer-type"="Internal"
Delete the Helm Installation of YugabyteDB Anywhere
To delete the Helm installation, run the following command:
helm uninstall yw-test -n yb-platform