标签:style replica search ica last code gate tor cto
样例:
apiVersion: v1 kind: ConfigMap metadata: name: appjobs-filebeat-config namespace: dev data: filebeat.yml: | logging.level: warning filebeat.inputs: - type: log paths: - "/logs/*" multiline.pattern: ‘^\s*(\d{4}|\d{2})\-(\d{2}|[a-zA-Z]{3})\-(\d{2}|\d{4})‘ multiline.negate: true multiline.match: after fields: k8s-app: log-contanier-file-filebeat output.elasticsearch: hosts: ["elasticsearch-logging.logging:9200"] indices: - index: "appjobs-log-%{+YYYY.MM.dd}" default: true --- kind: Service apiVersion: v1 metadata: namespace: dev name: service-appjobs labels: app: service-appjobs spec: ports: - port: 8080 targetPort: 8080 selector: app: pod-appjobs type: ClusterIP --- kind: Deployment apiVersion: apps/v1beta2 metadata: namespace: dev name: deployment-appjobs labels: app: deployment-appjobs spec: replicas: 1 selector: matchLabels: app: pod-appjobs strategy: rollingUpdate: maxSurge: 1 maxUnavailable: 1 type: RollingUpdate template: metadata: labels: app: pod-appjobs spec: containers: - name: filebeat-logging image: registry-vpc.cn-shanghai.aliyuncs.com/ilebeat:6.3.2 volumeMounts: - name: app-logs mountPath: /logs - name: appjobs-filebeat-config mountPath: /usr/local/filebeat/config - image: registry-vpc.cn-shanghai.aliyuncs.com/appjobs-boot:25fa7c5 securityContext: privileged: true imagePullPolicy: Always name: container-appjobs ports: - containerPort: 8080 volumeMounts: - name: app-logs mountPath: /appjobs/logs readinessProbe: tcpSocket: port: 8080 initialDelaySeconds: 10 periodSeconds: 5 livenessProbe: tcpSocket: port: 8080 initialDelaySeconds: 120 periodSeconds: 10 volumes: - name: app-logs emptyDir: {} - name: appjobs-filebeat-config configMap: name: appjobs-filebeat-config imagePullSecrets: - name: dev-pullimages-secret dnsPolicy: ClusterFirst restartPolicy: Always
标签:style replica search ica last code gate tor cto
原文地址:https://www.cnblogs.com/malukang/p/12811782.html