apiVersion: apps/v1 kind: StatefulSet metadata: name: opensearch namespace: cameleer spec: serviceName: opensearch replicas: 1 selector: matchLabels: app: opensearch template: metadata: labels: app: opensearch spec: containers: - name: opensearch image: opensearchproject/opensearch:2.19.0 ports: - containerPort: 9200 name: http - containerPort: 9300 name: transport env: - name: discovery.type value: single-node - name: DISABLE_SECURITY_PLUGIN value: "true" volumeMounts: - name: data mountPath: /usr/share/opensearch/data resources: requests: memory: "1Gi" cpu: "200m" limits: memory: "4Gi" cpu: "1000m" livenessProbe: exec: command: - sh - -c - curl -s http://localhost:9200/_cluster/health initialDelaySeconds: 30 periodSeconds: 10 timeoutSeconds: 5 failureThreshold: 3 readinessProbe: exec: command: - sh - -c - curl -s http://localhost:9200/_cluster/health initialDelaySeconds: 15 periodSeconds: 10 timeoutSeconds: 5 failureThreshold: 3 volumeClaimTemplates: - metadata: name: data spec: accessModes: ["ReadWriteOnce"] resources: requests: storage: 10Gi --- apiVersion: v1 kind: Service metadata: name: opensearch namespace: cameleer spec: clusterIP: None selector: app: opensearch ports: - port: 9200 targetPort: 9200 name: http - port: 9300 targetPort: 9300 name: transport