Skip to content

Instantly share code, notes, and snippets.

@ibiqlik
Last active September 1, 2020 07:07
Show Gist options
  • Save ibiqlik/ba26427e143b7495238cf8067610683c to your computer and use it in GitHub Desktop.
Save ibiqlik/ba26427e143b7495238cf8067610683c to your computer and use it in GitHub Desktop.
whoami k8s
---
kind: Deployment
apiVersion: apps/v1
metadata:
namespace: default
name: whoami
labels:
app: whoami
spec:
replicas: 1
selector:
matchLabels:
app: whoami
template:
metadata:
labels:
app: whoami
spec:
containers:
- name: whoami
image: containous/whoami
ports:
- name: web
containerPort: 80
---
apiVersion: v1
kind: Service
metadata:
name: whoami
spec:
ports:
- protocol: TCP
name: web
port: 80
selector:
app: whoami
---
apiVersion: extensions/v1beta1
kind: Ingress
metadata:
name: whoami
annotations:
kubernetes.io/ingress.class: "nginx"
kubernetes.io/tls-acme: "true"
spec:
tls:
- hosts:
- example.local
secretName: whoami-tls
rules:
- host: example.local
http:
paths:
- path: /
backend:
serviceName: whoami
servicePort: 80
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment