写给已经架server上Azure然後发现好像要蒐集LOG的人
新增两个yaml档案
1.工作负载
kind: Deployment
apiVersion: apps/v1
metadata:
name: elasticsearch-yc
namespace: default
spec:
replicas: 1
selector:
matchLabels:
app: elasticsearch-yc
template:
metadata:
creationTimestamp: null
labels:
app: elasticsearch-yc
spec:
volumes:
- name: data
emptyDir: {}
initContainers:
- name: increase-vm-max-map
image: busybox
command:
- sysctl
- '-w'
- vm.max_map_count=262144
resources: {}
terminationMessagePath: /dev/termination-log
terminationMessagePolicy: File
imagePullPolicy: Always
securityContext:
privileged: true
containers:
- name: elk-elasticsearch
image: 'docker.elastic.co/elasticsearch/elasticsearch:7.12.0'
ports:
- containerPort: 9200
protocol: TCP
- containerPort: 9300
protocol: TCP
env:
- name: cluster.name
value: elasticsearch-cluster
- name: discovery.zen.ping.unicast.hosts
value: elasticsearch-discovery
- name: discovery.zen.minimum_master_nodes
value: '3'
- name: discovery.zen.ping_timeout
value: 5s
- name: node.master
value: 'true'
- name: node.data
value: 'false'
- name: node.ingest
value: 'false'
- name: ES_JAVA_OPTS
value: '-Xms256m -Xmx256m'
- name: discovery.type
value: single-node
- name: network.host
value: 0.0.0.0
resources: {}
terminationMessagePath: /dev/termination-log
terminationMessagePolicy: File
imagePullPolicy: IfNotPresent
restartPolicy: Always
terminationGracePeriodSeconds: 30
dnsPolicy: ClusterFirst
securityContext: {}
schedulerName: default-scheduler
strategy:
type: RollingUpdate
rollingUpdate:
maxUnavailable: 25%
maxSurge: 25%
1.服务与输入
kind: Service
apiVersion: v1
metadata:
name: elasticsearch-yc
namespace: default
spec:
ports:
- protocol: TCP
port: 80
targetPort: 9200
nodePort: 31346
selector:
app: elasticsearch-yc
type: LoadBalancer
sessionAffinity: None
externalTrafficPolicy: Cluster
这样再看下生成的外部IP应该就完成了。
>>: [Day 42] 心情随笔後台及前台(四) - 重新编辑列表页
今天来介绍 Creational Patterns 当中的最後一个模式。 假设这里有一个 Engin...
0x1 API 需求 在发出建立订单 - 取得虚拟帐号的请求後,若付款完成会呼叫 BackendUR...
身为开发者,每次规划、开发都面临无数的判断、种种的选择,为什麽要学这个、为什麽要导入那个? 我们最害...
在後续章节里,我们将使用 IntelliJ IDEA 示范如何编辑 Gradle 的 Build S...
在开始之前,我可能需要先给各位科普一些基础的CG动画(Computer Graphic)常识~也就是...