Successfully reported this slideshow.
We use your LinkedIn profile and activity data to personalize ads and to show you more relevant ads. You can change your ad preferences anytime.

Introduction of kubernetes rancher

3,178 views

Published on

Rancher Meetup in Kobe #02

Published in: Technology
  • Be the first to comment

Introduction of kubernetes rancher

  1. 1. Introduction of Kubernetes & Rancher Rancher Meetup in Kobe #02 2019.1.11 © 2019 cyberblack28
  2. 2. ! Twitter : cyberblack28 Blog : https://cyberblack28.hatenablog.com/ Job Educational Solution Architect Developer Advocate/Technical Evangelist Infrastructure Engineer Frontend Engineer Hobby1: Music,Live,FES !! Hobby2: Take a picture !! https://www.flickr.com/photos/cyberblack ISBN-10: 4798155373 ISBN-13: 978-4798155371 6 Rancher2.0 2018 3 15 #rancherjp #kujiraya #deepcn
  3. 3. Profile AP Communications Co., Ltd.
  4. 4. Agenda 1. Market trend of Kubernetes 2. Introduction of Kubernetes 3. Introduction of Rancher 4. Information
  5. 5. Market trend of Kubernetes
  6. 6. Market trend of Kubernetes Kubernetes CNCF by Publickey 2018.3.8 Tc Tcb Io p g a m r O F u S F a e l n i t INC h u O Kubernetes
  7. 7. Market trend of Kubernetes AWS Kubernetes Amazon EKS by Publickey 2018.6.7 • Amazon EKS 11 AWS re:Invent 2017 • ( ) ( ) 2018 12 GA
  8. 8. Market trend of Kubernetes Azure Kubernetes Service (AKS) GA – New regions, more features, increased productivity by Microsoft Azure Blog 2018.6.13 • Microsoft Build 2018 Azure Container Service Azure Kubernetes Service • 2 10
  9. 9. Market trend of Kubernetes Kubernetes on Windows Server Docker EE Linux Windows Server DockerCon 2018 by Publickey 2018.6.14 • Docker EE Windows Server Kubernetes
  10. 10. Market trend of Kubernetes VMware Kubernetes VMware Kubernetes Engine VMware Cloud on AWS Azure by Publickey 2018.6.28 • VMware Cloud Kubernetes VMware Kubernetes Engine VKE • Kubernetes SmartCluster • VMware Kubernetes
  11. 11. Market trend of Kubernetes Kubernetes Google Cloud Google Kubernetes Engine on-Prem Google Cloud Next ’18 by Publickey 2018.7.25 • GKE(Google Kubernetes Engine) Kubernetes • Google Cloud Console Kubernetes • Google Cloud Platform Marketplace Kubernetes
  12. 12. Market trend of Kubernetes Google Serverless containers Google Cloud Next ’18 by Publickey 2018.7.25 • Google Kubernetes Engine GKE serverless add-on • Kubernetes Knative GKE serverless add-on
  13. 13. Market trend of Kubernetes GitHub Goes All in on Kubernetes by THENEWSTACK 2017.8.16 SRE Site Reliability Engineering
  14. 14. Market trend of Kubernetes Distribution,PaaS,Managed,Installation/Operations Kubernetes 1 https://qiita.com/cyberblack28/items/e4836b4ff06156f69588 Investigating of Kubernetes Platform
  15. 15. Introduction of Kubernetes
  16. 16. What’s kubernetes ? kubernetes Google Borg OSS k8s kubernetes 8 CNCF(Cloud Native Computing Foundation)
  17. 17. What’s kubernetes ? • • • • • • • • • • • Kubernetes
  18. 18. Kubernetes Architecture Master API UI CLI Node 3 Node 2 Node 1 Kubernetes Master Node • Master • Node Master Node n Image Registry
  19. 19. Kubernetes Architecture API UI CLI API Server Scheduler Controller-Manager etcd Master API Server kubernetes API REST,CRUD, Scheduler Pod Node Controller-Manager Node etcd API Server etcd
  20. 20. Kubernetes Architecture Node Kubelet Node Pod YAML Container Runtime Pod Container Runtime kubelet Kubernetes Docker containerd rkt cri-o Kube-proxy Node Service Cluster IP Proxy iptables Master Kube-proxy Container Runtime Kubelet Node 1,2,3,n Pod Image Registry PodPod Pod PodPod Pod PodPod
  21. 21. Kubernetes Architecture Pod • 1 • Pod IP • Pod Node • Pod Container Volume Pod Container Container Pod 1 IP ※ Container 3
  22. 22. Kubernetes Architecture Pod Node2 Container Pod Container Pod Node Node1 Node1 Container Pod Container localhost IP Container Pod Node2 IP
  23. 23. Kubernetes Architecture Deployment & ReplicaSet Master Deployment Node 1,2,3,n replicas:3 Controllers • ReplicationController D RS Kube proxy Container Runtime Kubelet Pod1 Pod2 Pod3 Controller-Manager D RS Deployment ReplicaSet Deployment ReplicaSet ReplicaSet Pod (replicas) Pod ReplicaSet Pod Image Registry
  24. 24. Kubernetes Architecture Service Client Node Service Pod Pod Pod ClusterIP Pod IP ExternalIP Node IP:Port NodePort Node IP:Port LoadBalancer LB Service L4 endpoint Pod Pod Node Node LoadBalancer Service Pod DNS
  25. 25. Kubernetes Architecture Ingress Ingress HTTP(S) Service Kubernetes Service 4(TCP/UDP over IP) Ingress 7(HTTP(S)) Service Pod Internet Pod Pod Ingress endpoint
  26. 26. Kubernetes Architecture Others PersistentVolumeClaim,PersistentVolume,StrageClass,Namespace,Label,Sel ector,ConfigMap,Secret kubernetes
  27. 27. Introduction of Rancher
  28. 28. What’s Rancher ? • • • Rancher Labs http://rancher.com/ •
  29. 29. Difference between Rancher 1.6 and 2.1 • docker-compose • Network ipsec,vxlan • Storage NFS,EBS • Architecture Docker • Java Go MySQL • • Architecture kubernetes • 100%Go etcd • 100% kubernetes • Helm • Network flannel,canal,Calico kubernetes • Storage kubernetes
  30. 30. Rancher v2.1.0 • 22 12 2 2 1 C • 1 2 1 K Summary • Latest - v2.1.5 - rancher/rancher:latest • Stable - v2.1.5 - rancher/rancher:stable Version
  31. 31. Feature of Rancher2.0 One Click Deployment ! ! Creating Private Catalogs ! !
  32. 32. Rancher2.0 Technical Architecture Cluster Controller Auth Proxy Rancher Server RKE Nodes Kubectl Kubernetes API Rancher UI CLI API Rancher Component Other Kubernetes Master Legend Rancher API Server etcd Cluster Agent 1 Cluster Agent 2 RKE Kubernetes Master GKE Nodes GKE Kubernetes Master Kubelet Kubelet a x v x tiy R d l o b e N H r c b e Re d c Dk AKC e d r b n b I Hus oC Gg eP e dv v S h
  33. 33. Rancher2.0 Deep Dive Documents https://www.slideshare.net/linecorp/lets-unbox-rancher-20-v200
  34. 34. Feature of Rancher2.0 Major developer catalogs
  35. 35. Feature of Rancher2.0 Kubernetes Clusters Create Import Bare Metal Create,Import,Manage Kubernetes Clusters !! Manage
  36. 36. Rancher Labs New Project “Rio” Kubernetes,Istio,Service Mesh Docker Darren Shepherd Co-founder and Chief Architect at Rancher Labs, Inc. @ibuildthecloud https://github.com/rancher/rio https://www.slideshare.net/cyberblackvoom/whats-rio-112779732 Rio !!
  37. 37. Get started with Rancher 2.0 OS Hardware Software Ubuntu 16.04 (64-bit) Memory: 4GB • 1.12.6 • 1.13.1 • 17.03.2Red Hat Enterprise Linux 7.5 (64-bit) RancherOS 1.3.0 (64-bit) Step 1: Prepare a Linux Host Step 2: Start the server $ sudo docker run -d --restart=unless-stopped -p 80:80 -p 443:443 rancher/rancher Web Access!! https://<server_ip>
  38. 38. Kubernetes & Rancher Handson
  39. 39. Kubernetes & Rancher Handson 1. Rancher Server 2. Kubernetes Cluster 3. weavescope 4. RancherUI kubectl 5. Guestbook rancher-server rancher-host Guestbook Guestbook Rancher Server weavescope Agent Server Qiita URL https://goo.gl/PVDe9f
  40. 40. Kubernetes & Rancher Handson 1.Rancher Server 1.Instance 2 rancher-server asia-northeast1 asia-northeast1-b vCPUx1 Ubuntu 16.04 LTS 80GB HTTP HTTPS GCP(Google Cloud Platform) rancher-host asia-northeast1 asia-northeast1-b vCPUx1 Ubuntu 16.04 LTS 80GB HTTP HTTPS 1 2
  41. 41. Kubernetes & Rancher Handson 2.Docker 2 :rancher-server,rancher-host $ curl https://releases.rancher.com/install-docker/17.03.2.sh | sh 3.Rancher2.0 Server (1 :rancher-server ) $ sudo docker run -d --restart=unless-stopped -p 80:80 -p 443:443 rancher/rancher 4. RancherUI rancher-server https://EXTERNAL-IP/ 5.
  42. 42. Kubernetes & Rancher Handson 6.Helm Catalogs Enable Global
  43. 43. Kubernetes & Rancher Handson 1. Add Cluster 2.Kubernetes Cluster
  44. 44. Kubernetes & Rancher Handson 2. CUSTOM Cluster Name Next E C POF , , 2 E C POF SG E C POF G A K N D C D , , , , D C
  45. 45. Kubernetes & Rancher Handson 3. Show advanced options
  46. 46. Kubernetes & Rancher Handson 4. Node Role etcd Control Plane Node Address Public Address Internal Address 2 (rancher-host) IP Copy to Clipboard 2 (rancher-host) - Done 1 2 3 5 4
  47. 47. Kubernetes & Rancher Handson
  48. 48. Kubernetes & Rancher Handson
  49. 49. Kubernetes & Rancher Handson 1. Default Catalog Apps 3.weavescope 2. Launch
  50. 50. Kubernetes & Rancher Handson 3. weave-scope View Details
  51. 51. Kubernetes & Rancher Handson 4. Launch
  52. 52. Kubernetes & Rancher Handson 5. Workloads
  53. 53. Kubernetes & Rancher Handson 6. Load Balancing
  54. 54. Kubernetes & Rancher Handson 7. Add Ingress
  55. 55. Kubernetes & Rancher Handson 9. Name Namespace weave-scope Target weave-scope-frontend-weave-scope Port 4040 Save 1 2 3 4 5
  56. 56. Kubernetes & Rancher Handson 10. URL
  57. 57. Kubernetes & Rancher Handson 11.weavescope
  58. 58. Kubernetes & Rancher Handson 1. Cluster.k8s-cluster 4.RancherUI kubectl RancherUI kubectl 2. Launch kubectl
  59. 59. Kubernetes & Rancher Handson 3.
  60. 60. Kubernetes & Rancher Handson 3. kubectl get nodes > kubectl get nodes NAME STATUS ROLES AGE VERSION rancher-host Ready controlplane,etcd,worker 39m v1.10.5 > kubectl version Client Version: version.Info{Major:"1", Minor:"9", GitVersion:"v1.9.8", GitCommit:"c138b85178156011dc934c2c9f4837476876fb07", GitTreeState:"clean", BuildDate:"2018-05-21T19:01:12Z", GoVersion:"go1.9.3", Compiler:"gc", Platform:"linux/amd64"} Server Version: version.Info{Major:"1", Minor:"10", GitVersion:"v1.10.5", GitCommit:"32ac1c9073b132b8ba18aa830f46b77dcceb0723", GitTreeState:"clean", BuildDate:"2018-06-21T11:34:22Z", GoVersion:"go1.9.3", Compiler:"gc", Platform:"linux/amd64"} 4. kubectl version
  61. 61. Kubernetes & Rancher Handson 5.Guestbook 1 . Guestbook yaml https://raw.githubusercontent.com/kubernetes/examples/master/guestbook/all-in- one/guestbook-all-in-one.yaml 1 . > kubectl apply -f https://raw.githubusercontent.com/kubernetes/examples/master/guestbook/all-in- one/guestbook-all-in-one.yaml service "redis-master" created deployment "redis-master" created service "redis-slave" created deployment "redis-slave" created service "frontend" created deployment "frontend" created
  62. 62. Kubernetes & Rancher Handson . > kubectl get services NAME TYPE CLUSTER-IP EXTERNAL-IP PORT(S) AGE frontend ClusterIP 10.43.52.144 <none> 80/TCP 1m kubernetes ClusterIP 10.43.0.1 <none> 443/TCP 47m redis-master ClusterIP 10.43.31.61 <none> 6379/TCP 1m redis-slave ClusterIP 10.43.55.29 <none> 6379/TCP 1m 3.RancherUI Ingress default Workloads Load Balancing 2 Add Ingress 1 2 3 4
  63. 63. Kubernetes & Rancher Handson 4. Name Target frontend Port 80 Save 1 2 3 4
  64. 64. Kubernetes & Rancher Handson 5. URL
  65. 65. Kubernetes & Rancher Handson 6.Guestbook
  66. 66. Kubernetes & Rancher Handson 7.weavescope Guestbook
  67. 67. Kubernetes & Rancher Handson 1 guestbook-all-in-one.yaml apiVersion: v1 kind: Service metadata: name: redis-master labels: app: redis tier: backend role: master spec: ports: - port: 6379 targetPort: 6379 selector: app: redis tier: backend role: master --- apiVersion: apps/v1 # for k8s versions before 1.9.0 use apps/v1beta2 and before 1.8.0 use extensions/v1beta1 kind: Deployment metadata: name: redis-master spec: selector: matchLabels: app: redis role: master tier: backend replicas: 1 template: metadata: labels: app: redis role: master tier: backend spec: containers: - name: master image: k8s.gcr.io/redis:e2e # or just image: redis resources: requests: cpu: 100m memory: 100Mi ports: - containerPort: 6379 --- redis-master
  68. 68. Kubernetes & Rancher Handson 1 guestbook-all-in-one.yaml apiVersion: v1 kind: Service metadata: name: redis-slave labels: app: redis tier: backend role: slave spec: ports: - port: 6379 selector: app: redis tier: backend role: slave --- apiVersion: apps/v1 # for k8s versions before 1.9.0 use apps/v1beta2 and before 1.8.0 use extensions/v1beta1 kind: Deployment metadata: name: redis-slave spec: selector: matchLabels: app: redis role: slave tier: backend replicas: 2 template: metadata: labels: app: redis role: slave tier: backend spec: containers: - name: slave image: gcr.io/google_samples/gb-redisslave:v1 resources: requests: cpu: 100m memory: 100Mi env: - name: GET_HOSTS_FROM value: dns # If your cluster config does not include a dns service, then to # instead access an environment variable to find the master # service's host, comment out the 'value: dns' line above, and # uncomment the line below: # value: env ports: - containerPort: 6379 --- redis-slave
  69. 69. Kubernetes & Rancher Handson 1 guestbook-all-in-one.yaml apiVersion: v1 kind: Service metadata: name: frontend labels: app: guestbook tier: frontend spec: # if your cluster supports it, uncomment the following to automatically create # an external load-balanced IP for the frontend service. # type: LoadBalancer ports: - port: 80 selector: app: guestbook tier: frontend --- apiVersion: apps/v1 # for k8s versions before 1.9.0 use apps/v1beta2 and before 1.8.0 use extensions/v1beta1 kind: Deployment metadata: name: frontend spec: selector: matchLabels: app: guestbook tier: frontend replicas: 3 template: metadata: labels: app: guestbook tier: frontend spec: containers: - name: php-redis image: gcr.io/google-samples/gb-frontend:v4 resources: requests: cpu: 100m memory: 100Mi env: - name: GET_HOSTS_FROM value: dns # If your cluster config does not include a dns service, then to # instead access environment variables to find service host # info, comment out the 'value: dns' line above, and uncomment the # line below: # value: env ports: - containerPort: 80 redis-frontend
  70. 70. Kubernetes & Rancher Handson 2 Guestbook
  71. 71. Information
  72. 72. Information Docker : ISBN-10: 4844339621 ISBN-13: 978-4844339625 Docker Windows : ISBN-10: 4295000957 ISBN-13: 978-4295000952 Windows
  73. 73. Information c : ISBN-10: 4798153222 ISBN-13: 978-4798153223 L L L Docker D ――Linux c : ISBN-10: 4774176540 ISBN-13: 978-4774176543 LD e LD
  74. 74. Information kubernetes : ISBN-10: 4873118409 ISBN-13: 978-4873118406 Kubernetes Up & Running / D : ISBN-10: 4798155373 ISBN-13: 978-4798155371 Google,RedHat,IBM, ,Rancher
  75. 75. Information The Kubernetes Book : Independently published ISBN-10: 1521823634 ISBN-13: 978-1521823637 kubernetes Kubernetes in Action : Manning Pubns Co ISBN-10: 1617293725 ISBN-13: 978-1617293726
  76. 76. Information Docker/Kubernetes : ISBN-10: 4297100339 ISBN-13: 978-4297100339 Docker/Kubernetes https://cyberblack28.hatenablog.com/
  77. 77. Information Kubernetes : ISBN-10: 4295004804 ISBN-13: 978-4295004806 1 Kubernetes 2 Kubernetes 3 API kubectl 4 Workloads 5 Discovery & LB 6 Config & Storage 7 Cluster Metadata 8 9 10 11 12 13 14 15 16 CI/CD 17 ServiceMesh 18 Kubernetes 19 Kubernetes
  78. 78. Information Kubernetes Azure : ISBN-10: 4798157848 ISBN-13: 978-4798157849
  79. 79. Information Certified Kubernetes Administrator(CKA) ,/,. a C v kp l gh Y uc W ( kp l gh $$YZ W 1 no Ytcba Z rsN kp l gh 1 moei w U o l g 9CC 032EE 9CC FFF 6 4C: : 6 4 ) Certified Kubernetes Application Developer(CKAD)
  80. 80. Information Kubernetes&Docker KD100 https://www.mirantis.co.jp/training/ Kubernetes&Docker KD200 MIRANTIS kubernetes
  81. 81. Information https://www.katacoda.com/ Web Docker,Kubernetes,Istio,Prometheus
  82. 82. Information https://labs.play-with-docker.com/ Play with Docker https://training.play-with-docker.com/ Play with Docker Classroom
  83. 83. Information https://labs.play-with-k8s.com/ Play with Kubernetes https://training.play-with-kubernetes.com/kubernetes-workshop/ Play with Kubernetes Classroom
  84. 84. Information Kubernetes https://thinkit.co.jp/author/13290 cndjp https://speakerdeck.com/hhiroshell
  85. 85. Information http://ur0.work/NQqi
  86. 86. Information 2019.2.2 Docker Workshop in Kobe #01 2019.1.19 Docker Workshop in Osaka #03 2019.1.19 Rancher2.0 Kubernetes Workshop in Osaka #01
  87. 87. ! !

×