mirror of
https://git.sr.ht/~magic_rb/dotfiles
synced 2024-11-26 18:16:13 +01:00
54 lines
949 B
YAML
54 lines
949 B
YAML
|
apiVersion: apps/v1
|
||
|
kind: Deployment
|
||
|
metadata:
|
||
|
name: nginx-test
|
||
|
labels:
|
||
|
app: nginx-test
|
||
|
spec:
|
||
|
replicas: 1
|
||
|
selector:
|
||
|
matchLabels:
|
||
|
app: nginx-test
|
||
|
template:
|
||
|
metadata:
|
||
|
labels:
|
||
|
app: nginx-test
|
||
|
spec:
|
||
|
containers:
|
||
|
- name: nginx-test
|
||
|
image: nginx@sha256:24422dd326d7f45078a18774970a0d3e3691835c8ab5abf5b8efa8fe5aba524e
|
||
|
ports:
|
||
|
- containerPort: 80
|
||
|
---
|
||
|
apiVersion: v1
|
||
|
kind: Service
|
||
|
metadata:
|
||
|
name: nginx-service
|
||
|
spec:
|
||
|
selector:
|
||
|
app: nginx-test
|
||
|
type: LoadBalancer
|
||
|
ports:
|
||
|
- protocol: TCP
|
||
|
port: 8696
|
||
|
targetPort: 80
|
||
|
---
|
||
|
apiVersion: networking.k8s.io/v1
|
||
|
kind: Ingress
|
||
|
metadata:
|
||
|
name: nginx-test
|
||
|
annotations:
|
||
|
kubernetes.io/ingress.class: nginx
|
||
|
spec:
|
||
|
rules:
|
||
|
- host: localhost
|
||
|
http:
|
||
|
paths:
|
||
|
- backend:
|
||
|
service:
|
||
|
name: nginx-service
|
||
|
port:
|
||
|
number: 80
|
||
|
path: /
|
||
|
pathType: Prefix
|