Share storage/volume between worker nodes in Kubernetes?

danielo

Is it possible to have a centralized storage/volume that can be shared between two pods/instances of an application that exist in different worker nodes in Kubernetes?

So to explain my case:

  • I have a Kubernetes cluster with 2 worker nodes. In each one of these I have 1 instance of app X running. This means I have 2 instances of app X running totally at the same time.

  • Both instances subscribe on the topic topicX, that has 2 partitions, and are part of a consumer group in Apache Kafka called groupX.

As I understand it the message load will be split among the partitions, but also among the consumers in the consumer group. So far so good, right?

So to my problem:

  • In my whole solution I have a hierarchy division with the unique constraint by country and ID. Each combination of country and ID has a pickle model (python Machine Learning Model), which is stored in a directory accessed by the application. For each combination of a country and ID I receive one message per minute.

  • At the moment I have 2 countries, so to be able to scale properly I wanted to split the load between two instances of app X, each one handling its own country.

  • The problem is that with Kafka the messages can be balanced between the different instances, and to access the pickle-files in each instance without know what country the message belongs to, I have to store the pickle-files in both instances.

Is there a way to solve this? I would rather keep the setup as simple as possible so it is easy to scale and add a third, fourth and fifth country later.

Keep in mind that this is an overly simplified way of explaining the problem. The number of instances is much higher in reality etc.

Rico

Yes. It's possible if you look at this table any PV (Physical Volume) that supports ReadWriteMany will help you accomplish having the same data store for your Kafka workers. So in summary these:

  • AzureFile
  • CephFS
  • Glusterfs
  • Quobyte
  • NFS
  • VsphereVolume - (works when pods are collocated)
  • PortworxVolume

In my opinion, NFS is the easiest to implement. Note that Azurefile, Quobyte, and Portworx are paid solutions.

この記事はインターネットから収集されたものであり、転載の際にはソースを示してください。

侵害の場合は、連絡してください[email protected]

編集
0

コメントを追加

0

関連記事

分類Dev

I want to ping (icmp) monitor the worker nodes that make up the kubernetes cluster without using the internal IP of the node

分類Dev

How to distribute data to worker nodes

分類Dev

How to group nodes between nodes?

分類Dev

EKS - Worker nodes from multiple VPC / Accounts

分類Dev

Share files between users

分類Dev

Docker: Swarm worker nodes not finding locally built image

分類Dev

External ip for kubernetes shows <nodes> in minikube

分類Dev

Kubernetes - StatfulSets, how to peg stateful instances to nodes?

分類Dev

How to share this variable between modules?

分類Dev

Share variables between functions in Swift

分類Dev

Share a Cookie between Rails and Jekyll

分類Dev

socket.io - passing events between nodes

分類Dev

Processing text that sits between two nodes

分類Dev

How to share scopes between classes in Laravel 5

分類Dev

AngularJS - share variable between two controllers

分類Dev

Bash - How to share constants between scripts?

分類Dev

How to share variables between feature runs in Karate?

分類Dev

Ionic 4 share data between tabs

分類Dev

How to share cl::opt arguments between passes?

分類Dev

How to share View Model between pages?

分類Dev

Share project's code between PC and Notebook

分類Dev

Why should a production Kubernetes cluster have a minimum of three nodes?

分類Dev

Is there a way to prevent kubectl from de-registering kubernetes nodes?

分類Dev

Deployment using Kubernetes - feasibility of Master And Nodes in same machine

分類Dev

allow access to all resources on kubernetes cluster except get nodes

分類Dev

How to copy an S3 bucket onto Kubernetes nodes

分類Dev

Why are there 3 nodes in a default Google Kubernetes Engine cluster?

分類Dev

Why are there 3 nodes in a default Google Kubernetes Engine cluster?

分類Dev

Kubernetes: Nodes/Pods not showing with kubectl after building cluster with kubeadm

Related 関連記事

  1. 1

    I want to ping (icmp) monitor the worker nodes that make up the kubernetes cluster without using the internal IP of the node

  2. 2

    How to distribute data to worker nodes

  3. 3

    How to group nodes between nodes?

  4. 4

    EKS - Worker nodes from multiple VPC / Accounts

  5. 5

    Share files between users

  6. 6

    Docker: Swarm worker nodes not finding locally built image

  7. 7

    External ip for kubernetes shows <nodes> in minikube

  8. 8

    Kubernetes - StatfulSets, how to peg stateful instances to nodes?

  9. 9

    How to share this variable between modules?

  10. 10

    Share variables between functions in Swift

  11. 11

    Share a Cookie between Rails and Jekyll

  12. 12

    socket.io - passing events between nodes

  13. 13

    Processing text that sits between two nodes

  14. 14

    How to share scopes between classes in Laravel 5

  15. 15

    AngularJS - share variable between two controllers

  16. 16

    Bash - How to share constants between scripts?

  17. 17

    How to share variables between feature runs in Karate?

  18. 18

    Ionic 4 share data between tabs

  19. 19

    How to share cl::opt arguments between passes?

  20. 20

    How to share View Model between pages?

  21. 21

    Share project's code between PC and Notebook

  22. 22

    Why should a production Kubernetes cluster have a minimum of three nodes?

  23. 23

    Is there a way to prevent kubectl from de-registering kubernetes nodes?

  24. 24

    Deployment using Kubernetes - feasibility of Master And Nodes in same machine

  25. 25

    allow access to all resources on kubernetes cluster except get nodes

  26. 26

    How to copy an S3 bucket onto Kubernetes nodes

  27. 27

    Why are there 3 nodes in a default Google Kubernetes Engine cluster?

  28. 28

    Why are there 3 nodes in a default Google Kubernetes Engine cluster?

  29. 29

    Kubernetes: Nodes/Pods not showing with kubectl after building cluster with kubeadm

ホットタグ

アーカイブ