Skip to content

Instantly share code, notes, and snippets.

View venkatnsrinivasan's full-sized avatar

Venkat Srinivasan venkatnsrinivasan

View GitHub Profile
---
apiVersion: types.kubefed.io/v1beta1
kind: FederatedJob
metadata:
name: cluster-init
spec:
placement:
clusters:
- name: k8s-cluster-us-central-1-gke
template:
apiVersion: multiclusterdns.kubefed.io/v1alpha1
kind: ServiceDNSRecord
metadata:
# The name of the sample service.
name: cockroachdb-0
# The namespace of the sample deployment/service.
namespace: kubefed-poc
spec:
# The name of the corresponding Domain.
domainRef: federation
---
apiVersion: types.kubefed.io/v1beta1
kind: FederatedService
metadata:
name: cockroachdb-public
spec:
placement:
clusterSelector:
matchLabels:
public-cloud: "true"
apiVersion: types.kubefed.io/v1beta1
kind: FederatedService
metadata:
name: cockroachdb-0
spec:
placement:
clusterSelector:
matchLabels:
public-cloud: "true"
template:
---
apiVersion: types.kubefed.io/v1beta1
kind: FederatedService
metadata:
name: cockroachdb-public
spec:
placement:
clusterSelector:
matchLabels: {}
template:
apiVersion: v1
kind: Service
metadata:
# This service is meant to be used by clients of the database. It exposes a ClusterIP that will
# automatically load balance connections to the different database pods.
name: cockroachdb-public
labels:
app: cockroachdb
spec:
ports:
apiVersion: multiclusterdns.kubefed.io/v1alpha1
kind: IngressDNSRecord
metadata:
name: echo-ingress
namespace: kubefed-poc
spec:
hosts:
- echo.fulliautomatix.site
recordTTL: 300
apiVersion: multiclusterdns.kubefed.io/v1alpha1
kind: ServiceDNSRecord
metadata:
# The name of the sample service.
name: echo-svc-lb
# The namespace of the sample deployment/service.
namespace: kubefed-poc
spec:
# The name of the corresponding Domain.
domainRef: federation
apiVersion: multiclusterdns.kubefed.io/v1alpha1
kind: Domain
metadata:
# Corresponds to <federation> in the resource records.
name: federation
# The namespace running kubefed-controller-manager.
namespace: kube-federation-system
# The domain/subdomain that is setup in your externl-dns provider.
domain: kubefed.fulliautomatix.site
apiVersion: v1
kind: ServiceAccount
metadata:
name: external-dns
---
apiVersion: rbac.authorization.k8s.io/v1beta1
kind: ClusterRole
metadata:
name: external-dns
rules: