This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#cloud-config | |
hostname: kube01 | |
users: | |
- name: remoto | |
passwd: $1$o1aDRemK$CPPqN4hpl3TuYlZWjiBa.1 | |
groups: | |
- sudo | |
- docker |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Configura Cluster com certificado CA | |
kubectl config set-cluster <cluster name> --server=https://master.exemplo.local:6443 \ | |
--certificate-authority=${PWD}/ssl/prod/ca.pem | |
# Configura credenciais | |
kubectl config set-credentials prod-admin --certificate-authority=${PWD}/ssl/prod/ca.pem \ | |
--client-key=${PWD}/ssl/prod/admin-docker01-key.pem --client-certificate=${PWD}/ssl/prd/admin-docker01.pem | |
# Configura Contexto para o cluster |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
apiVersion: v1 | |
kind: PersistentVolume | |
metadata: | |
name: grafana-pv | |
namespace: fabio | |
spec: | |
capacity: | |
storage: 20Gi | |
accessModes: | |
- ReadWriteMany |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
apiVersion: v1 | |
kind: Service | |
metadata: | |
name: grafana | |
namespace: fabio | |
labels: | |
app: grafana | |
spec: | |
ports: | |
- port: 80 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
apiVersion: apps/v1beta1 | |
kind: Deployment | |
metadata: | |
name: jobs | |
namespace: fabio | |
spec: | |
replicas: 1 | |
template: | |
metadata: | |
labels: |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
upstream confluence { | |
server sertver_backend:8090; | |
keepalive 300; | |
} | |
server { | |
listen haproxy.fabio.com.br:80; | |
server_name confluence.fabio.com.br; | |
access_log off; | |
error_log /dev/null crit; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
user nginx; | |
worker_processes auto; | |
worker_rlimit_nofile 200000; | |
pid /var/run/nginx.pid; | |
events { | |
worker_connections 10000; | |
use epoll; | |
multi_accept on; | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
graph LR | |
A[Pubic VIP] --Floating Virtual IP Address--> B[VRRP] | |
B --> C{N Master} | |
B --> D[Private Network] | |
B --> E{N Backup} | |
D --> G(Pool Server A) | |
D --> H(Pool Server B) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Stop / remove all Docker containers | |
# Para todos containers | |
docker stop $(docker ps -a -q) | |
# Remove todos containers | |
docker rm -f $(docker ps -a -q) | |
# Remove todas imagnes | |
docker images -q | xargs docker rmi -f |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# docker-compose.yml com traefik para cluster docker swarm | |
version: "3" | |
services: | |
grafana: | |
image: monitoringartist/grafana-xxl:latest | |
ports: | |
- "3000:3000" | |
networks: |