ECK Deployment on Openshift using https://www.elastic.co/guide/en/cloud-on-k8s/1.9/k8s-openshift-deploy-elasticsearch.html

Please can someone confirm if this is a valid Elasticsearch deployment for Openshift?
Please advise as I am stuck since couple of days.

---
apiVersion: route.openshift.io/v1
kind: Route
metadata:
  name: elasticsearch
spec:
  #host: elasticsearch.example.com # override if you don't want to use the host that is automatically generated by OpenShift (<route-name>[-<namespace>].<suffix>)
  tls:
    termination: passthrough # Elasticsearch is the TLS endpoint
    insecureEdgeTerminationPolicy: Redirect
  to:
    kind: Service
    name: elasticsearch-es-http
---
apiVersion: elasticsearch.k8s.elastic.co/v1
kind: Elasticsearch
metadata:
  name: elasticsearch  
spec:
  version: 7.17.0
  image: docker-eu.artifactory.swg-devops.com/sec-yoda-team-docker-local/pti/elasticsearch-gcs:7.17.0
  secureSettings:
  - secretName: jfrog
  nodeSets:
  - name: master   
    count: 1   
    config:
      node.master: true   
      node.data: false     
    podTemplate:
      spec:
        securityContext:
          runAsUser: 1234
          fsGroup: 1234
        initContainers:
        - name: sysctl
          securityContext:
            privileged: true   
          command: ['sh', '-c', 'sysctl -w vm.max_map_count=262144']   
        containers:
        - name: elasticsearch
          env:
          - name: ES_JAVA_OPTS
            value: -Xms2g -Xmx2g
          resources:
            requests:
              cpu: 2
              memory: 8Gi
            limits:
              cpu: 3
              memory: 10Gi
  - name: data
    count: 3
    config:
      node.master: false  
      node.data: true  
      node.attr.date: hot   
    podTemplate:
      spec:
        securityContext:
          runAsUser: 1234
          fsGroup: 1234
        initContainers:
        - name: sysctl
          securityContext:
            privileged: true
          command: ['sh', '-c', 'sysctl -w vm.max_map_count=262144']
        containers:
        - name: elasticsearch
          env:
          - name: ES_JAVA_OPTS
            value: -Xms2g -Xmx2g
          resources:
            requests:
              cpu: 2
              memory: 8Gi
            limits:
              cpu: 3
              memory: 10Gi
    volumeClaimTemplates:
    - metadata:
        name: elasticsearch-data
      spec:
        accessModes:
        - ReadWriteOnce
        resources:
          requests:
            storage: 100Gi
        storageClassName: ibmc-file-silver

I am unable to pull image from the Repo :slight_smile:
I have added the Image Pull secret as :slight_smile:

 secureSettings:
  - secretName:

Do we need a Service Account to be created for this to work? I dont see any documentation for creating a SA for ImagePullSecret? Please can someone help me understand this?

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.