Skip to content

Instantly share code, notes, and snippets.

@zommarin
Created August 28, 2019 10:35
Show Gist options
  • Save zommarin/7a79d6c3b331c36f00a4e9234544c794 to your computer and use it in GitHub Desktop.
Save zommarin/7a79d6c3b331c36f00a4e9234544c794 to your computer and use it in GitHub Desktop.
---
apiVersion: v1
kind: Namespace
metadata:
name: dtest
---
apiVersion: v1
kind: Service
metadata:
name: dns-test
namespace: dtest
annotations:
external-dns.alpha.kubernetes.io/hostname: foo.bar.com
external-dns.alpha.kubernetes.io/ttl: "60"
spec:
type: ClusterIP
clusterIP: None
selector:
app: dns-test
ports:
- protocol: TCP
port: 80
targetPort: 9376
---
apiVersion: apps/v1
kind: StatefulSet
metadata:
name: dns-test
namespace: dtest
labels:
app: dns-test
spec:
replicas: 2
selector:
matchLabels:
app: dns-test
serviceName: dns-test
template:
metadata:
name: dns-test
labels:
app: dns-test
spec:
containers:
- name: dummy
image: busybox
command: ['sh', '-c', 'sleep 3600']
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment