Skip to content

Instantly share code, notes, and snippets.

@Pablo-Merino
Created May 2, 2020 11:47
Show Gist options
  • Save Pablo-Merino/3fab1cfdc220bf9e36aa871c76d04d5d to your computer and use it in GitHub Desktop.
Save Pablo-Merino/3fab1cfdc220bf9e36aa871c76d04d5d to your computer and use it in GitHub Desktop.
K8s Problems
apiVersion: apps/v1
kind: Deployment
metadata:
name: hello-deployment
namespace: default
spec:
replicas: 1
selector:
matchLabels:
app: hello-deployment
template:
metadata:
labels:
app: hello-deployment
spec:
containers:
- name: kuard
image: gcr.io/kuar-demo/kuard-amd64:1
ports:
- containerPort: 8080
---
kind: Service
apiVersion: v1
metadata:
name: hello-svc
labels:
app: hello-deployment
spec:
ports:
- name: http
protocol: TCP
port: 80
targetPort: 8080
selector:
app: hello-deployment
type: LoadBalancer
externalTrafficPolicy: Cluster
---
apiVersion: extensions/v1beta1
kind: Ingress
metadata:
name: hello-app-ingress
annotations:
kubernetes.io/ingress.class: "nginx"
cert-manager.io/cluster-issuer: "letsencrypt-staging"
acme.cert-manager.io/http01-edit-in-place: "true"
spec:
tls:
- hosts:
- tls.svc.k8s.pablo.host
secretName: "hello-app-staging-tls"
rules:
- host: tls.svc.k8s.pablo.host
http:
paths:
- path: /
backend:
serviceName: hello-svc
servicePort: 80
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment