Skip to content
Snippets Groups Projects
Commit 7e1c3753 authored by root's avatar root
Browse files

initial commit

parents
Branches
No related tags found
No related merge requests found
---
apiVersion: networking.k8s.io/v1
kind: Ingress
metadata:
name: nginx
annotations:
cert-manager.io/cluster-issuer: letsencrypt-prod
spec:
ingressClassName: nginx
tls:
- hosts:
- nginx.kubus.meta.zcu.cz
secretName: nginx-tls
defaultBackend:
service:
name: nginx
port:
number: 80
rules:
- host: nginx.kubus.meta.zcu.cz
http:
paths:
- path: /
pathType: Prefix
backend:
service:
name: nginx
port:
number: 80
bases:
- nginx.yaml
- service.yaml
- ingress.yaml
namespace: dexovo
---
apiVersion: apps/v1
kind: Deployment
metadata:
name: nginx-deployment
spec:
selector:
matchLabels:
app: nginx
replicas: 2 # tells deployment to run 2 pods matching the template
template:
metadata:
labels:
app: nginx
spec:
containers:
- name: nginx
image: nginx:1.14.2
ports:
- containerPort: 80
lifecycle:
postStart:
exec:
command: ["/bin/sh", "-c", "echo $HOSTNAME > /usr/share/nginx/html/hostname.html"]
---
apiVersion: v1
kind: Service
metadata:
name: nginx
spec:
selector:
app: nginx
ports:
- protocol: TCP
port: 80
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment