Slide 1

Slide 1 text

KubeCon tips and “Kubernetes at GitHub” Kubernetes Meetup Tokyo #9 at Cyber Agent @tnir - Takuya Noguchi 2018-01-12

Slide 2

Slide 2 text

@tnir Takuya Noguchi Tw: @tn961ir FB: @takuya.noguchi.961 ● Co-organizer of Kaimyacho.k8s & Prometheus Tokyo & Docker Meetup Tokyo ● Cloud Native Ambassador, CNCF ● Core Team member, GitLab ● 20 yrs Software Engineer in Digital Transform. ● Tech PR/SWE/SRE at iRidge, Inc.

Slide 3

Slide 3 text

Agenda KubeCon + CNCon overview ● Certification program update Kubernetes at GitHub ● Blog article ● My questions ● Clusters ● Deployments ● Delivery Workflow ● Canary releases ● Spokes KubeCon + CNCon EU 2018 ● Call for Paper deadline

Slide 4

Slide 4 text

2015.11 KubeCon 2015 @ SF 2016.3 KubeCon Europe 2016 @ London 2016.11 CloudNativeCon + KubeCon NA 2016 @ Seattle 2017.3 CloudNativeCon + KubeCon Europe 2017 @ Berlin 2017.12 KubeCon + CloudNativeCon NA 2017 @ Austin

Slide 5

Slide 5 text

Schedule ● 公式日程: Dec 6-8, 2017 ○ 実際 → Dec 4-8, 2017 ● → 公式スケジュールをチェックしましょう ● 会社で行く場合も注意が必要かも。。

Slide 6

Slide 6 text

Unofficial announcements ● CKA update (k8s 1.8) ● Certified Kubernetes Application Developer (CKAD) (beta) ○ アプリケーション開発者のための資格

Slide 7

Slide 7 text

Managed Kubernetes on AWS ● EKS: ベータ H1 2018 (by ブースのAWS SAの人)

Slide 8

Slide 8 text

KubeCon+CNCon NA 2017 recap @ Docker Meetup Tokyo https://bit.ly/2D1W3GL

Slide 9

Slide 9 text

“Cloud native” from CNCF Charter Cloud native system: 1. Container packaged ( => containerization) 2. Dynamically managed ( => orchestration) 3. Micro-services oriented ( => service mesh) https://www.cncf.io/about/charter/

Slide 10

Slide 10 text

2013-2014 (1) Containerization (2) Orchestration (3) Micro-s ervices

Slide 11

Slide 11 text

2015-2017 (1) Containerization (2) Orchestration (3) Micro-services

Slide 12

Slide 12 text

2018-? (1) Containerization (2) Orchestration (3) Micro-services

Slide 13

Slide 13 text

Keynote: Kubernetes at GitHub - Jesse Newland, Principal Site Reliability Engineer, GitHub

Slide 14

Slide 14 text

2017年8月の発表 GitHub Engineeringのブログで発表 https://githubengineering.com/kub ernetes-at-github/

Slide 15

Slide 15 text

The New Stack “GitHub Goes All in on Kubernetes”

Slide 16

Slide 16 text

私の疑問 unicorn以外は? github.com:22はsshについても提供しているがsshdはどうしているの か? ノード規模 超高トラフィックサイトではないだろうがどのくらいだろう? Spokesはどうしたらいい? Spokes (distributed Git) のような前例の少ないワークロードへの対応

Slide 17

Slide 17 text

本番で約4ヶ月ほど動かしている

Slide 18

Slide 18 text

7種類のノード種別を3クラスタに

Slide 19

Slide 19 text

No content

Slide 20

Slide 20 text

chatopsによるnode追加

Slide 21

Slide 21 text

node設定はこれまで通りPuppetで

Slide 22

Slide 22 text

3 deployments

Slide 23

Slide 23 text

3 deployments (cont’d) ● unicorn ● unicorn-api ● consul-service-router unicornもunicorn-apiも同一github/githubアプリなのではない かと思われる

Slide 24

Slide 24 text

Pod definition: 3 containers/pod

Slide 25

Slide 25 text

Communications inside pods ● Nginx-unicorn ○ via Unix socket shared ● Unicorn-failbot ○ failbot: Proxies to exception tracking system (e.g., Sentry) ○ via HTTP?

Slide 26

Slide 26 text

unicorn-api: identical to unicorn

Slide 27

Slide 27 text

consul-service-router with haproxy Envoyサービスメッシュはこれからできたらいいね

Slide 28

Slide 28 text

NodePort via GLB (GitHub LB) ingressを用いたデプロイは現状やっていない

Slide 29

Slide 29 text

Logging,Monitoring,Metrics tools

Slide 30

Slide 30 text

Read-only kubectl get * via chatops

Slide 31

Slide 31 text

Deploy PR48xxxxxxxx via Hubot

Slide 32

Slide 32 text

Deliveryまでのワークフロー

Slide 33

Slide 33 text

GitHub Flow: 従来のCD workflow

Slide 34

Slide 34 text

規約 (convention) $ docker build -t $service:$sha1 ./Dockerfile $ kubectl create ns $service-$environment $ deploy -Rf ./config/kubernetes/$environment | \ kubectl apply -ns $service-$environment -f -

Slide 35

Slide 35 text

review-lab (similar to Heroku’s Review Apps) (replaces branch-lab)

Slide 36

Slide 36 text

config/kubernetes/review-lab # updates image field to $service:$sha1 # injects a Secret # injects an Ingress

Slide 37

Slide 37 text

review-lab (cont’d) $ kubectl create ns review-lab-$branch $ kubectl apply -ns review-lab-$branch -f -

Slide 38

Slide 38 text

Annotations for canary releases

Slide 39

Slide 39 text

Serviceに1個のpodだけ追加

Slide 40

Slide 40 text

Deploy to production $ kubectl create ns review-lab-$branch $ kubectl apply -ns github-namespace -Rf config/kubernetes/production

Slide 41

Slide 41 text

ここまで github/githubの話

Slide 42

Slide 42 text

他のサービスにもcanary適用可

Slide 43

Slide 43 text

Kubernetesを基盤とする恩栄あり

Slide 44

Slide 44 text

マイクロサービス化への道

Slide 45

Slide 45 text

オンプレのPersistent Disk問題

Slide 46

Slide 46 text

分散システム

Slide 47

Slide 47 text

Spokes (formally DGit)

Slide 48

Slide 48 text

2018年以降に期待

Slide 49

Slide 49 text

まとめ 1. git+ssh proxy => unicornについ ては触れられず 2. モノリスアプリもKubernetesで動 かせる 3. Gitオペレーションのコンテナライ ゼーションの情報公開に期待

Slide 50

Slide 50 text

私の疑問(聴講後) unicorn以外は?(sshd)  →情報公開されず ノード規模  →150〜200台 Spokesはどうしたらいい?  →2018年以降取り組んでいくのだと思われる

Slide 51

Slide 51 text

参加した感想 ● オースティン寒い(期間前・期間後は暖かかった) ● 録画されてないセッション多い(LT、Salons) ● 盛り上がってた

Slide 52

Slide 52 text

KubeCon/CloudNat iveCon EU 2018 CfP deadline: 1/13 17:00 (JST)

Slide 53

Slide 53 text

あと20時間!!!

Slide 54

Slide 54 text

References (for “Kubernetes at GitHub”) ● Conference Website: https://kccncna17.sched.com/ ● Session site: https://kccncna17.sched.com/event/CUFK/keynote-kubernetes-at-github-jesse-newl and-principal-site-reliability-engineer-github ● Slides: https://schd.ws/hosted_files/kccncna17/44/kubernetes-at-github.pdf ● Recorded video: https://www.youtube.com/watch?v=OgRHIZt8Yy8 ● Related article: https://githubengineering.com/kubernetes-at-github/