DHOZEd.png

Deployment

apiVersion: apps/v1
kind: Deployment
metadata:
  name: es-sre-ink
  namespace: sre
spec:
  replicas: 1
  selector:
    matchLabels:
      name: es-sre-ink
  template:
    metadata:
      labels:
        name: es-sre-ink
    spec:
      containers:
      - name: es
        image: docker.elastic.co/elasticsearch/elasticsearch:7.9.3
        imagePullPolicy: IfNotPresent
        ports:
        - containerPort: 9200
          name: http
          protocol: TCP
        - containerPort: 9300
          name: es
          protocol: TCP
        env:
        - name: discovery.type
          value: single-node

svc

kind: Service
apiVersion: v1
metadata:
  name: es-sre-ink
  namespace: sre
spec:
  type: NodePort
  ports:
  - name: es
    port: 9200
    nodePort: 30008
    targetPort: 9200
    protocol: TCP
  selector:
    name: es-sre-ink

发表评论

您的电子邮箱地址不会被公开。 必填项已用*标注

Captcha Code