Slide 1

Slide 1 text

@k2r2bai Setup Kubernetes Federation v2 on AWS AWS User Group Taiwan

Slide 2

Slide 2 text

@k2r2bai About Me ⽩白凱仁(Kyle Bai) • RDSS • Interested in emerging technologies. • Kubernetes Projects Contributor. • Certified Kubernetes Administrator. • CNTUG(Cloud Native Taiwan User Group) co-organizer. • Kubernetes 200+ nodes experience. @kairen([email protected]) https://k2r2bai.com

Slide 3

Slide 3 text

@k2r2bai • Motivations • Introducing Federation V2 • Live setup • Summary Agenda Today I would like to talk about

Slide 4

Slide 4 text

Motivations

Slide 5

Slide 5 text

@k2r2bai • Sensitive Workloads: I have multiple clusters but want to run sensitive workloads only in specific clusters. • Avoiding provider lock-in: By making it easier to migrate applications across clusters, federation prevents cluster provider lock-in. • High availability: Single region outage does not impact the availability of workloads. • Hybrid Cloud: Extend Deployments from on-premise clusters to the cloud. Multiple clusters

Slide 6

Slide 6 text

@k2r2bai • Distribution of applications, services, and policy to multiple clusters. • Migration of applications and services and their storage between clusters • Disaster recovery for those applications and services. • Serving users from clusters closest to them. Benefit of applications

Slide 7

Slide 7 text

Introducing Federation V2

Slide 8

Slide 8 text

@k2r2bai Concepts

Slide 9

Slide 9 text

@k2r2bai Sync controller kubefed2 federate (autogenerate typeConfig and type CRDs) kubefed2 join/unjoin Propagation refers to how resources are distributed to the target clusters.

Slide 10

Slide 10 text

@k2r2bai Type configuration declares which API types federation should handle. Type configuration

Slide 11

Slide 11 text

@k2r2bai e.g. FederatedDeployment (template) type CRD. Federated Type

Slide 12

Slide 12 text

@k2r2bai Templates define the representation of a resource common across clusters. Templates

Slide 13

Slide 13 text

@k2r2bai Placement defines which clusters the resource is intended to appear in Placement

Slide 14

Slide 14 text

@k2r2bai Overrides define per-cluster field-level variation to apply to the template. Overrides

Slide 15

Slide 15 text

@k2r2bai Scheduling Manager SchedulingPreference Controller ServiceDNS Controller IngressDNS Controller DNSEndpoint Controller

Slide 16

Slide 16 text

@k2r2bai Federation V2: API grouping

Slide 17

Slide 17 text

Live setup and demo!! (BOOM~)

Slide 18

Slide 18 text

@k2r2bai Architecture

Slide 19

Slide 19 text

@k2r2bai Architecture

Slide 20

Slide 20 text

@k2r2bai Step by step guide to setup Federation v2 on AWS https://bit.ly/2GDjHu1

Slide 21

Slide 21 text

@k2r2bai Multi-Cluster Service DNS with ExternalDNS

Slide 22

Slide 22 text

@k2r2bai ExternalDNS is not a DNS server itself, instead it is a custom controller that watches Kubernetes resources, and configures corresponding DNS records using external DNS providers like AWS Route 53, AzureDNS, CloudFlare, DigitalOcean, DNSimple, Dyn, PowerDNS, CoreDNS, Exoscale, and more. ExternalDNS https://github.com/kubernetes-incubator/external-dns

Slide 23

Slide 23 text

Summary

Slide 24

Slide 24 text

@k2r2bai • Federation v2 uses CustomResourceDefinitions to extend Kubernetes with new APIs. • The building blocks approach allows the extension of federation to supported and custom resources, which only enhances the flexibility Federation v2 is providing for future development. • Although Federation v2 is in the prototype stage, I believe that the community behind the Federation V2 project is strong and that the project seems to be headed in the right direction. Summary

Slide 25

Slide 25 text

@k2r2bai • https://github.com/kubernetes-sigs/federation-v2 • https://blog.openshift.com/combining-federation-v2-and-istio-multicluster/ • https://blog.openshift.com/kubernetes-federation-v2-on-openshift-3-11/ • https://medium.com/condenastengineering/k8s-federation-v2-a-guide-on- how-to-get-started-ec9cc26b1fa7 • https://kubernetes.io/blog/2018/12/12/kubernetes-federation-evolution/ • https://static.sched.com/hosted_files/kccna18/d4/ SIG%20MultiCluster%20Deep%20dive%20at%20Kubecon%20Seattle%202018. pdf References

Slide 26

Slide 26 text

@k2r2bai KAIREN OUT!! THANK YOU!!!