Score:0

ElasticSearch Cluster on AKS with loadbalancer

cn flag

I am trying to deploy elasticsearch to AKS with a loadbalancer.

What I am struggling to achieve is to have a load balancer that only directs traffic to my client nodes.

This is what I have:

ElasticSearch dployment YAML:

apiVersion: elasticsearch.k8s.elastic.co/v1
kind: Elasticsearch
metadata:
  name: quickstart
spec:
  version: 7.16.2
  nodeSets:
  # 3 dedicated master nodes
  - name: master
    count: 3
    podTemplate:
      spec:
        initContainers:
        - name: sysctl
          securityContext:
            privileged: true
          command: ['sh', '-c', 'sysctl -w vm.max_map_count=262144']
    config:
      node.roles: ["master"]
      #node.remote_cluster_client: false
  # 3 ingest-data nodes
  - name: ingest-data
    count: 3
    podTemplate:
      spec:
        initContainers:
        - name: sysctl
          securityContext:
            privileged: true
          command: ['sh', '-c', 'sysctl -w vm.max_map_count=262144']
    config:
      node.roles: ["data", "ingest"]
  # 3 client nodes
  - name: client
    count: 3
    podTemplate:
      spec:
        initContainers:
        - name: sysctl
          securityContext:
            privileged: true
          command: ['sh', '-c', 'sysctl -w vm.max_map_count=262144']
    config:
      node.roles: []

Load Balancer YAML:

apiVersion: v1
kind: Service
metadata:
  name: ingress-controller
spec:
  type: LoadBalancer
  ports:
    - name: http
      port: 9200
      targetPort: 9200
      protocol: TCP
  selector:
    elasticsearch.k8s.elastic.co/cluster-name: "quickstart"
    elasticsearch.k8s.elastic.co/node-master: "false"
    elasticsearch.k8s.elastic.co/node-data: "false"
    elasticsearch.k8s.elastic.co/node-ingest: "false"
    elasticsearch.k8s.elastic.co/node-ml: "false"
    elasticsearch.k8s.elastic.co/node-transform: "false"

This loadbalancer does not repond with anything on port 9200 so I suspect its not working anyway but I am not sure how to achieve what im trying to do at all.

Thankyou in advance. I appriciate any tips on how to solve this.

mangohost

Post an answer

Most people don’t grasp that asking a lot of questions unlocks learning and improves interpersonal bonding. In Alison’s studies, for example, though people could accurately recall how many questions had been asked in their conversations, they didn’t intuit the link between questions and liking. Across four studies, in which participants were engaged in conversations themselves or read transcripts of others’ conversations, people tended not to realize that question asking would influence—or had influenced—the level of amity between the conversationalists.