Created
December 6, 2024 23:13
-
-
Save apinter/28822a6aca00582e60b3e32f9d902065 to your computer and use it in GitHub Desktop.
This file contains hidden or 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/v1 | |
kind: Deployment | |
metadata: | |
name: hello-world-deployment | |
labels: | |
app: hello-world | |
spec: | |
selector: | |
matchLabels: | |
app: hello-world | |
replicas: 1 | |
template: | |
metadata: | |
labels: | |
app: hello-world | |
spec: | |
containers: | |
- name: hello-world | |
image: docker.io/nginx:mainline-alpine | |
ports: | |
- containerPort: 80 | |
resources: | |
limits: | |
memory: 128Mi | |
cpu: "150m" | |
requests: | |
memory: 64Mi | |
cpu: "80m" | |
--- | |
apiVersion: v1 | |
kind: Service | |
metadata: | |
name: hello-world-service | |
spec: | |
selector: | |
app: hello-world | |
ports: | |
- protocol: TCP | |
port: 80 | |
targetPort: 80 | |
type: ClusterIP | |
--- | |
apiVersion: networking.k8s.io/v1 | |
kind: Ingress | |
metadata: | |
name: ingress-demo | |
annotations: | |
nginx.ingress.kubernetes.io/use-regex: "true" | |
nginx.ingress.kubernetes.io/rewrite-target: /$1 | |
cert-manager.io/cluster-issuer: "letsencrypt-prod-dns01" | |
nginx.ingress.kubernetes.io/force-ssl-redirect: "false" | |
nginx.ingress.kubernetes.io/ssl-redirect: "false" | |
nginx.ingress.kubernetes.io/ssl-passthrough: "true" | |
nginx.ingress.kubernetes.io/proxy-body-size: 50m | |
nginx.ingress.kubernetes.io/service-upstream: "true" | |
nginx.ingress.kubernetes.io/proxy-connect-timeout: "300" | |
nginx.ingress.kubernetes.io/proxy-read-timeout: "300" | |
nginx.ingress.kubernetes.io/proxy-send-timeout: "300" | |
nginx.ingress.kubernetes.io/configuration-snippet: | | |
more_set_headers "X-XSS-Protection: 1"; | |
spec: | |
ingressClassName: nginx | |
tls: | |
- hosts: | |
- playground.example.com | |
secretName: playground-tls | |
rules: | |
- host: playground.example.com | |
http: | |
paths: | |
- backend: | |
service: | |
name: hello-world-service | |
port: | |
number: 80 | |
path: / | |
pathType: ImplementationSpecific |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment