Upgrade to Pro — share decks privately, control downloads, hide ads and more …

Fleet アーキテクチャ Deep Dive

Sponsored · Your Podcast. Everywhere. Effortlessly. Share. Educate. Inspire. Entertain. You do you. We'll handle the rest.
Avatar for Wenhan Shi Wenhan Shi
November 30, 2021

Fleet アーキテクチャ Deep Dive

RancherJP Online Meetup #03

Avatar for Wenhan Shi

Wenhan Shi

November 30, 2021
Tweet

More Decks by Wenhan Shi

Other Decks in Technology

Transcript

  1. © Copyright 2021 Rancher. All Rights Reserved. 1 © Copyright

    2021 Rancher. All Rights Reserved. 1 Fleet アーキテクチャ Deep Dive RancherJP Online Meetup #03 2021.11.30 Wenhan Shi Rancher Support Engineer
  2. © Copyright 2021 Rancher. All Rights Reserved. 2 https://github.com/rancher/fleet Rancher

    Continuous Delivery - • Rancherが開発した独立のプロジェクト • Rancher v2.5/v2.6 built-in • GitOpsで 1 - 1,000,000のKubernetes クラスタを一元管理 • 各店舗・ATM・車上のk8s cluster • Policy/Application Deployment/Infraを操作可能 • UIでデプロイ状況が可視化 • クラスタをグルーピングして操作可能 • エリア・HWスペック・用途に分けて操作可能
  3. © Copyright 2021 Rancher. All Rights Reserved. 3 Cluster Group

    demo commit Deploy Deploy Monitoring Deploy
  4. © Copyright 2021 Rancher. All Rights Reserved. 5 Fleet Manager

    Fleet Controller/Manager • Runs on a central k8s cluster • Typically, Rancher Server • Generating resource object and orchestration deployment
  5. © Copyright 2021 Rancher. All Rights Reserved. 6 gitjob /

    gitRepos Gitjob • Communicates with a Git repository • Pull model (No.1) GitRepos • A Git repository monitored by Fleet • Can specify a branch and a specific folder within a repo
  6. © Copyright 2021 Rancher. All Rights Reserved. 9 Bundle Bundle

    • The collection of resources to be deployed to a cluster • YAML, Helm, Kustomize • Core unit of deployment • Automatically created by Fleet based on the configured GitRepo • Convert to Helm charts by Agent BundleDeployment • The Bundle generated for a specific cluster • Instance of Bundle which includes cluster- specific customisations
  7. © Copyright 2021 Rancher. All Rights Reserved. 11 Clusters /

    Cluster Groups Clusters • A Rancher-managed k8s cluster • Labels can be assigned, such as “environment”, “region”, etc Cluster Groups • Simplifies managing a large number of clusters • Cluster groups are defined based on labels
  8. © Copyright 2021 Rancher. All Rights Reserved. 13 Agent Agents

    • One per cluster • Deploys bundles as Helm charts • Watch the status of resources(BundleDeployment) • Pull model (No 2.) • Not required to be running • Can run only during scheduled window
  9. © Copyright 2021 Rancher. All Rights Reserved. 15 How these

    works - Manager GitJobs • Detects new commit from Git Manager • Run fleet apply from Git source • Generate a bundle resource and save in k8s • Run as a k8s Job Manager • Create BundleDeployments, 1 per target cluster
  10. © Copyright 2021 Rancher. All Rights Reserved. 16 How these

    works - Agent Agent • Watches BundleDeployment in cluster dedicated namespace Agent • Download content from Fleet manager • Generate helm chart • Run helm Agent • Update BundleDeployment status Agent • Live monitors resources • Helm installation manifest is desired state • Update BundleDeployment status when things change
  11. © Copyright 2021 Rancher. All Rights Reserved. 18 比較 •

    Argo CD • コンセプトが似ているがAPPでデプロイがPush方式 • マルチクラスタに対応していますが、クラスタグループがない • Flux • Pull方式 • Git以外セントラルコントロールがない