The main reason is that the "web" cluster has hardware features different from the "db" cluster and I didn't find a way to have a cluster with for example one node better, in cpu and/or ram, than others. So 2 clusters to put in communication with the doubt that I have described above. The alternative could be create a single cluster with n nodes sized in such a way as to support web traffic and database work. So a situation where I have for example 4 nodes: in 3 nodes 6 web-pods plus the last node as pure db machine. But this solution is quite complicated in terms of how precisely to size the web pods, the db and the overall characteristics of the cluster.. So the idea to create two different clusters
Il 12 dic 2017 7:07 PM, "'Tim Hockin' via Kubernetes user discussion and Q&A" <[email protected]> ha scritto: On Tue, Dec 12, 2017 at 12:49 AM, <[email protected]> wrote: > I have a situation like this: > > - a cluster of web machines > - a cluster of db machines and other services I think you have made the problem much more complicated than it needs to be. Why not one cluster? > The question is how put in communication the 2 clusters in order to use some hostnames in /etc/hosts of web machines. > > To protect your data, is it safe create an ingress service to make visible the db from the external? I tried with a nodePort service (so using internal ip addresses) but I'm not able to put in contact db-web between different clusters > > At the moment my temporary solution is: > > a) define a public static ip with the command: > gcloud compute addresses create my-public-static-ip --global > > > b) use an ingress configuration for my db service where I set the static ip with the option: > > apiVersion: extensions/v1beta1 > kind: Ingress > metadata: > name: my-ingress > annotations: > kubernetes.io/ingress.global-static-ip-name: my-public-static-ip > > c) in my daemonset.yaml I define a hostAliases: > > apiVersion: extensions/v1beta1 > kind: DaemonSet > metadata: > name: my-daemonset > > spec: > updateStrategy: > type: RollingUpdate > > template: > spec: > nodeSelector: > app: frontend-node > > terminationGracePeriodSeconds: 30 > > hostAliases: > - ip: <public_ip_addr> > hostnames: > - "my-db-service" > > > and it's working. But I'm not too convinced that this solution is the best or however correct on a live environment... > > -- > You received this message because you are subscribed to the Google Groups "Kubernetes user discussion and Q&A" group. > To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. > To post to this group, send email to [email protected]. > Visit this group at https://groups.google.com/group/kubernetes-users. > For more options, visit https://groups.google.com/d/optout. -- You received this message because you are subscribed to a topic in the Google Groups "Kubernetes user discussion and Q&A" group. To unsubscribe from this topic, visit https://groups.google.com/d/ topic/kubernetes-users/d8xJqXYDAZ8/unsubscribe. To unsubscribe from this group and all its topics, send an email to [email protected]. To post to this group, send email to [email protected]. Visit this group at https://groups.google.com/group/kubernetes-users. For more options, visit https://groups.google.com/d/optout. -- You received this message because you are subscribed to the Google Groups "Kubernetes user discussion and Q&A" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To post to this group, send email to [email protected]. Visit this group at https://groups.google.com/group/kubernetes-users. For more options, visit https://groups.google.com/d/optout.
