2022-02-12:k8s安装es,yaml如何写?

Posted 福大大架构师每日一题

tags:

篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了2022-02-12:k8s安装es,yaml如何写?相关的知识,希望对你有一定的参考价值。

2022-02-12:k8s安装es,yaml如何写?

yaml如下:

apiVersion: v1
kind: Service
metadata:
  labels:
    app: elasticsearch
  name: elasticsearch
  namespace: moonfdd
spec:
  ports:
    - name: 9200-9200
      port: 9200
      protocol: TCP
      targetPort: 9200
    - name: 5601-5601
      port: 5601
      protocol: TCP
      targetPort: 5601
  selector:
    app: elasticsearch
  type: NodePort
---
apiVersion: apps/v1
kind: Deployment
metadata:
  labels:
    app: elasticsearch
  name: elasticsearch
  namespace: moonfdd
spec:
  replicas: 1
  selector:
    matchLabels:
      app: elasticsearch
  template:
    metadata:
      labels:
        app: elasticsearch
    spec:
      containers:
        - env:
            - name: discovery.type
              value: single-node
          image: 'elasticsearch:7.14.0'
          imagePullPolicy: Always
          name: elasticsearch
          terminationMessagePolicy: File
        - image: 'kibana:7.14.0'
          imagePullPolicy: IfNotPresent
          name: kibana
        - image: 'mobz/elasticsearch-head:5'
          imagePullPolicy: IfNotPresent
          name: elasticsearch-head

结果如下:


es的yaml

以上是关于2022-02-12:k8s安装es,yaml如何写?的主要内容,如果未能解决你的问题,请参考以下文章

2022-08-14:k8s安装PostgreSQL,yaml如何写?

2022-02-26:k8s安装swagger,yaml如何写?

2022-08-15:k8s安装pgadmin,yaml如何写?

2022-02-24:k8s安装rabbitmq,yaml如何写?

2022-02-13:k8s安装gitlab,yaml如何写?

2022-03-02:k8s安装minio,yaml如何写?