Add kustomize
This commit is contained in:
parent
5fc864c65d
commit
d021c3e63a
9 changed files with 91 additions and 3 deletions
|
@ -19,3 +19,10 @@ spec:
|
||||||
image: nginx:1.14.2
|
image: nginx:1.14.2
|
||||||
ports:
|
ports:
|
||||||
- containerPort: 80
|
- containerPort: 80
|
||||||
|
resources:
|
||||||
|
requests:
|
||||||
|
memory: "32Mi"
|
||||||
|
cpu: 128m
|
||||||
|
limits:
|
||||||
|
memory: "64Mi"
|
||||||
|
cpu: 256m
|
|
@ -7,6 +7,6 @@ spec:
|
||||||
selector:
|
selector:
|
||||||
app: nginx
|
app: nginx
|
||||||
ports:
|
ports:
|
||||||
- protocol: TCP
|
- protocol: TCP
|
||||||
port: 8000
|
port: 8000
|
||||||
targetPort: 80
|
targetPort: 80
|
21
nginx/kustomize/base/deployment.yaml
Normal file
21
nginx/kustomize/base/deployment.yaml
Normal file
|
@ -0,0 +1,21 @@
|
||||||
|
kind: Deployment
|
||||||
|
apiVersion: apps/v1
|
||||||
|
metadata:
|
||||||
|
name: app-deployment
|
||||||
|
spec:
|
||||||
|
replicas: 1
|
||||||
|
selector:
|
||||||
|
template:
|
||||||
|
spec:
|
||||||
|
containers:
|
||||||
|
- name: nginx
|
||||||
|
image: nginx
|
||||||
|
ports:
|
||||||
|
- containerPort: 80
|
||||||
|
resources:
|
||||||
|
requests:
|
||||||
|
memory: "32Mi"
|
||||||
|
cpu: 128m
|
||||||
|
limits:
|
||||||
|
memory: "64Mi"
|
||||||
|
cpu: 256m
|
3
nginx/kustomize/base/kustomization.yaml
Normal file
3
nginx/kustomize/base/kustomization.yaml
Normal file
|
@ -0,0 +1,3 @@
|
||||||
|
resources:
|
||||||
|
- deployment.yaml
|
||||||
|
- service.yaml
|
10
nginx/kustomize/base/service.yaml
Normal file
10
nginx/kustomize/base/service.yaml
Normal file
|
@ -0,0 +1,10 @@
|
||||||
|
apiVersion: v1
|
||||||
|
kind: Service
|
||||||
|
metadata:
|
||||||
|
name: app-service
|
||||||
|
spec:
|
||||||
|
type: ClusterIP
|
||||||
|
ports:
|
||||||
|
- protocol: TCP
|
||||||
|
port: 8000
|
||||||
|
targetPort: 80
|
18
nginx/kustomize/overlays/default/ingress.yaml
Normal file
18
nginx/kustomize/overlays/default/ingress.yaml
Normal file
|
@ -0,0 +1,18 @@
|
||||||
|
apiVersion: networking.k8s.io/v1
|
||||||
|
kind: Ingress
|
||||||
|
metadata:
|
||||||
|
name: app-ingress
|
||||||
|
annotations:
|
||||||
|
nginx.ingress.kubernetes.io/rewrite-target: /
|
||||||
|
spec:
|
||||||
|
ingressClassName: nginx
|
||||||
|
rules:
|
||||||
|
- http:
|
||||||
|
paths:
|
||||||
|
- path: /nginx
|
||||||
|
pathType: Prefix
|
||||||
|
backend:
|
||||||
|
service:
|
||||||
|
name: app-service
|
||||||
|
port:
|
||||||
|
number: 8000
|
23
nginx/kustomize/overlays/default/kustomization.yaml
Normal file
23
nginx/kustomize/overlays/default/kustomization.yaml
Normal file
|
@ -0,0 +1,23 @@
|
||||||
|
resources:
|
||||||
|
- ../../base
|
||||||
|
- ingress.yaml
|
||||||
|
|
||||||
|
namespace: default
|
||||||
|
|
||||||
|
labels:
|
||||||
|
- includeSelectors: true
|
||||||
|
pairs:
|
||||||
|
app: nginx
|
||||||
|
|
||||||
|
commonAnnotations:
|
||||||
|
owner: florian
|
||||||
|
|
||||||
|
namePrefix: nginx-
|
||||||
|
|
||||||
|
images:
|
||||||
|
- name: nginx
|
||||||
|
newName: nginx
|
||||||
|
newTag: 1.14.2
|
||||||
|
|
||||||
|
patches:
|
||||||
|
- path: replica.yaml
|
6
nginx/kustomize/overlays/default/replica.yaml
Normal file
6
nginx/kustomize/overlays/default/replica.yaml
Normal file
|
@ -0,0 +1,6 @@
|
||||||
|
kind: Deployment
|
||||||
|
apiVersion: apps/v1
|
||||||
|
metadata:
|
||||||
|
name: app-deployment
|
||||||
|
spec:
|
||||||
|
replicas: 2
|
Loading…
Add table
Add a link
Reference in a new issue