Skip to content

Instantly share code, notes, and snippets.

@medatech
Created August 28, 2020 23:51
Show Gist options
  • Save medatech/3ba6373d48fc399ca9367a6db92e2b28 to your computer and use it in GitHub Desktop.
Save medatech/3ba6373d48fc399ca9367a6db92e2b28 to your computer and use it in GitHub Desktop.
---
apiVersion: "v1"
kind: "Service"
metadata:
name: "nginx-hello-world"
labels:
app: "hello-world"
annotations:
load-balancer.hetzner.cloud/name: "devopslb"
load-balancer.hetzner.cloud/health-check-port: "10254"
spec:
ports:
- name: "http"
port: 80
targetPort: 80
selector:
app: "hello-world"
type: LoadBalancer
---
apiVersion: "apps/v1"
kind: "Deployment"
metadata:
name: "nginx-hello-world"
labels:
app: "hello-world"
spec:
selector:
matchLabels:
app: "hello-world"
strategy:
type: "Recreate"
template:
metadata:
labels:
app: "hello-world"
spec:
containers:
- image: "nginx"
name: "nginx-hello-world"
imagePullPolicy: "Always"
ports:
- containerPort: 80
name: "http"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment