zabbix_deploy_v2
Differences
This shows you the differences between two versions of the page.
| zabbix_deploy_v2 [2025/07/26 17:09] – - Imported by DokuWiki Advanced Plugin wikiadm | zabbix_deploy_v2 [Unknown date] (current) – removed - external edit (Unknown date) 127.0.0.1 | ||
|---|---|---|---|
| Line 1: | Line 1: | ||
| - | ====== Zabbix Deployment V2 ====== | ||
| - | ===== Secret ===== | ||
| - | <file bash> | ||
| - | $ cat pgsql-secret | ||
| - | dbname=zabbix | ||
| - | host=pgsql.juntotelecom.com.br | ||
| - | password=senha | ||
| - | port=5432 | ||
| - | user=zabbix | ||
| - | </ | ||
| - | <file bash> | ||
| - | kubectl create secret generic pgsql-secret -n zabbix \ | ||
| - | --from-env-file=pgsql-secret -o yaml \ | ||
| - | --dry-run=client > pgsql-secret.yaml | ||
| - | </ | ||
| - | |||
| - | <file yaml pgsql-secret.yaml> | ||
| - | $ cat pgsql-secret.yaml | ||
| - | apiVersion: v1 | ||
| - | data: | ||
| - | dbname: emFiYml4 | ||
| - | host: cGdzcWwuanVudG90ZWxlY29tLmNvbS5icg== | ||
| - | password: c2VuaGEK | ||
| - | port: NTQzMg== | ||
| - | user: emFiYml4 | ||
| - | kind: Secret | ||
| - | metadata: | ||
| - | name: pgsql-secret | ||
| - | namespace: zabbix | ||
| - | </ | ||
| - | |||
| - | ===== Zabbix server ===== | ||
| - | <file yaml zabbix-server.yaml> | ||
| - | $ cat zabbix-server.yaml | ||
| - | apiVersion: apps/v1 | ||
| - | kind: Deployment | ||
| - | metadata: | ||
| - | labels: | ||
| - | app: zabbix | ||
| - | name: zabbix-server | ||
| - | namespace: zabbix | ||
| - | spec: | ||
| - | selector: | ||
| - | matchLabels: | ||
| - | app: zabbix | ||
| - | template: | ||
| - | metadata: | ||
| - | labels: | ||
| - | app: zabbix | ||
| - | spec: | ||
| - | containers: | ||
| - | - env: | ||
| - | - name: DB_SERVER_HOST | ||
| - | valueFrom: | ||
| - | secretKeyRef: | ||
| - | key: host | ||
| - | name: pgsql-secret | ||
| - | - name: DB_SERVER_PORT | ||
| - | valueFrom: | ||
| - | secretKeyRef: | ||
| - | key: port | ||
| - | name: pgsql-secret | ||
| - | - name: POSTGRES_USER | ||
| - | valueFrom: | ||
| - | secretKeyRef: | ||
| - | key: user | ||
| - | name: pgsql-secret | ||
| - | - name: POSTGRES_PASSWORD | ||
| - | valueFrom: | ||
| - | secretKeyRef: | ||
| - | key: password | ||
| - | name: pgsql-secret | ||
| - | - name: POSTGRES_DB | ||
| - | valueFrom: | ||
| - | secretKeyRef: | ||
| - | key: dbname | ||
| - | name: pgsql-secret | ||
| - | - name: ENABLE_TIMESCALEDB | ||
| - | value: " | ||
| - | - name: ZBX_AUTOHANODENAME | ||
| - | value: hostname | ||
| - | - name: ZBX_NODEADDRESS | ||
| - | valueFrom: | ||
| - | fieldRef: | ||
| - | apiVersion: v1 | ||
| - | fieldPath: status.podIP | ||
| - | - name: ZBX_WEBSERVICEURL | ||
| - | value: http:// | ||
| - | - name: ZBX_STARTREPORTWRITERS | ||
| - | value: " | ||
| - | image: zabbix/ | ||
| - | imagePullPolicy: | ||
| - | name: zabbix-server | ||
| - | ports: | ||
| - | - containerPort: | ||
| - | name: zabbix-server | ||
| - | protocol: TCP | ||
| - | - containerPort: | ||
| - | name: zabbix-jmx | ||
| - | protocol: TCP | ||
| - | resources: {} | ||
| - | - env: | ||
| - | - name: ZBX_HOSTNAME | ||
| - | value: Zabbix server | ||
| - | - name: ZBX_SERVER_HOST | ||
| - | value: 127.0.0.1 | ||
| - | - name: ZBX_SERVER_PORT | ||
| - | value: " | ||
| - | - name: ZBX_PASSIVE_ALLOW | ||
| - | value: " | ||
| - | - name: ZBX_PASSIVESERVERS | ||
| - | value: 127.0.0.1 | ||
| - | - name: ZBX_ACTIVE_ALLOW | ||
| - | value: " | ||
| - | - name: ZBX_ACTIVESERVERS | ||
| - | - name: ZBX_DEBUGLEVEL | ||
| - | - name: ZBX_TIMEOUT | ||
| - | - name: ZBX_LOADMODULE | ||
| - | image: zabbix/ | ||
| - | imagePullPolicy: | ||
| - | name: zabbix-agent | ||
| - | ports: | ||
| - | - containerPort: | ||
| - | name: zabbix-agent | ||
| - | protocol: TCP | ||
| - | resources: {} | ||
| - | restartPolicy: | ||
| - | securityContext: | ||
| - | </ | ||
| - | |||
| - | <file yaml service-server.yaml> | ||
| - | $ cat service-server.yaml | ||
| - | apiVersion: v1 | ||
| - | kind: Service | ||
| - | metadata: | ||
| - | labels: | ||
| - | app: zabbix | ||
| - | name: zabbix-server | ||
| - | namespace: zabbix | ||
| - | spec: | ||
| - | ports: | ||
| - | - name: zabbix-server | ||
| - | port: 10051 | ||
| - | protocol: TCP | ||
| - | targetPort: 10051 | ||
| - | - name: zabbix-jmx | ||
| - | port: 10052 | ||
| - | protocol: TCP | ||
| - | targetPort: 10052 | ||
| - | selector: | ||
| - | app: zabbix | ||
| - | type: ClusterIP | ||
| - | </ | ||
| - | |||
| - | <file yaml service-agent.yaml> | ||
| - | $ cat service-agent.yaml | ||
| - | apiVersion: v1 | ||
| - | kind: Service | ||
| - | metadata: | ||
| - | labels: | ||
| - | app: zabbix | ||
| - | name: zabbix-agent | ||
| - | namespace: zabbix | ||
| - | spec: | ||
| - | ports: | ||
| - | - name: zabbix-agent | ||
| - | port: 10050 | ||
| - | protocol: TCP | ||
| - | targetPort: 10050 | ||
| - | selector: | ||
| - | app: zabbix | ||
| - | type: ClusterIP | ||
| - | </ | ||
| - | ===== Webservice ===== | ||
| - | <file yaml zabbix-webservice.yaml> | ||
| - | $ cat zabbix-webservice.yaml | ||
| - | apiVersion: apps/v1 | ||
| - | kind: Deployment | ||
| - | metadata: | ||
| - | labels: | ||
| - | app: zabbix | ||
| - | name: zabbix-webservice | ||
| - | namespace: zabbix | ||
| - | spec: | ||
| - | selector: | ||
| - | matchLabels: | ||
| - | app: zabbix | ||
| - | template: | ||
| - | metadata: | ||
| - | labels: | ||
| - | app: zabbix | ||
| - | spec: | ||
| - | containers: | ||
| - | - env: | ||
| - | - name: ZBX_ALLOWEDIP | ||
| - | value: ::/0 | ||
| - | image: zabbix/ | ||
| - | imagePullPolicy: | ||
| - | name: zabbix-webservice | ||
| - | ports: | ||
| - | - containerPort: | ||
| - | name: webservice | ||
| - | protocol: TCP | ||
| - | resources: {} | ||
| - | restartPolicy: | ||
| - | securityContext: | ||
| - | </ | ||
| - | |||
| - | <file yaml service-webservice.yaml> | ||
| - | $ cat service-webservice.yaml | ||
| - | apiVersion: v1 | ||
| - | kind: Service | ||
| - | metadata: | ||
| - | labels: | ||
| - | app: zabbix | ||
| - | name: zabbix-webservice | ||
| - | namespace: zabbix | ||
| - | spec: | ||
| - | ports: | ||
| - | - name: webservice | ||
| - | port: 10053 | ||
| - | protocol: TCP | ||
| - | targetPort: 10053 | ||
| - | selector: | ||
| - | app: zabbix | ||
| - | type: ClusterIP | ||
| - | </ | ||
| - | |||
| - | ===== Zabbix Web ===== | ||
| - | <file yaml zabbix-web.yaml> | ||
| - | $ cat zabbix-web.yaml | ||
| - | apiVersion: apps/v1 | ||
| - | kind: Deployment | ||
| - | metadata: | ||
| - | labels: | ||
| - | app: zabbix | ||
| - | name: zabbix-web | ||
| - | namespace: zabbix | ||
| - | spec: | ||
| - | selector: | ||
| - | matchLabels: | ||
| - | app: zabbix | ||
| - | template: | ||
| - | metadata: | ||
| - | labels: | ||
| - | app: zabbix | ||
| - | spec: | ||
| - | containers: | ||
| - | - env: | ||
| - | - name: DB_SERVER_HOST | ||
| - | valueFrom: | ||
| - | secretKeyRef: | ||
| - | key: host | ||
| - | name: pgsql-secret | ||
| - | - name: DB_SERVER_PORT | ||
| - | valueFrom: | ||
| - | secretKeyRef: | ||
| - | key: port | ||
| - | name: pgsql-secret | ||
| - | - name: POSTGRES_USER | ||
| - | valueFrom: | ||
| - | secretKeyRef: | ||
| - | key: user | ||
| - | name: pgsql-secret | ||
| - | - name: POSTGRES_PASSWORD | ||
| - | valueFrom: | ||
| - | secretKeyRef: | ||
| - | key: password | ||
| - | name: pgsql-secret | ||
| - | - name: POSTGRES_DB | ||
| - | valueFrom: | ||
| - | secretKeyRef: | ||
| - | key: dbname | ||
| - | name: pgsql-secret | ||
| - | image: zabbix/ | ||
| - | imagePullPolicy: | ||
| - | name: zabbix-web | ||
| - | ports: | ||
| - | - containerPort: | ||
| - | name: zabbix-web | ||
| - | protocol: TCP | ||
| - | resources: {} | ||
| - | restartPolicy: | ||
| - | securityContext: | ||
| - | </ | ||
| - | |||
| - | <file yaml service-web.yaml> | ||
| - | $ cat service-web.yaml | ||
| - | apiVersion: v1 | ||
| - | kind: Service | ||
| - | metadata: | ||
| - | labels: | ||
| - | app: zabbix | ||
| - | name: zabbix-web | ||
| - | namespace: zabbix | ||
| - | spec: | ||
| - | ports: | ||
| - | - name: zabbix-web | ||
| - | port: 80 | ||
| - | protocol: TCP | ||
| - | targetPort: 8080 | ||
| - | selector: | ||
| - | app: zabbix | ||
| - | type: ClusterIP | ||
| - | </ | ||
zabbix_deploy_v2.1753560545.txt.gz · Last modified: by wikiadm
