github.com/qsunny/k8s@v0.0.0-20220101153623-e6dca256d5bf/examples-master/staging/elasticsearch/es-rc.yaml (about)

     1  apiVersion: v1
     2  kind: ReplicationController
     3  metadata:
     4    name: es
     5    labels:
     6      component: elasticsearch
     7  spec:
     8    replicas: 1
     9    template:
    10      metadata:
    11        labels:
    12          component: elasticsearch
    13      spec:
    14        serviceAccount: elasticsearch
    15        initContainers:
    16        - name: init-sysctl
    17          image: busybox
    18          imagePullPolicy: IfNotPresent
    19          command: ["sysctl", "-w", "vm.max_map_count=262144"]
    20          securityContext:
    21            privileged: true
    22        containers:
    23        - name: es
    24          securityContext:
    25            capabilities:
    26              add:
    27                - IPC_LOCK
    28          image: quay.io/pires/docker-elasticsearch-kubernetes:5.6.2
    29          env:
    30          - name: KUBERNETES_CA_CERTIFICATE_FILE
    31            value: /var/run/secrets/kubernetes.io/serviceaccount/ca.crt
    32          - name: NAMESPACE
    33            valueFrom:
    34              fieldRef:
    35                fieldPath: metadata.namespace
    36          - name: "CLUSTER_NAME"
    37            value: "myesdb"
    38          - name: "DISCOVERY_SERVICE"
    39            value: "elasticsearch"
    40          - name: NODE_MASTER
    41            value: "true"
    42          - name: NODE_DATA
    43            value: "true"
    44          - name: HTTP_ENABLE
    45            value: "true"
    46          ports:
    47          - containerPort: 9200
    48            name: http
    49            protocol: TCP
    50          - containerPort: 9300
    51            name: transport
    52            protocol: TCP
    53          volumeMounts:
    54          - mountPath: /data
    55            name: storage
    56        volumes:
    57        - name: storage
    58          emptyDir: {}