CloudNative時代におけるKubernetes 〜 情報処理学会 コンピュータシステムシンポジウム 2018 (ComSys 2018)〜 / comsys2018_kubernetes_cloudnative

CloudNative時代におけるKubernetes 〜 情報処理学会 コンピュータシステムシンポジウム 2018 (ComSys 2018)〜 / comsys2018_kubernetes_cloudnative

http://www.ipsj.or.jp/sig/os/index.php?ComSys2018

CloudNative時代におけるKubernetes
〜情報処理学会 コンピュータシステムシンポジウム 2018 (ComSys 2018)〜

招待講演1:「Cloud Native時代におけるKubernetes」 株式会社サイバーエージェント 青山 真也様
今日コンテナ技術は広く普及し、大規模な環境でのコンテナオーケストレーションエンジンとしてはKubernetesがデファクトスタンダードとなっています。本講演ではKubernetesが必要な理由・機能及びコンセプト・解決できる問題について、また分散システムとしてのKubernetesの仕組みについて紹介します。あわせて、コンテナを利用した開発をするにあたり切り離すことのできない「Cloud Native」や「マイクロサービス」の考え方、最近のKubernetesを取り巻く技術動向についても紹介します。
主なトピック:
Kubernetesの歴史的背景と必要な理由
Cloud Nativeとマイクロサービスとは
Kubernetesの機能やコンセプト
今後注目されているKubernetes周辺分野や技術
御略歴
株式会社サイバーエージェント アドテク本部 Strategic Infrastructure Agency 2016年入社。OpenStack?を使ったプライベートクラウドやGKE互換なコンテナプラットフォームをゼロから構築し、国内カンファレンスでのKeynoteに登壇。その後、世界で2番目にCertified Kubernetes Application Developer、138番目にCertified Kubernetes Administratorの認定資格を取得。現在はKubernetesやOpenStack?などOSSへのコントリビュート活動をはじめ、CNCF公式のCloud Native Meetup TokyoのOrganizerやJapan Container Daysの運営などコミュニティ活動にも従事。
2018年9月発刊「Kubernetes完全ガイド」(インプレス)の著者。

De266761b955b2636e454a1bc7a99ed4?s=128

Masaya Aoyama (@amsy810)

November 29, 2018
Tweet

Transcript

  1. Masaya Aoyama CyberAgent adtech studio CloudNative࣌୅ʹ͓͚ΔKubernetes ৘ใॲཧֶձ ίϯϐϡʔλγεςϜγϯϙδ΢Ϝ 2018 MasayaAoyama

    @amsy810
  2. Japan Container Days v18.04 Keynote  Cloud Native Meetup Tokyo

    Organizer (+ KubeCon + JKD)    for Kubernetes CKA #138CKAD #2 OpenStack / Kubernetes Contributor Masaya Aoyama (@amsy810) Infrastructure Engineer
  3. Hobby == Kubernetes

  4. Supervisor == Hirotsu Toshio

  5. Agenda page 05 • Cloud Native and Kubernetes • Container

    and Docker • Microservice and Service Mesh • Kubernetes • Kubernetes & Workloads • Kubernetes & Networking • Kubernetes is Distributed system • Extends Kubernetes • Other topics for Kubernetes
  6. Agenda page 06 • Cloud Native and Kubernetes • Container

    and Docker • Microservice and Service Mesh • Kubernetes • Kubernetes & Workloads • Kubernetes & Networking • Kubernetes is Distributed system • Extends Kubernetes • Other topics for Kubernetes
  7. Cloud Native and Kubernetes What is Kubernetes? What is Cloud

    Naitve?
  8. CNCF and The Linux Foundation • Kubernetes The Linux Foundation

    CNCF  •     
  9. page 09 CNCF     CNCF Community Presentation,

    CNCF, 2018 (https://github.com/cncf/presentations)
  10. Graduated projects Graduated and Incubating Projects, CNCF, 2018-11-28 (https://www.cncf.io/projects/)

  11. Incubating projects Graduated and Incubating Projects, CNCF, 2018-11-28 (https://www.cncf.io/projects/)

  12. Sandbox projects Sandbox Projects, CNCF, 2018-11-28 (https://www.cncf.io/sandbox-projects/)

  13. None
  14. Cloud Native page 014 Cloud native technologies empower organizations to

    build and run scalable applications in modern, dynamic environments such as public, private, and hybrid clouds. Containers, service meshes, microservices, immutable infrastructure, and declarative APIs exemplify this approach. These techniques enable loosely coupled systems that are resilient, manageable, and observable. Combined with robust automation, they allow engineers to make high-impact changes frequently and predictably with minimal toil. The Cloud Native Computing Foundation seeks to drive adoption of this paradigm by fostering and sustaining an ecosystem of open source, vendor-neutral projects. We democratize state-of-the-art patterns to make these innovations accessible for everyone. CNCF Cloud Native Defenition v1.0, CNCF, 2018-11-28 (https://github.com/cncf/toc/blob/master/DEFINITION.md)
  15. Cloud Native & page 015 Cloud native technologies empower organizations

    to build and run scalable applications in modern, dynamic environments such as public, private, and hybrid clouds. Containers, service meshes, microservices, immutable infrastructure, and declarative APIs exemplify this approach. !#Scalable  "  $%  CNCF Cloud Native Defenition v1.0, CNCF, 2018-11-28 (https://github.com/cncf/toc/blob/master/DEFINITION.md) • Container • Immutable Infrastructure • Service Mesh • Microservice • Declarative API 
  16. Cloud Native 5 page 016 These techniques enable loosely coupled

    systems that are resilient, manageable, and observable. Combined with robust automation, they allow engineers to make high-impact changes frequently and predictably with minimal toil. CNCF Cloud Native Defenition v1.0, CNCF, 2018-11-28 (https://github.com/cncf/toc/blob/master/DEFINITION.md) • +-  • $ • ,* • 1(  • ) 0 4. '#2 &"3 ! %/ note. SRE
  17. Cloud Native - page 017 The Cloud Native Computing Foundation

    seeks to drive adoption of this paradigm by fostering and sustaining an ecosystem of open source, vendor-neutral projects. We democratize state-of-the-art patterns to make these innovations accessible for everyone. CNCF Cloud Native Defenition v1.0, CNCF, 2018-11-28 (https://github.com/cncf/toc/blob/master/DEFINITION.md) •  ! #' • ! !  • ! , %*  ($+ ! )"&
  18. Cloud Native 8 page 018 Cloud native technologies empower organizations

    to build and run scalable applications in modern, dynamic environments such as public, private, and hybrid clouds. Containers, service meshes, microservices, immutable infrastructure, and declarative APIs exemplify this approach. These techniques enable loosely coupled systems that are resilient, manageable, and observable. Combined with robust automation, they allow engineers to make high-impact changes frequently and predictably with minimal toil. The Cloud Native Computing Foundation seeks to drive adoption of this paradigm by fostering and sustaining an ecosystem of open source, vendor-neutral projects. We democratize state-of-the-art patterns to make these innovations accessible for everyone. CNCF Cloud Native Defenition v1.0, CNCF, 2018-11-28 (https://github.com/cncf/toc/blob/master/DEFINITION.md) • .0  • & • /- • 4*  • + 3 71 )%5 ($6 " !'2 Open Scalable #,
  19. Docker Swarm mode Container Orchestration Engine

  20. Container Orchestration Engine (4/0 • 3*Docker2/ • # $ #

    •  $ # / $ $ # • "$ # $ • #-.15 • 6&+!$ # • $ • "$# # • $,')%2/
  21. Container Orchestration Engine CY OP • XE Docker*" SO •

    1 $ ,2.1 • 2.1 / 2"2.1 • 02.1)!2" • 1 $ KLRZ • ^>F /(&2.1 • 2'!%. • 02#%-11 • !2J?D; SO Container Orchestration Engine CY OP • QT9  + • B34 • SO • 8[M  • :N W67 _U IA \ H@] 54 = <G 8V
  22. Kubernetes  06 2014 Borg  OSS Kubernetes timeline page

    022 Google Borg " ~2015 Google    ! $#OrchestratorBorg
  23. page 023 CNCF v1.0  07 2015 Cloud Native Computing

    Foundation 11 2014 GCP GKE Google Cloud Platform Google Kubernetes Engine Kubernetes timeline
  24. page 024 Amazon EKS  11 2017 Amazon Web Service

    Amazon Elastic Container Service for Kubernetes 02 2017 Azure AKS  Microsoft Azure Azure Container Service Kubernetes timeline
  25. future is promising 32 Certified Kubernetes Platform/Distribution 11 2017 Kubernetes

     CNCF      Platform   Distribution  page 025 09 2017 Certified Kubernetes Administrator Kubernetes  ! Kubernetes timeline
  26. page 026 KubeCon + CloudNativeCon KubeCon + CloudNativeCon Barcelona 2019

    Call for Proposals (CFP) Is Open, CNCF, 2018-11-28 (https://www.cncf.io/blog/2018/11/16/kubecon-barcelona-2019-call-for-proposals-cfp-is-open/)
  27. CNCF Community Presentation, CNCF, 2018 (https://github.com/cncf/presentations)

  28. page 028 Enterprise •    Monzo Bank •

    Kubernetes + Linkerd (Service Mesh) Ref: https://monzo.com/blog/2016/09/19/building-a-modern-bank-backend/
  29. Agenda page 029 • Cloud Native and Kubernetes • Container

    and Docker • Microservice and Service Mesh • Kubernetes • Kubernetes & Workloads • Kubernetes & Networking • Kubernetes is Distributed system • Extends Kubernetes • Other topics for Kubernetes
  30. Container / Docker Benefit of Container / Docker • 

    •   • 
  31. Container System Container • KVMXen  •  init Application

    Container •     •    page 04
  32. Docker • Docker4%Application Container .71- +8$! • #DevOps/# 2: /3

     6)*5 • 0, Moby"  &9  # containerd (' page 032
  33. page 033 Ref: https://docs.docker.com/develop/develop-images/dockerfile_best-practices/ Ref: https://12factor.net/ Part of Docker Container

    Best Practice •  >( 1 • "2;  $0@Immutable InfrastructureA • ?:7+ / 397+*" !'8 • #/< ! &  • 48)=-% 7+,1 . 6 •   5  • etc
  34. DockerfileDocker Image page 034 FROM centos:7 RUN yum -y install

    epel-release RUN yum -y install nginx COPY nginx.conf /etc/nginx/ ENTRYPOINT ["nginx", "-g", "daemon off;"] Build Once, Run Anywhere   Docker Image
  35. Docker Image page 035 5: ENTRYPOINT ["nginx", "-g", "daemon off;"]

    4: COPY nginx.conf /etc/nginx/ 3: RUN yum -y install nginx 2: RUN yum -y install epel-release 1: FROM centos:7    Docker Image
  36. page 036 $ docker build . -t sample-image Sending build

    context to Docker daemon 252.9kB Step 1/5 : FROM centos:7 ---> 75835a67d134 Step 2/5 : RUN yum -y install epel-release ---> Running in 9db248fc7b9a ... Removing intermediate container 9db248fc7b9a ---> 2fe5a7f8c007 Step 3/5 : RUN yum -y install nginx ---> Running in 0547bd920b0a ... Removing intermediate container 0547bd920b0a ---> 843b47a96c5e Step 4/5 : COPY nginx.conf /etc/nginx/ ---> fe63b2d4c95d Step 5/5 : ENTRYPOINT ["nginx", "-g", "daemon off;"] ---> Running in 876ee4d29339 Removing intermediate container 876ee4d29339 ---> b5068171c053 Successfully built b5068171c053 Successfully tagged sample-image:latest 75835a67d134 2fe5a7f8c007 843b47a96c5e fe63b2d4c95d b5068171c053 sample-image
  37.  page 037 $ docker history sample-image IMAGE CREATED BY

    SIZE b5068171c053 #(nop) ENTRYPOINT ["nginx" "-g" … 0B fe63b2d4c95d #(nop) COPY file:6edadf5af999cacd… 3.51kB 843b47a96c5e yum -y install nginx 214MB 2fe5a7f8c007 yum -y install epel-release 99.5MB 75835a67d134 #(nop) CMD ["/bin/bash"] 0B <missing> #(nop) LABEL org.label-schema.sc… 0B <missing> #(nop) ADD file:fbe9badfd2790f074… 200MB 75835a67d134 2fe5a7f8c007 843b47a96c5e fe63b2d4c95d b5068171c053 sample-image
  38. Docker  page 038 •     •

     Read Write •  Read Only
  39.    page 039 5: ENTRYPOINT [”/usr/sbin/nginx", "-g", "daemon

    off;"] 4: COPY nginx.conf /etc/nginx/ 3: RUN yum -y install nginx 2: RUN yum -y install epel-release 1: FROM centos:7    
  40.    page 040 5: ENTRYPOINT [”/usr/sbin/nginx", "-g", "daemon

    off;"] 5: ENTRYPOINT [”nginx", "-g", "daemon off;"]    
  41. moby/buildkit – =+/ “docker build” page 041 • DAG;I1-KDGLLB?,37B •

    "') '4?9 ,37B • (& $%4?.A • JFE!'62 4?.A • root<L*C • :5300 7BH8 • NTT SIC M@>5#( • Nmoby/moby, containerd/containerd#(O Ref: https://www.slideshare.net/AkihiroSuda/buildkit
  42. Dockerfile Docker Image page 042 FROM sample-image:latest RUN yum –y

    install telnet •   !"  • )( # ' &%!!$
  43. Container   page 043 • . # 740 %/.

    • . #+/&-"8  B35@ • 7/$/(" DC B35@ • 12 factor app )!',  =:A • <?6  * • 912 • >;
  44. Agenda page 044 • Cloud Native and Kubernetes • Container

    and Docker • Microservice and Service Mesh • Kubernetes • Kubernetes & Workloads • Kubernetes & Networking • Kubernetes is Distributed system • Extends Kubernetes • Other topics for Kubernetes
  45. Microservice and Service Mesh Benefit of Microservice and Service Mesh

    •  •  •  •  • 
  46. Microservice Architecture page 046     ProductPage Reviews

    Details Ratings HTTP/gRPC HTTP/gRPC HTTP/gRPC
  47. page 047 500+ microservices The Case of Chaos, Bruce Wong,

    2014-12-19, (https://www.slideshare.net/BruceWong3/the-case-for-chaos) The History of the Service Mesh, The New Stack, 2018-2-13, (https://thenewstack.io/history-service-mesh/)
  48. %' )#!D@X_71T gRPC, REST N%' )#!cS 2 )#!@X_7UJ<f "$'9A :

    CT/*"$'1T  f^=eO4; 6YBbK-^  2`aG7%' )#!bK ,+?M CT\-E[L   !)&(9A G7CT!)&(  .IV d8,+F0  G7CTd8Z 53 R] H> )#!PQW  Benefit of Microservice Golang Java Scala gRPC REST
  49. %' )#!D@X_71T gRPC, REST N%' )#!cS 2 )#!@X_7UJ<f "$'9A :

    CT/*"$'1T  f^=eO4; 6YBbK-^  2`aG7%' )#!bK ,+?M CT\-E[L   !)&(9A G7CT!)&(  .IV d8,+F0  G7CTd8Z 53 R] H> )#!PQW  Developer Benefit of Microservice
  50. %' )#!D@X_71T gRPC, REST N%' )#!cS 2 )#!@X_7UJ<f "$'9A :

    CT/*"$'1T  f^=eO4; 6YBbK-^  2`aG7%' )#!bK ,+?M CT\-E[L   !)&(9A G7CT!)&(  .IV d8,+F0  G7CTd8Z 53 R] H> )#!PQW  Benefit of Microservice
  51. %' )#!D@X_71T gRPC, REST N%' )#!cS 2 )#!@X_7UJ<f "$'9A :

    CT/*"$'1T  f^=eO4; 6YBbK-^  2`aG7%' )#!bK ,+?M CT\-E[L   !)&(9A G7CT!)&(  .IV d8,+F0  G7CTd8Z 53 R] H> )#!PQW  Benefit of Microservice
  52. %' )#!D@X_71T gRPC, REST N%' )#!cS 2 )#!@X_7UJ<f "$'9A :

    CT/*"$'1T  f^=eO4; 6YBbK-^  2`aG7%' )#!bK ,+?M CT\-E[L   !)&(9A G7CT!)&(  .IV d8,+F0  G7CTd8Z 53 R] H> )#!PQW  Benefit of Microservice
  53. page 053 Can we get Observability? The Case of Chaos,

    Bruce Wong, 2014-12-19, (https://www.slideshare.net/BruceWong3/the-case-for-chaos) The History of the Service Mesh, The New Stack, 2018-2-13, (https://thenewstack.io/history-service-mesh/)
  54. Service Mesh Architecture (generally) page 054 • Microservice • Microservice

    with Service Mesh (for Observability)
  55. Service Mesh  page 055 • Microservice   

     • Traffic Shifting (ex, Canary release) • Circuit Break • Fault Injection • Rate Limit • Retry • mTLS
  56. Canary Release page 056

  57. Microservice / Service Mesh  page 057 • Microservice 2J=:

    OC*@0$ • 5R 49,-HS#!"Q3T • MicroserviceP -K>8D% • MicroserviceP <M  (6-H • mTLS N&FL ;., • BG/  • 7') • EA • -K> • 1? I+,
  58. Agenda page 058 • Cloud Native and Kubernetes • Container

    and Docker • Microservice and Service Mesh • Kubernetes • Kubernetes & Workloads • Kubernetes & Networking • Kubernetes is Distributed system • Extends Kubernetes • Other topics for Kubernetes
  59. Kubernetes Overview Promote Cloud Native •  •  •

     •  • 
  60. Kubernetes    page 060 Design Principles, Kubernetes Community,

    2017-11-04 (https://github.com/kubernetes/community/blob/master/contributors/design-proposals/architecture/principles.md) 01 Declarative Code & API  Manifests API Infrastructure as Code
  61. Declarative Code & API page 061 Master Worker Worker Worker

    Register Declarative Manifest to API Server client
  62. Kubernetes  page 062 Design Principles, Kubernetes Community, 2017-11-04 (https://github.com/kubernetes/community/blob/master/contributors/design-proposals/architecture/principles.md)

    02 03 01 Self Healing  ) #"  Automation & Immutable Infrastructure Immutable Infrastructure& # Declarative Code & API  Manifests$" %'API !( Infrastructure as Code
  63. Agenda page 063 • Cloud Native and Kubernetes • Container

    and Docker • Microservice and Service Mesh • Kubernetes • Kubernetes & Workloads • Kubernetes & Networking • Kubernetes is Distributed system • Extends Kubernetes • Other topics for Kubernetes
  64. Kubernetes & Workloads Running Container

  65. Workloads  page 065 •  Workloads  Deployment ReplicaSet

    ReplicaSet Pod Pod Pod Pod Pod Deployment ReplicaSet Pod
  66. Pod page 066 • Kubernetes "  • 1 

    #! $ Node Scheduling% • PodIP Address   $PortBind% Deployment ReplicaSet Pod
  67. Pod Linux Namespace page 067 • Pod  Linux Namespace

    Container • PID   K8s 1.12   net user ipc pid mnt uts
  68. Container Design Pattern page 068 Design patterns for container-based distributed

    systems Brendan Burns, David Oppenheimer (Google) 8th USENIX Workshop on Hot Topics in Cloud Computing (HotCloud '16) (https://www.usenix.org/system/files/conference/hotcloud16/hotcloud16_burns.pdf) • Pod     • Sidecar pattern • Ambassador pattern • Adaptor pattern
  69. Sidecar pattern page 069 •     

     
  70. Ambassador Pattern page 070 •   "  

    #  !  
  71. Adaptor pattern page 071 •   !$ " #

      
  72. ReplicaSet page 072 • Pod   Pod Deployment ReplicaSet

    Pod
  73. PodReplicaSet • Pod   

  74. Replica

  75. ReplicaSet  Self-Healing page 075 • ReplicaSet PodReplica  •

    = NodePod Node 
  76. SchedulingPod  page 076 •     1.

    Node Affinity / Node Anti-affinity 2. Pod Affinity / Pod Anti-affinity 3. Taints / Tolerations
  77. Node Affinnity / Node Anti-affinity page 077 • Node 

    
  78. Inter-pod Affinity / Inter-pod Anti-Affinity page 078 • Pod 

    Pod 
  79. Taints / Tolerations page 079 • PodNode  Node Pod

    Reject 
  80. Deployment • ReplicaSet  page 080 Deployment ReplicaSet Pod

  81. Deployment  Rolling Update page 081

  82. Deployment  Rollback page 082

  83. ReplicaSet page 083

  84.    Workloads"(  page 084 DaemonSet: StatefulSet: Job:

    CronJob: Node 1Pod' !%* Pod' #$& Pod' )Pod'
  85.  Cloud Native '  %   page 085

    !$()Persistent Volume*  / &#")Secret / ConfigMap*   #"
  86. Agenda page 086 • Cloud Native and Kubernetes • Container

    and Docker • Microservice and Service Mesh • Kubernetes • Kubernetes & Workloads • Kubernetes & Networking • Kubernetes is Distributed system • Extends Kubernetes • Other topics for Kubernetes
  87. Kubernetes & Networking Connect to container

  88. Kubernetes Network page 088 •  External Network Pod 

     • Internal Network NodePod CNI
  89. Service  page 089 Service     Load

    Balancing Service Discovery
  90.  Load Balancingtype: ClusterIP page 090

  91.  Load Balancingtype: LoadBalancer page 091

  92.  Load Balancing page 092

  93. Balancingkube-proxyproxy-mode page 093 1. userspace • Userspace kube-proxy  

    2. iptables • iptables   • kube-proxyiptables   3. ipvs • ipvs   • kube-proxyipvs  
  94. page 094 Service Discovery • Service Discovery  IP 

  95. page 095 Service Discovery • Kubernetes DNS Service Object 

    DNS " resolv.conf #search$ ! SERVICE.NAMESPACE.svc.cluster.local
  96. Ingress  page 096 •   Service L4 LoadBalancing

    • Ingress L7 LoadBalancing •   
  97. Pod Native Network page 097 • 2LoadBalancing

  98. Pod   Network Policy page 098 •  Pod

      • Network Policy  Node iptables
  99. Kubernetes  Network )9 6%& page 099 *14# /!Kubernetes 3

    -5 ".2+( • Rolling Update0NodeLB, 1' Rolling Update 7  • 8$0LB8$ 
  100.    page 0100 •    

  101. Agenda page 0101 • Cloud Native and Kubernetes • Container

    and Docker • Microservice and Service Mesh • Kubernetes • Kubernetes & Workloads • Kubernetes & Networking • Kubernetes is Distributed system • Extends Kubernetes • Other topics for Kubernetes
  102. Kubernetes is Distributed System Kubernetes architecture deep dive

  103. Manifest (Declarative Code) • '$(*YAML  • KubernetesAPI Object%"# •

     ! & nginx  3)
  104. Overview of Kubernetes Architecture page 0104 kube-apiserver kubelet kubelet kubelet

    etcd client Manifest API Object Register API Object via REST API Store API Object kube-scheduler kube-controller- manager kube-proxy kube-proxy kube-proxy
  105. API Object (also Declarative) page 0105 curl https://kubernetes/apis/extensions/v1beta1/namespaces/default /replicasets/sample-rs --cacert

    /var/run/secrets/kubernetes.io/serviceaccount/ca.crt -H "Authorization: Bearer $(cat /var/run/secrets/kubernetes.io/serviceaccount/token)” { "kind": ”RepicaSets", "apiVersion": "extensions/v1beta1", "metadata": { "name": "sample-rs", "namespace": "default", "selfLink": "/apis/extensions/v1beta1/namespaces/default/replicasets/sample-rs", "uid": "f10cdd9e-f249-11e8-9dde-42010a92013a", "resourceVersion": "5004593", ...
  106. Flow of ReplicaSet page 0106 kube-apiserver apiVersion: apps/v1 kind: ReplicaSet

    metadata: name: sample-rs spec: replicas: 3 … etcd apiVersion: apps/v1 kind: ReplicaSet metadata: name: sample-rs spec: replicas: 3 … client Manifest Register ReplicaSet Object
  107. Flow of ReplicaSet page 0107 kube-apiserver kube-controller- manager Detect ReplicaSet

    Object Observe Diff Act control loop apiVersion: apps/v1 kind: ReplicaSet metadata: name: sample-rs spec: replicas: 3 … etcd
  108. Flow of ReplicaSet page 0108 kube-apiserver kube-controller- manager Register 3

    Pod Object apiVersion: apps/v1 kind: Pod metadata: name: sample-rs-xxxxx … apiVersion: apps/v1 kind: Pod metadata: name: sample-rs-xxxxx … apiVersion: apps/v1 kind: Pod metadata: name: sample-rs-xxxxx … Observe Diff Act control loop apiVersion: apps/v1 kind: ReplicaSet metadata: name: sample-rs spec: replicas: 3 … apiVersion: apps/v1 kind: Pod metadata: name: sample-rs-xxxxx spec: nodeName: “nodeA” … status: phase: “Pending” apiVersion: apps/v1 kind: Pod metadata: name: sample-rs-xxxxx spec: nodeName: “nodeA” … status: phase: “Pending” apiVersion: apps/v1 kind: Pod metadata: name: sample-rs-xxxxx spec: nodeName: “” … status: phase: “Pending” etcd
  109. Flow of ReplicaSet page 0109 kube-apiserver apiVersion: apps/v1 kind: ReplicaSet

    metadata: name: sample-rs spec: replicas: 3 … Detect Pod Object kube-scheduler apiVersion: apps/v1 kind: Pod metadata: name: sample-rs-xxxxx spec: nodeName: “nodeA” … status: phase: “Pending” apiVersion: apps/v1 kind: Pod metadata: name: sample-rs-xxxxx spec: nodeName: “nodeA” … status: phase: “Pending” apiVersion: apps/v1 kind: Pod metadata: name: sample-rs-xxxxx spec: nodeName: “” … status: phase: “Pending” etcd
  110. Flow of ReplicaSet page 0110 kube-apiserver apiVersion: apps/v1 kind: ReplicaSet

    metadata: name: sample-rs spec: replicas: 3 … Scheduling Pod to some Node kube-scheduler apiVersion: apps/v1 kind: Pod metadata: name: sample-rs-xxxxx spec: nodeName: “nodeA” … status: phase: “Pending” apiVersion: apps/v1 kind: Pod metadata: name: sample-rs-xxxxx spec: nodeName: “nodeA” … status: phase: “Pending” apiVersion: apps/v1 kind: Pod metadata: name: sample-rs-xxxxx spec: nodeName: “nodeA” … status: phase: “Pending” etcd
  111. Flow of ReplicaSet page 0111 kube-apiserver apiVersion: apps/v1 kind: ReplicaSet

    metadata: name: sample-rs spec: replicas: 3 … Detect Not running Pod kubelet apiVersion: apps/v1 kind: Pod metadata: name: sample-rs-xxxxx spec: nodeName: “nodeA” … status: phase: “Pending” apiVersion: apps/v1 kind: Pod metadata: name: sample-rs-xxxxx spec: nodeName: “nodeA” … status: phase: “Pending” apiVersion: apps/v1 kind: Pod metadata: name: sample-rs-xxxxx spec: nodeName: “nodeA” … status: phase: “Pending” etcd
  112. Flow of ReplicaSet page 0112 kube-apiserver apiVersion: apps/v1 kind: ReplicaSet

    metadata: name: sample-rs spec: replicas: 3 … kubelet Container Runtime (Docker) Create pod (container) apiVersion: apps/v1 kind: Pod metadata: name: sample-rs-xxxxx spec: nodeName: “nodeA” … status: phase: “Pending” apiVersion: apps/v1 kind: Pod metadata: name: sample-rs-xxxxx spec: nodeName: “nodeA” … status: phase: “Pending” apiVersion: apps/v1 kind: Pod metadata: name: sample-rs-xxxxx spec: nodeName: “nodeA” … status: phase: “Pending” etcd
  113. Flow of ReplicaSet page 0113 kube-apiserver apiVersion: apps/v1 kind: ReplicaSet

    metadata: name: sample-rs spec: replicas: 3 … Update status.phase Pending > Running kubelet Container Runtime (Docker) apiVersion: apps/v1 kind: Pod metadata: name: sample-rs-xxxxx spec: nodeName: “nodeA” … status: phase: “Pending” apiVersion: apps/v1 kind: Pod metadata: name: sample-rs-xxxxx spec: nodeName: “nodeA” … status: phase: “Pending” apiVersion: apps/v1 kind: Pod metadata: name: sample-rs-xxxxx spec: nodeName: “nodeA” … status: phase: “Running” etcd
  114. Agenda page 0114 • Cloud Native and Kubernetes • Container

    and Docker • Microservice and Service Mesh • Kubernetes • Kubernetes & Workloads • Kubernetes & Networking • Kubernetes is Distributed system • Extends Kubernetes • Other topics for Kubernetes
  115. Extends Kubernetes Kubernetes is becoming the framework

  116. XaaS on Kubernetes page 0116 (Ceph) as a Service Rook

    MySQL as a Service Vitess Queue as a Service NATS ML as a Service Kubeflow • NTT SIC  kubeflow/katib   • docker/infrakit
  117. Queue as a Service Developer Kubernetes Register NatsCluster Object NATS

    Operator Detect Object Deploy Queue cluster Change Management Watch objects Kubernetes    Kubernetes  Observe Diff Act control loop
  118. CustomResourceDefinition  Operator page 0118 CustomResourceDefinition '+$ "!! "#* Operator

    " "! )( ! " apiVersion: db.io/v1 kind: MyDB metadata: name: sample-db spec: size: 10G type: mysql version: 5.6 … DB%&)( Observe Diff Act control loop
  119. Service Catalog page 0119 Service Broker Open Service Broker API

    Create Managed Service Instance
  120.  page 0120 Model and Operate Datacenter by Kubernetes at

    eBay - Xiaogang Xin & Tommy Mei, eBay, 2018-11-15, (https://sched.co/FuKD) • Datacenter  Kubernetes  Kubernetes
  121. Agenda page 0121 • Cloud Native and Kubernetes • Container

    and Docker • Microservice and Service Mesh • Kubernetes • Kubernetes & Workloads • Kubernetes & Networking • Kubernetes is Distributed system • Extends Kubernetes • Other topics for Kubernetes
  122. Other topics for Kubernetes Kubernetes is widespread in the world

  123. page 0123 CNCFStandardization 01.     " (!)

    OCI v1.0 02.     #  CRI 03.   #  CSI 04. #  CNI
  124. Serverless Cloud Native Landscape by CNCF page 0124

  125. Conclusion page 0122 Cloud Native Container / Microservice / Service

    Mesh'1Cloud Native 4+2 &( Kubernetes-$0Cloud Native4+   Kubernetes  Google 3# /.4+ )  !*, Platform 5"%
  126. Kubernetes

  127. 3 I H uNs P /D 6 IBK c a

    io sy P   0 C 1 DD 3 I H W3 I HS M 3 I H & 72 uNs C ID 9 CD H uNs 0BH K L 4 uNs / B 8I uNs /D HI uNs 5 I I uNs uNs N snN s h l o y f fl y s N snr N tk ye & hs c N uNsu ghd v o y /2 /0 fl N s 8 KB 5 HA 3 I H dNkyl 3 I H b
  128. Thank you for your attention follow me: @amsy810