text stringlengths 0 37.6k |
|---|
metadata: |
name: postgres |
namespace: database |
spec: |
serviceName: postgres |
replicas: 1 |
selector: |
matchLabels: |
app: postgres |
template: |
metadata: |
labels: |
app: postgres |
spec: |
containers: |
- name: postgres |
image: postgres:15 |
ports: |
- containerPort: 5432 |
name: postgres |
env: |
- name: POSTGRES_DB |
value: mydb |
- name: POSTGRES_USER |
value: admin |
- name: POSTGRES_PASSWORD |
valueFrom: |
secretKeyRef: |
name: postgres-secret |
key: password |
resources: |
requests: |
memory: "256Mi" |
cpu: "250m" |
limits: |
memory: "512Mi" |
cpu: "500m" |
volumeMounts: |
- name: postgres-data |
mountPath: /var/lib/postgresql/data |
volumeClaimTemplates: |
- metadata: |
name: postgres-data |
spec: |
accessModes: ["ReadWriteOnce"] |
resources: |
requests: |
storage: 5Gi |
<|endoftext|> |
# Ingress com TLS e múltiplos paths |
apiVersion: networking.k8s.io/v1 |
kind: Ingress |
metadata: |
name: app-ingress |
namespace: production |
annotations: |
nginx.ingress.kubernetes.io/rewrite-target: / |
nginx.ingress.kubernetes.io/ssl-redirect: "true" |
cert-manager.io/cluster-issuer: letsencrypt-prod |
spec: |
ingressClassName: nginx |
tls: |
- hosts: |
- app.example.com |
- api.example.com |
secretName: app-tls-secret |
rules: |
- host: app.example.com |
http: |
paths: |
- path: / |
pathType: Prefix |
backend: |
service: |
name: frontend-service |
port: |
number: 80 |
- host: api.example.com |
http: |
paths: |
- path: /v1 |
pathType: Prefix |
backend: |
service: |
name: api-service |
port: |
number: 8080 |
- path: /health |
pathType: Exact |
backend: |
service: |
name: api-service |
port: |
number: 8080 |
<|endoftext|> |
# Ingress simples sem TLS |
apiVersion: networking.k8s.io/v1 |
kind: Ingress |
metadata: |
name: simple-ingress |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.