New yaml for a working MVP
Still need to add thing like TLS but this will basically be the template for routing and service setup, going forward
This commit is contained in:
parent
8f06ef269a
commit
fc897bdd0e
@ -1,36 +0,0 @@
|
|||||||
apiVersion: apps/v1
|
|
||||||
kind: Pod
|
|
||||||
metadata:
|
|
||||||
name: health-deployment
|
|
||||||
namespace: testing
|
|
||||||
labels:
|
|
||||||
app: health
|
|
||||||
spec:
|
|
||||||
replicas: 1
|
|
||||||
selector:
|
|
||||||
matchLabels:
|
|
||||||
app: health
|
|
||||||
template:
|
|
||||||
metadata:
|
|
||||||
labels:
|
|
||||||
app: health
|
|
||||||
spec:
|
|
||||||
containers:
|
|
||||||
- name: hello-health
|
|
||||||
image: hashicorp/http-echo
|
|
||||||
args: [ "-text=Healthy" ]
|
|
||||||
ports:
|
|
||||||
- containerPort: 5678
|
|
||||||
---
|
|
||||||
apiVersion: v1
|
|
||||||
kind: Service
|
|
||||||
metadata:
|
|
||||||
name: health
|
|
||||||
namespace: testing
|
|
||||||
spec:
|
|
||||||
ports:
|
|
||||||
- name: http
|
|
||||||
port: 80
|
|
||||||
targetPort: 5678
|
|
||||||
selector:
|
|
||||||
app: health
|
|
@ -1,20 +0,0 @@
|
|||||||
apiVersion: networking.k8s.io/v1
|
|
||||||
kind: Ingress
|
|
||||||
metadata:
|
|
||||||
name: vaccum
|
|
||||||
namespace: testing
|
|
||||||
annotations:
|
|
||||||
cert-manager.io/issuer: letsencrypt-nginx
|
|
||||||
spec:
|
|
||||||
ingressClassName: nginx
|
|
||||||
rules:
|
|
||||||
- host: example.shockrah.xyz
|
|
||||||
http:
|
|
||||||
paths:
|
|
||||||
- pathType: Prefix
|
|
||||||
path: "/"
|
|
||||||
backend:
|
|
||||||
service:
|
|
||||||
name: health
|
|
||||||
port:
|
|
||||||
number: 80
|
|
21
infra/vultr-kubernetes/service.yaml
Normal file
21
infra/vultr-kubernetes/service.yaml
Normal file
@ -0,0 +1,21 @@
|
|||||||
|
apiVersion: v1
|
||||||
|
kind: Service
|
||||||
|
metadata:
|
||||||
|
name: whoami-lb
|
||||||
|
annotations:
|
||||||
|
service.beta.kubernetes.io/vultr-loadbalancer-protocol: "http"
|
||||||
|
service.beta.kubernetes.io/vultr-loadbalancer-algorithm: "least_connections"
|
||||||
|
service.beta.kubernetes.io/vultr-loadbalancer-healthcheck-protocol: "http"
|
||||||
|
service.beta.kubernetes.io/vultr-loadbalancer-healthcheck-path: "/health"
|
||||||
|
service.beta.kubernetes.io/vultr-loadbalancer-healthcheck-interval: "30"
|
||||||
|
service.beta.kubernetes.io/vultr-loadbalancer-healthcheck-response-timeout: "5"
|
||||||
|
service.beta.kubernetes.io/vultr-loadbalancer-healthcheck-unhealthy-threshold: "5"
|
||||||
|
service.beta.kubernetes.io/vultr-loadbalancer-healthcheck-healthy-threshold: "5"
|
||||||
|
spec:
|
||||||
|
type: LoadBalancer
|
||||||
|
selector:
|
||||||
|
name: whoami
|
||||||
|
ports:
|
||||||
|
- name: http
|
||||||
|
port: 80
|
||||||
|
targetPort: 8080
|
20
infra/vultr-kubernetes/test.yaml
Normal file
20
infra/vultr-kubernetes/test.yaml
Normal file
@ -0,0 +1,20 @@
|
|||||||
|
apiVersion: apps/v1
|
||||||
|
kind: Deployment
|
||||||
|
metadata:
|
||||||
|
name: whoami
|
||||||
|
spec:
|
||||||
|
replicas: 3
|
||||||
|
selector:
|
||||||
|
matchLabels:
|
||||||
|
name: whoami
|
||||||
|
template:
|
||||||
|
metadata:
|
||||||
|
labels:
|
||||||
|
name: whoami
|
||||||
|
spec:
|
||||||
|
containers:
|
||||||
|
- name: whoami
|
||||||
|
image: quanhua92/whoami:latest
|
||||||
|
imagePullPolicy: Always
|
||||||
|
ports:
|
||||||
|
- containerPort: 8080
|
Loading…
Reference in New Issue
Block a user