This commit is contained in:
Vassiliy Yegorov
2021-05-06 15:02:42 +07:00
commit 05b0d36bb3
16 changed files with 260 additions and 0 deletions

View File

@@ -0,0 +1,27 @@
apiVersion: apps/v1
kind: Deployment
metadata:
namespace: myapp
labels:
app: myapp
name: myapp
spec:
replicas: 1
selector:
matchLabels:
app: myapp
strategy:
type: Recreate
template:
metadata:
labels:
app: myapp
spec:
hostname: app-pod
restartPolicy: Always
containers:
- name: app-fpm
image: vasyakrg/php-app
imagePullPolicy: Always
ports:
- containerPort: 80

View File

@@ -0,0 +1,25 @@
apiVersion: networking.k8s.io/v1
kind: Ingress
metadata:
namespace: myapp
annotations:
cert-manager.io/cluster-issuer: orc-letsencrypt-issuer
nginx.ingress.kubernetes.io/proxy-body-size: 200m
nginx.ingress.kubernetes.io/from-to-www-redirect: "true"
name: k8s-app
spec:
rules:
- host: app.k8s-nsk.tk
http:
paths:
- pathType: Prefix
path: /
backend:
service:
name: app-service
port:
number: 80
tls:
- hosts:
- app.k8s-nsk.tk
secretName: app-k8s-nsk-tls

View File

@@ -0,0 +1,6 @@
# kubetpl:syntax:$
apiVersion: v1
kind: Namespace
metadata:
name: myapp

View File

@@ -0,0 +1,13 @@
# App
apiVersion: v1
kind: Service
metadata:
namespace: myapp
name: app-service
spec:
ports:
- name: app-port
port: 80
selector:
app: myapp
---