From 03d6aa4d65973b6f66e7f4a078fd3e8edbe0cac2 Mon Sep 17 00:00:00 2001 From: Dima Date: Thu, 14 Nov 2024 16:59:39 +0300 Subject: [PATCH 1/4] K8SPSMDB-1152 Update images with multi arch support --- docs/aks.md | 1 - docs/images.md | 18 ++++++++++++------ 2 files changed, 12 insertions(+), 7 deletions(-) diff --git a/docs/aks.md b/docs/aks.md index dbcd7715..084e2731 100644 --- a/docs/aks.md +++ b/docs/aks.md @@ -17,7 +17,6 @@ The following tools are used in this guide and therefore should be preinstalled: Also, you need to sign in with Azure CLI using your credentials according to the [official guide :octicons-link-external-16:](https://docs.microsoft.com/en-us/cli/azure/authenticate-azure-cli). -## Create and configure the AKS cluster To create your cluster, you will need the following data: diff --git a/docs/images.md b/docs/images.md index b7ec5082..ccc5d0da 100644 --- a/docs/images.md +++ b/docs/images.md @@ -5,20 +5,26 @@ Percona Operator for Percona Server for MongoDB: | Image | Digest | |:-------------------------------------------------------|:-----------------------------------------------------------------| -| percona/percona-server-mongodb-operator:1.17.0 (x86_64)| 34bfbaa85fa4dcdd1652603cfeab6e1afbd6282fd556d3fb32e94211ecab85c2 | -| percona/percona-server-mongodb-operator:1.17.0 (ARM64) | 788168be72386bcf94607ec0fd083f689cc3133227133abb938e628fe651259c | -| percona/pmm-client:2.42.0 | 14cb96de47e3bc239bf285f22ec6f170b4a1181301b19100f5b7dc22c210bf8c | -| percona/percona-backup-mongodb:2.5.0 | 7f0801c99f933fe4ac84bd3397a766e9ff7ef43c7d38babe220b34341fced353 | +| percona/percona-server-mongodb-operator:1.18.0 (x86_64)| cf3f870e8b6e052a1cca017d651ad9091b67ca833dc9a16a7fcacfcfc19df9f6 | +| percona/percona-server-mongodb-operator:1.18.0 (ARM64) | cc1ddacfe4af6a6a13c700a1d82c6786a3b1f40343eda4b2392d68c64a7cf4e4 | +| percona/pmm-client:2.43.2 (x86_64) | e381f607a48ce6dccf24e732067323dce751115228f1f377936b9ed2bf31942d | +| percona/pmm-client:2.43.2 (ARM64) | 605ddda6aa64c9b8766dccf20cb593cf92eab5100ab10a9ed8462f8b7e54ba39 | +| percona/percona-backup-mongodb:2.7.0-multi (x86_64) | 4e29486419f06be69e5ce15490ff46b68cf44958c9ca716fa1eaba17cf32701b | +| percona/percona-backup-mongodb:2.7.0-multi (ARM64) | 6d04f21185c2931514790e18ca982603e2453fd431f922be3bef4c42460083d5 | +| percona/percona-server-mongodb:7.0.14-8-multi (x86_64) | ed932d4e7231dcb793bf609f781226a8393aa8958b103339f4a503a8f70ed17e | +| percona/percona-server-mongodb:7.0.14-8-multi (ARM64) | 052f84ee926ad9b5146f08a7e887820342d65b757a284c2f0ea8e937bb51cd7b | | percona/percona-server-mongodb:7.0.12-7 | 7f00e19878bd143119772cd5468f1f0f9857dfcd2ae2f814d52ef3fa7cff6899 | | percona/percona-server-mongodb:7.0.8-5 | f81d1353d5497c5be36ee525f742d498ee6e1df9aba9502660c50f0fc98743b6 | +| percona/percona-server-mongodb:6.0.18-15-multi (x86_64)| d197ce16ab0eed6df25e632b92dea5ce448e549e02028f39b78f5730c2ffef36 | +| percona/percona-server-mongodb:6.0.18-15-multi (ARM64) | 7fd1d8f74f71dea6ad423e8e202a0617bdd1e8783f2b5cb071b5281685ce0adf | | percona/percona-server-mongodb:6.0.16-13 | 1497e58e39497d8425ccd053898dc323338d6eb3f0e3c4c223f9d5a468da7931 | | percona/percona-server-mongodb:6.0.15-12 | f12dd271d78cf3e70088fea0c420e8c03703457d8a5959b645053546bff94dea | | percona/percona-server-mongodb:6.0.9-7 | 5ef8404e200a680a67f0a94599963e17c029ebe5e0045b60b45062bba127c505 | | percona/percona-server-mongodb:6.0.5-4 | b6f875974c59d8ea0174675c85f41668460233784cbf2cbe7ce5eca212ac5f6a | -| percona/percona-server-mongodb:6.0.4-3 | df46c596e6f7339badec3b36f7f209689c3f31e5391ef714be0701deef555570 | +| percona/percona-server-mongodb:5.0.29-25-multi (x86_64)| 732eb60f2d3750aaf654ada7f52d2869928be885f6b7012666d6777f85411b74 | +| percona/percona-server-mongodb:5.0.29-25-multi (ARM64) | 4fef96a66df35e0ad3c28003970ef3b7fb5ebbcbb61c23172dc3bc8c77cc13a3 | | percona/percona-server-mongodb:5.0.28-24 | 7f9ac418bcd22fc8fbcf6ddba9aff3142a07ddfdfbe58efd5d55d5f7c9f43aaf | | percona/percona-server-mongodb:5.0.26-22 | 50873aa99f36319c5590ad2bddf407b4df44728bee86025ccae1bfed9329a0d1 | | percona/percona-server-mongodb:5.0.20-17 | 56a19362b1082c37eb5e7069d05f7bb281a09c4788101faeea15a50bb8a49e8b | | percona/percona-server-mongodb:5.0.15-13 | f0b5a8291d778d7419c20dcf0d1985a0f33770d05e94dba41db8f071957e9929 | -| percona/percona-server-mongodb:5.0.14-12 | 38ced404ec798d78943c234ab4f39ee237f3013095a5cd581978cfdf0fbce2f9 | From 93bf310c49f82ea85153bcd912d92734c2169aa9 Mon Sep 17 00:00:00 2001 From: Dima Date: Thu, 14 Nov 2024 17:00:49 +0300 Subject: [PATCH 2/4] fix wrong deletion --- docs/aks.md | 1 + 1 file changed, 1 insertion(+) diff --git a/docs/aks.md b/docs/aks.md index 084e2731..dbcd7715 100644 --- a/docs/aks.md +++ b/docs/aks.md @@ -17,6 +17,7 @@ The following tools are used in this guide and therefore should be preinstalled: Also, you need to sign in with Azure CLI using your credentials according to the [official guide :octicons-link-external-16:](https://docs.microsoft.com/en-us/cli/azure/authenticate-azure-cli). +## Create and configure the AKS cluster To create your cluster, you will need the following data: From 8f023ce5eec5589037075634ee095b9f69718714 Mon Sep 17 00:00:00 2001 From: Dima Date: Thu, 14 Nov 2024 17:16:37 +0300 Subject: [PATCH 3/4] update installation instructions --- docs/aks.md | 56 +++------------- docs/eks.md | 152 ++++++++----------------------------------- docs/gke.md | 181 ++++++++++++++++------------------------------------ 3 files changed, 90 insertions(+), 299 deletions(-) diff --git a/docs/aks.md b/docs/aks.md index dbcd7715..6a90d2aa 100644 --- a/docs/aks.md +++ b/docs/aks.md @@ -77,66 +77,30 @@ az aks get-credentials --resource-group my-resource-group --name my-cluster-name 2. The Operator has been started, and you can deploy your MongoDB cluster: - === "For x86_64 architecture" - - - ``` {.bash data-prompt="$" } - $ kubectl apply -f https://raw.githubusercontent.com/percona/percona-server-mongodb-operator/v{{ release }}/deploy/cr.yaml - ``` - - ??? example "Expected output" - - ``` {.text .no-copy} - perconaservermongodb.psmdb.percona.com/my-cluster-name created - ``` - - !!! note - - This deploys default MongoDB cluster configuration, three mongod, three mongos, and three config server instances. Please see [deploy/cr.yaml :octicons-link-external-16:](https://raw.githubusercontent.com/percona/percona-server-mongodb-operator/v{{ release }}/deploy/cr.yaml) and [Custom Resource Options](operator.md) for the configuration options. You can clone the repository with all manifests and source code by executing the following command: + ``` {.bash data-prompt="$" } + $ kubectl apply -f https://raw.githubusercontent.com/percona/percona-server-mongodb-operator/v{{ release }}/deploy/cr.yaml + ``` - ``` {.bash data-prompt="$" } - $ git clone -b v{{ release }} https://github.com/percona/percona-server-mongodb-operator - ``` + ??? example "Expected output" - After editing the needed options, apply your modified `deploy/cr.yaml` file as follows: + ``` {.text .no-copy} + perconaservermongodb.psmdb.percona.com/my-cluster-name created + ``` - ``` {.bash data-prompt="$" } - $ kubectl apply -f deploy/cr.yaml - ``` + !!! note - === "For ARM64 architecture" - - Clone the repository with all manifests and source code by executing the following command: + This deploys default MongoDB cluster configuration, three mongod, three mongos, and three config server instances. Please see [deploy/cr.yaml :octicons-link-external-16:](https://raw.githubusercontent.com/percona/percona-server-mongodb-operator/v{{ release }}/deploy/cr.yaml) and [Custom Resource Options](operator.md) for the configuration options. You can clone the repository with all manifests and source code by executing the following command: ``` {.bash data-prompt="$" } $ git clone -b v{{ release }} https://github.com/percona/percona-server-mongodb-operator ``` - - Edit the `deploy/cr.yaml` configuration file: set `image` and `backup.image` Custom Resource options to special multi-architecture image versions by adding a `-multi` suffix to their tags: - - ```yaml - .... - image: percona/percona-server-mongodb:{{ mongodb70recommended }}-multi - ... - backup: - ... - image: percona/percona-backup-mongodb:{{ pbmrecommended }}-multi - ``` - Please note, that currently [monitoring with PMM](monitoring.md) is not supported on ARM64 configurations. - - After editing, apply your modified `deploy/cr.yaml` file as follows: + After editing the needed options, apply your modified `deploy/cr.yaml` file as follows: ``` {.bash data-prompt="$" } $ kubectl apply -f deploy/cr.yaml ``` - ??? example "Expected output" - - ``` {.text .no-copy} - perconaservermongodb.psmdb.percona.com/my-cluster-name created - ``` - The creation process may take some time. When the process is over your cluster will obtain the `ready` status. You can check it with the following command: diff --git a/docs/eks.md b/docs/eks.md index 9aea2f83..9eac2635 100644 --- a/docs/eks.md +++ b/docs/eks.md @@ -56,152 +56,50 @@ Also, you need to configure AWS CLI with your credentials according to the Deploy the Operator by applying the `deploy/bundle.yaml` manifest from the Operator source tree. - === "For x86_64 architecture" - - You can apply it without downloading, [using :octicons-link-external-16:](https://kubernetes.io/docs/reference/using-api/server-side-apply/) the following command: - - ``` {.bash data-prompt="$" } - $ kubectl apply --server-side -f https://raw.githubusercontent.com/percona/percona-server-mongodb-operator/v{{ release }}/deploy/bundle.yaml - ``` - - ??? example "Expected output" + You can apply it without downloading, [using :octicons-link-external-16:](https://kubernetes.io/docs/reference/using-api/server-side-apply/) the following command: - ``` {.text .no-copy} - customresourcedefinition.apiextensions.k8s.io/perconaservermongodbs.psmdb.percona.com serverside-applied - customresourcedefinition.apiextensions.k8s.io/perconaservermongodbbackups.psmdb.percona.com serverside-applied - customresourcedefinition.apiextensions.k8s.io/perconaservermongodbrestores.psmdb.percona.com serverside-applied - role.rbac.authorization.k8s.io/percona-server-mongodb-operator serverside-applied - serviceaccount/percona-server-mongodb-operator serverside-applied - rolebinding.rbac.authorization.k8s.io/service-account-percona-server-mongodb-operator serverside-applied - deployment.apps/percona-server-mongodb-operator serverside-applied - ``` - - === "For ARM64 architecture" - - Clone the repository with all manifests and source code by executing the following command: + ``` {.bash data-prompt="$" } + $ kubectl apply --server-side -f https://raw.githubusercontent.com/percona/percona-server-mongodb-operator/v{{ release }}/deploy/bundle.yaml + ``` - ``` {.bash data-prompt="$" } - $ git clone -b v{{ release }} https://github.com/percona/percona-server-mongodb-operator - ``` + ??? example "Expected output" - Edit the `deploy/bundle.yaml` file: add the following [affinity rules](constraints.md#affinity-and-anti-affinity) to the `spec` part of the `percona-server-mongodb-operator` Deployment: - - ```yaml hl_lines="15-23" - apiVersion: apps/v1 - kind: Deployment - metadata: - name: percona-server-mongodb-operator - spec: - replicas: 1 - selector: - matchLabels: - name: percona-server-mongodb-operator - template: - metadata: - labels: - name: percona-server-mongodb-operator - spec: - affinity: - nodeAffinity: - requiredDuringSchedulingIgnoredDuringExecution: - nodeSelectorTerms: - - matchExpressions: - - key: kubernetes.io/arch - operator: In - values: - - arm64 + ``` {.text .no-copy} + customresourcedefinition.apiextensions.k8s.io/perconaservermongodbs.psmdb.percona.com serverside-applied + customresourcedefinition.apiextensions.k8s.io/perconaservermongodbbackups.psmdb.percona.com serverside-applied + customresourcedefinition.apiextensions.k8s.io/perconaservermongodbrestores.psmdb.percona.com serverside-applied + role.rbac.authorization.k8s.io/percona-server-mongodb-operator serverside-applied + serviceaccount/percona-server-mongodb-operator serverside-applied + rolebinding.rbac.authorization.k8s.io/service-account-percona-server-mongodb-operator serverside-applied + deployment.apps/percona-server-mongodb-operator serverside-applied ``` - After editing, [apply :octicons-link-external-16:](https://kubernetes.io/docs/reference/using-api/server-side-apply/) your modified `deploy/bundle.yaml` file as follows: - - ``` {.bash data-prompt="$" } - $ kubectl apply --server-side -f deploy/bundle.yaml - ``` - - ??? example "Expected output" - - ``` {.text .no-copy} - customresourcedefinition.apiextensions.k8s.io/perconaservermongodbs.psmdb.percona.com serverside-applied - customresourcedefinition.apiextensions.k8s.io/perconaservermongodbbackups.psmdb.percona.com serverside-applied - customresourcedefinition.apiextensions.k8s.io/perconaservermongodbrestores.psmdb.percona.com serverside-applied - role.rbac.authorization.k8s.io/percona-server-mongodb-operator serverside-applied - serviceaccount/percona-server-mongodb-operator serverside-applied - rolebinding.rbac.authorization.k8s.io/service-account-percona-server-mongodb-operator serverside-applied - deployment.apps/percona-server-mongodb-operator serverside-applied - ``` - 2. The Operator has been started, and you can deploy your MongoDB cluster: - === "For x86_64 architecture" - - - ``` {.bash data-prompt="$" } - $ kubectl apply -f https://raw.githubusercontent.com/percona/percona-server-mongodb-operator/v{{ release }}/deploy/cr.yaml - ``` - - ??? example "Expected output" - - ``` {.text .no-copy} - perconaservermongodb.psmdb.percona.com/my-cluster-name created - ``` - - !!! note - - This deploys default MongoDB cluster configuration, three mongod, three mongos, and three config server instances. Please see [deploy/cr.yaml :octicons-link-external-16:](https://raw.githubusercontent.com/percona/percona-server-mongodb-operator/v{{ release }}/deploy/cr.yaml) and [Custom Resource Options](operator.md) for the configuration options. You can clone the repository with all manifests and source code by executing the following command: + ``` {.bash data-prompt="$" } + $ kubectl apply -f https://raw.githubusercontent.com/percona/percona-server-mongodb-operator/v{{ release }}/deploy/cr.yaml + ``` - ``` {.bash data-prompt="$" } - $ git clone -b v{{ release }} https://github.com/percona/percona-server-mongodb-operator - ``` + ??? example "Expected output" - After editing the needed options, apply your modified `deploy/cr.yaml` file as follows: + ``` {.text .no-copy} + perconaservermongodb.psmdb.percona.com/my-cluster-name created + ``` - ``` {.bash data-prompt="$" } - $ kubectl apply -f deploy/cr.yaml - ``` + !!! note - === "For ARM64 architecture" - - Edit the `deploy/cr.yaml` file: set the following [affinity rules](constraints.md#affinity-and-anti-affinity) in **all `affinity` subsections**: - - ```yaml hl_lines="2-11" - .... - affinity: - advanced: - nodeAffinity: - requiredDuringSchedulingIgnoredDuringExecution: - nodeSelectorTerms: - - matchExpressions: - - key: kubernetes.io/arch - operator: In - values: - - arm64 - ``` + This deploys default MongoDB cluster configuration, three mongod, three mongos, and three config server instances. Please see [deploy/cr.yaml :octicons-link-external-16:](https://raw.githubusercontent.com/percona/percona-server-mongodb-operator/v{{ release }}/deploy/cr.yaml) and [Custom Resource Options](operator.md) for the configuration options. You can clone the repository with all manifests and source code by executing the following command: - Also, set `image` and `backup.image` Custom Resource options to special multi-architecture image versions by adding a `-multi` suffix to their tags: - - ```yaml - ... - image: percona/percona-server-mongodb:{{ mongodb70recommended }}-multi - ... - backup: - ... - image: percona/percona-backup-mongodb:{{ pbmrecommended }}-multi + ``` {.bash data-prompt="$" } + $ git clone -b v{{ release }} https://github.com/percona/percona-server-mongodb-operator ``` - Please note, that currently [monitoring with PMM](monitoring.md) is not supported on ARM64 configurations. - - After editing, apply your modified `deploy/cr.yaml` file as follows: + After editing the needed options, apply your modified `deploy/cr.yaml` file as follows: ``` {.bash data-prompt="$" } $ kubectl apply -f deploy/cr.yaml ``` - ??? example "Expected output" - - ``` {.text .no-copy} - perconaservermongodb.psmdb.percona.com/my-cluster-name created - ``` - The creation process may take some time. When the process is over your cluster will obtain the `ready` status. You can check it with the following command: diff --git a/docs/gke.md b/docs/gke.md index 5c41f30d..c021928a 100644 --- a/docs/gke.md +++ b/docs/gke.md @@ -61,6 +61,36 @@ command in your local shell: $ gcloud container clusters get-credentials my-cluster-name --zone us-central1-a --project ``` +!!! note + + Using ARM64 cluster requires additional step: you need to remove [Kubernetes Node Taints :octicons-link-external-16:](https://kubernetes.io/docs/concepts/scheduling-eviction/taint-and-toleration/), which otherwise will prevent Pods of your cluster to be scheduled. + + You can check if there are any as follows: + + ```{.bash data-prompt="$" } + $ kubectl get nodes -o custom-columns="NAME:.metadata.name,TAINTS:.spec.taints" + ``` + + ??? example "Expected output" + + ``` {.text .no-copy} + NAME TAINTS + my-cluster-name-arm64-default-pool-9da8a595-25gk [map[effect:NoSchedule key:kubernetes.io/arch value:arm64]] + my-cluster-name-arm64-default-pool-9da8a595-5339 [map[effect:NoSchedule key:kubernetes.io/arch value:arm64]] + my-cluster-name-arm64-default-pool-9da8a595-7lf5 [map[effect:NoSchedule key:kubernetes.io/arch value:arm64]] + my-cluster-name-arm64-default-pool-9da8a595-mcgl [map[effect:NoSchedule key:kubernetes.io/arch value:arm64]] + my-cluster-name-arm64-default-pool-9da8a595-rvqk [map[effect:NoSchedule key:kubernetes.io/arch value:arm64]] + my-cluster-name-arm64-default-pool-9da8a595-tp05 [map[effect:NoSchedule key:kubernetes.io/arch value:arm64]] + ``` + + You can remove them with the following command: + + ```{.bash data-prompt="$" } + $ for node in $(kubectl get nodes -o custom-columns=NAME:.metadata.name --no-headers); do + kubectl taint nodes $node kubernetes.io/arch=arm64:NoSchedule- + done + ``` + Finally, use your [Cloud Identity and Access Management (Cloud IAM) :octicons-link-external-16:](https://cloud.google.com/iam) to control access to the cluster. The following command will give you the ability to create Roles and RoleBindings: @@ -90,151 +120,50 @@ $ kubectl create clusterrolebinding cluster-admin-binding --clusterrole cluster- Deploy the Operator by applying the `deploy/bundle.yaml` manifest from the Operator source tree. - === "For x86_64 architecture" + You can apply it without downloading, [using :octicons-link-external-16:](https://kubernetes.io/docs/reference/using-api/server-side-apply/) the following command: - You can apply it without downloading, [using :octicons-link-external-16:](https://kubernetes.io/docs/reference/using-api/server-side-apply/) the following command: - - ``` {.bash data-prompt="$" } - $ kubectl apply --server-side -f https://raw.githubusercontent.com/percona/percona-server-mongodb-operator/v{{ release }}/deploy/bundle.yaml - ``` - - ??? example "Expected output" - - ``` {.text .no-copy} - customresourcedefinition.apiextensions.k8s.io/perconaservermongodbs.psmdb.percona.com serverside-applied - customresourcedefinition.apiextensions.k8s.io/perconaservermongodbbackups.psmdb.percona.com serverside-applied - customresourcedefinition.apiextensions.k8s.io/perconaservermongodbrestores.psmdb.percona.com serverside-applied - role.rbac.authorization.k8s.io/percona-server-mongodb-operator serverside-applied - serviceaccount/percona-server-mongodb-operator serverside-applied - rolebinding.rbac.authorization.k8s.io/service-account-percona-server-mongodb-operator serverside-applied - deployment.apps/percona-server-mongodb-operator serverside-applied - ``` - - === "For ARM64 architecture" - - Clone the repository with all manifests and source code by executing the following command: - - ``` {.bash data-prompt="$" } - $ git clone -b v{{ release }} https://github.com/percona/percona-server-mongodb-operator - ``` - - Edit the `deploy/bundle.yaml` file: add the following [affinity rules](constraints.md#affinity-and-anti-affinity) to the `spec` part of the `percona-server-mongodb-operator` Deployment: - - ```yaml hl_lines="15-23" - apiVersion: apps/v1 - kind: Deployment - metadata: - name: percona-server-mongodb-operator - spec: - replicas: 1 - selector: - matchLabels: - name: percona-server-mongodb-operator - template: - metadata: - labels: - name: percona-server-mongodb-operator - spec: - affinity: - nodeAffinity: - requiredDuringSchedulingIgnoredDuringExecution: - nodeSelectorTerms: - - matchExpressions: - - key: kubernetes.io/arch - operator: In - values: - - arm64 - ``` + ``` {.bash data-prompt="$" } + $ kubectl apply --server-side -f https://raw.githubusercontent.com/percona/percona-server-mongodb-operator/v{{ release }}/deploy/bundle.yaml + ``` - After editing, [apply :octicons-link-external-16:](https://kubernetes.io/docs/reference/using-api/server-side-apply/) your modified `deploy/bundle.yaml` file as follows: + ??? example "Expected output" - ``` {.bash data-prompt="$" } - $ kubectl apply --server-side -f deploy/bundle.yaml + ``` {.text .no-copy} + customresourcedefinition.apiextensions.k8s.io/perconaservermongodbs.psmdb.percona.com serverside-applied + customresourcedefinition.apiextensions.k8s.io/perconaservermongodbbackups.psmdb.percona.com serverside-applied + customresourcedefinition.apiextensions.k8s.io/perconaservermongodbrestores.psmdb.percona.com serverside-applied + role.rbac.authorization.k8s.io/percona-server-mongodb-operator serverside-applied + serviceaccount/percona-server-mongodb-operator serverside-applied + rolebinding.rbac.authorization.k8s.io/service-account-percona-server-mongodb-operator serverside-applied + deployment.apps/percona-server-mongodb-operator serverside-applied ``` - ??? example "Expected output" - - ``` {.text .no-copy} - customresourcedefinition.apiextensions.k8s.io/perconaservermongodbs.psmdb.percona.com serverside-applied - customresourcedefinition.apiextensions.k8s.io/perconaservermongodbbackups.psmdb.percona.com serverside-applied - customresourcedefinition.apiextensions.k8s.io/perconaservermongodbrestores.psmdb.percona.com serverside-applied - role.rbac.authorization.k8s.io/percona-server-mongodb-operator serverside-applied - serviceaccount/percona-server-mongodb-operator serverside-applied - rolebinding.rbac.authorization.k8s.io/service-account-percona-server-mongodb-operator serverside-applied - deployment.apps/percona-server-mongodb-operator serverside-applied - ``` - 3. The Operator has been started, and you can deploy your MongoDB cluster: - === "For x86_64 architecture" - - ``` {.bash data-prompt="$" } - $ kubectl apply -f https://raw.githubusercontent.com/percona/percona-server-mongodb-operator/v{{ release }}/deploy/cr.yaml - ``` - - ??? example "Expected output" - - ``` {.text .no-copy} - perconaservermongodb.psmdb.percona.com/my-cluster-name created - ``` - - !!! note - - This deploys default MongoDB cluster configuration, three mongod, three mongos, and three config server instances. Please see [deploy/cr.yaml :octicons-link-external-16:](https://raw.githubusercontent.com/percona/percona-server-mongodb-operator/v{{ release }}/deploy/cr.yaml) and [Custom Resource Options](operator.md) for the configuration options. You can clone the repository with all manifests and source code by executing the following command: - - ``` {.bash data-prompt="$" } - $ git clone -b v{{ release }} https://github.com/percona/percona-server-mongodb-operator - ``` - - After editing the needed options, apply your modified `deploy/cr.yaml` file as follows: - - ``` {.bash data-prompt="$" } - $ kubectl apply -f deploy/cr.yaml - ``` - - === "For ARM64 architecture" + ``` {.bash data-prompt="$" } + $ kubectl apply -f https://raw.githubusercontent.com/percona/percona-server-mongodb-operator/v{{ release }}/deploy/cr.yaml + ``` - Edit the `deploy/cr.yaml` file: set the following [affinity rules](constraints.md#affinity-and-anti-affinity) in **all `affinity` subsections**: + ??? example "Expected output" - ```yaml hl_lines="2-11" - .... - affinity: - advanced: - nodeAffinity: - requiredDuringSchedulingIgnoredDuringExecution: - nodeSelectorTerms: - - matchExpressions: - - key: kubernetes.io/arch - operator: In - values: - - arm64 + ``` {.text .no-copy} + perconaservermongodb.psmdb.percona.com/my-cluster-name created ``` - Also, set `image` and `backup.image` Custom Resource options to special multi-architecture image versions by adding a `-multi` suffix to their tags: + !!! note - ```yaml - .... - image: percona/percona-server-mongodb:{{ mongodb70recommended }}-multi - ... - backup: - ... - image: percona/percona-backup-mongodb:{{ pbmrecommended }}-multi - ``` + This deploys default MongoDB cluster configuration, three mongod, three mongos, and three config server instances. Please see [deploy/cr.yaml :octicons-link-external-16:](https://raw.githubusercontent.com/percona/percona-server-mongodb-operator/v{{ release }}/deploy/cr.yaml) and [Custom Resource Options](operator.md) for the configuration options. You can clone the repository with all manifests and source code by executing the following command: - Please note, that currently [monitoring with PMM](monitoring.md) is not supported on ARM64 configurations. + ``` {.bash data-prompt="$" } + $ git clone -b v{{ release }} https://github.com/percona/percona-server-mongodb-operator + ``` - After editing, apply your modified `deploy/cr.yaml` file as follows: + After editing the needed options, apply your modified `deploy/cr.yaml` file as follows: ``` {.bash data-prompt="$" } $ kubectl apply -f deploy/cr.yaml ``` - ??? example "Expected output" - - ``` {.text .no-copy} - perconaservermongodb.psmdb.percona.com/my-cluster-name created - ``` - The creation process may take some time. When the process is over your cluster will obtain the `ready` status. You can check it with the following command: From 58c3260ade4e4a04e82f806464cb71be48c31e32 Mon Sep 17 00:00:00 2001 From: Dima Date: Thu, 14 Nov 2024 17:22:20 +0300 Subject: [PATCH 4/4] remove taints removal note --- docs/gke.md | 30 ------------------------------ 1 file changed, 30 deletions(-) diff --git a/docs/gke.md b/docs/gke.md index c021928a..fc58dfb1 100644 --- a/docs/gke.md +++ b/docs/gke.md @@ -61,36 +61,6 @@ command in your local shell: $ gcloud container clusters get-credentials my-cluster-name --zone us-central1-a --project ``` -!!! note - - Using ARM64 cluster requires additional step: you need to remove [Kubernetes Node Taints :octicons-link-external-16:](https://kubernetes.io/docs/concepts/scheduling-eviction/taint-and-toleration/), which otherwise will prevent Pods of your cluster to be scheduled. - - You can check if there are any as follows: - - ```{.bash data-prompt="$" } - $ kubectl get nodes -o custom-columns="NAME:.metadata.name,TAINTS:.spec.taints" - ``` - - ??? example "Expected output" - - ``` {.text .no-copy} - NAME TAINTS - my-cluster-name-arm64-default-pool-9da8a595-25gk [map[effect:NoSchedule key:kubernetes.io/arch value:arm64]] - my-cluster-name-arm64-default-pool-9da8a595-5339 [map[effect:NoSchedule key:kubernetes.io/arch value:arm64]] - my-cluster-name-arm64-default-pool-9da8a595-7lf5 [map[effect:NoSchedule key:kubernetes.io/arch value:arm64]] - my-cluster-name-arm64-default-pool-9da8a595-mcgl [map[effect:NoSchedule key:kubernetes.io/arch value:arm64]] - my-cluster-name-arm64-default-pool-9da8a595-rvqk [map[effect:NoSchedule key:kubernetes.io/arch value:arm64]] - my-cluster-name-arm64-default-pool-9da8a595-tp05 [map[effect:NoSchedule key:kubernetes.io/arch value:arm64]] - ``` - - You can remove them with the following command: - - ```{.bash data-prompt="$" } - $ for node in $(kubectl get nodes -o custom-columns=NAME:.metadata.name --no-headers); do - kubectl taint nodes $node kubernetes.io/arch=arm64:NoSchedule- - done - ``` - Finally, use your [Cloud Identity and Access Management (Cloud IAM) :octicons-link-external-16:](https://cloud.google.com/iam) to control access to the cluster. The following command will give you the ability to create Roles and RoleBindings: