66CrateDB and Kubernetes are a great match.
77:::
88
9- CrateDB’s [ horizontally scalable] ` shared-nothing architecture ` lends itself
9+ CrateDB’s [ horizontally scalable] [ shared-nothing architecture] lends itself
1010well to [ containerization] .
1111
1212[ Kubernetes] is an open-source container orchestration system for the
@@ -15,8 +15,8 @@ management, deployment, and scaling of containerized systems.
1515Together, Docker and Kubernetes are a fantastic way to deploy and scale CrateDB.
1616
1717:::{NOTE}
18- While Kubernetes works with a variety of container technologies , this
19- document only covers its use with Docker .
18+ While Kubernetes supports multiple container runtimes , this document
19+ uses Docker-compatible container images .
2020:::
2121
2222:::{SEEALSO}
@@ -41,7 +41,7 @@ You can create a resource like so:
4141
4242``` console
4343sh $ kubectl create -f crate-controller.yaml --namespace crate
44- statefulset.apps/crate-controller created
44+ statefulset.apps/crate created
4545```
4646
4747Here, we are creating a [ StatefulSet] controller in the ` crate ` namespace
@@ -149,6 +149,12 @@ load balancers.
149149For local development, [Minikube] provides a LoadBalancer service.
150150:::
151151
152+ :::{WARNING}
153+ Ensure proper network controls and authentication are in place before
154+ exposing ports 4200 (HTTP) and 5432 (PostgreSQL) via a LoadBalancer.
155+ Restrict source IPs and configure users/roles to avoid unauthorized access.
156+ :::
157+
152158### Controller
153159
154160A Kubernetes [pod] is a group of one or more containers. Pods are designed to
@@ -213,7 +219,7 @@ spec:
213219 # Use the CrateDB 5.1.1 Docker image.
214220 image : crate:5.1.1
215221 # Pass in configuration to CrateDB via command-line options.
216- # We are setting the name of the node's explicitly, which is
222+ # We are setting the node name explicitly, which is
217223 # needed to determine the initial master nodes. These are set to
218224 # the name of the pod.
219225 # We are using the SRV records provided by Kubernetes to discover
@@ -228,7 +234,7 @@ spec:
228234 - -Cgateway.expected_data_nodes=${EXPECTED_NODES}
229235 - -Cpath.data=/data
230236 volumeMounts :
231- # Mount the `/data` directory as a volume named `data`.
237+ # Mount the `/data` directory as a volume named `data`.
232238 - mountPath : /data
233239 name : data
234240 resources :
@@ -247,7 +253,7 @@ spec:
247253 name : postgres
248254 # Environment variables passed through to the container.
249255 env :
250- # This is variable is detected by CrateDB.
256+ # This variable is detected by CrateDB.
251257 - name : CRATE_HEAP_SIZE
252258 value : " 256m"
253259 # The rest of these variables are used in the command-line
@@ -333,34 +339,31 @@ You can then use this in your controller configuration with something like this:
333339[...]
334340 volumeClaimTemplates:
335341 - metadata:
336- name: persistant -data
342+ name: cratedb -data
337343 spec:
338344 # This will create one 100GB read-write Azure Managed Disks volume
339345 # for every CrateDB pod.
340346 accessModes: [ "ReadWriteOnce" ]
341347 storageClassName: crate-premium
342348 resources:
343349 requests:
344- storage: 100g
350+ storage: 100Gi
345351` ` `
346352
347353[azure managed disks] : https://azure.microsoft.com/en-us/pricing/details/managed-disks/
348354[configuration] : https://kubernetes.io/docs/concepts/configuration/overview/
349355[containerization] : https://www.docker.com/resources/what-container
350356[cratedb docker image] : https://hub.docker.com/_/crate/
351- [docker] : https://www.docker.com/
352357[horizontally scalable] : https://en.wikipedia.org/wiki/Scalability#Horizontal_(scale_out)_and_vertical_scaling_(scale_up)
353358[ingress] : https://kubernetes.io/docs/concepts/services-networking/ingress/
354359[kubernetes] : https://kubernetes.io/
355360[loadbalancer] : https://kubernetes.io/docs/concepts/services-networking/service/#loadbalancer
356361[managed] : https://kubernetes.io/docs/concepts/cluster-administration/manage-deployment/
357362[minikube] : https://kubernetes.io/docs/setup/minikube/
358- [persistent volume] : https://kubernetes.io/docs/concepts/storage/persistent-volumes/
359363[persistent volumes] : https://kubernetes.io/docs/concepts/storage/persistent-volumes/
360364[pod] : https://kubernetes.io/docs/concepts/workloads/pods/
361365[rolling update strategy] : https://kubernetes.io/docs/concepts/workloads/controllers/statefulset/#rolling-updates
362366[service] : https://kubernetes.io/docs/concepts/services-networking/service/
363- [services] : https://kubernetes.io/docs/concepts/services-networking/service/
364367[setting up your first cratedb cluster on kubernetes] : https://cratedb.com/blog/run-your-first-cratedb-cluster-on-kubernetes-part-one
365368[shared-nothing architecture] : https://en.wikipedia.org/wiki/Shared-nothing_architecture
366369[statefulset] : https://kubernetes.io/docs/concepts/workloads/controllers/statefulset/
0 commit comments