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

Multi-Cluster Management with Rancher

Multi-Cluster Management with Rancher

Slides for in-house study meeting.

Kyohei Mizumoto

April 24, 2019
Tweet

More Decks by Kyohei Mizumoto

Other Decks in Technology

Transcript

  1. 2019/4/25 Multi-Cluster Management with Rancher 127.0.0.1:5500/#54 3/54 Target People who:

    haven't used Rancher are interested in multi-cluster management
  2. 2019/4/25 Multi-Cluster Management with Rancher 127.0.0.1:5500/#54 5/54 Agenda What is

    Rancher? Get Started Manage Clusters Add Clusters Deploy WordPress from Catalog
  3. 2019/4/25 Multi-Cluster Management with Rancher 127.0.0.1:5500/#54 7/54 Container packaging and

    runtime standard Build container images from Dockerfiles(IaC) Distribute container images from Docker registries Docker
  4. 2019/4/25 Multi-Cluster Management with Rancher 127.0.0.1:5500/#54 8/54 Container orchestration standard

    Manage resources as manifest files(IaC) OSS which CNCF hosts (Graduated) Kubernetes
  5. 2019/4/25 Multi-Cluster Management with Rancher 127.0.0.1:5500/#54 9/54 Container management platform

    Open source software Deliver Kubernetes as a Service(KaaS) Paid support Rancher
  6. 2019/4/25 Multi-Cluster Management with Rancher 127.0.0.1:5500/#54 10/54 Features GUI based

    management Add clusters Deploy resources using catalogs Easy to start No need to have in-depth knowledge of Kubernetes
  7. 2019/4/25 Multi-Cluster Management with Rancher 127.0.0.1:5500/#54 11/54 Run Kubernetes Everywhere

    Create Kubernetes clusters with: Rancher Kubernetes Engine (RKE) Cloud Kubernetes services(e.g. GKE, AKS, EKS) Import & manage existing Kubernetes clusters
  8. 2019/4/25 Multi-Cluster Management with Rancher 127.0.0.1:5500/#54 12/54 Empower DevOps Teams

    Each team deploys their applications on the public/ private clouds they choose
  9. 2019/4/25 Multi-Cluster Management with Rancher 127.0.0.1:5500/#54 15/54 Installation Single Node

    Install Install by running a single Docker container For development and testing environments High Availability (HA) Install Install in a Kubernetes cluster For production environments
  10. 2019/4/25 Multi-Cluster Management with Rancher 127.0.0.1:5500/#54 16/54 Installation Single Node

    Install Install by running a single Docker container For development and testing environments High Availability (HA) Install Install in a Kubernetes cluster For production environments
  11. 2019/4/25 Multi-Cluster Management with Rancher 127.0.0.1:5500/#54 18/54 Install ssh to

    the VM Install Docker with the following command: $ curl https://releases.rancher.com/install-docker/18.09.sh | sh Install Rancher with the following command: $ sudo docker run -d --restart=unless-stopped -p 80:80 \ -p 443:443 rancher/rancher:v2.2.2
  12. 2019/4/25 Multi-Cluster Management with Rancher 127.0.0.1:5500/#54 25/54 Advance Preparation Create

    an another VM for node on Azure name: rancher-node image: Ubuntu Server 18.04 LTS OS-disk-type: Standard SSD auto-shutdown: off Add inbound port rules 22, 443
  13. 2019/4/25 Multi-Cluster Management with Rancher 127.0.0.1:5500/#54 28/54 Create a Cluster

    Run the copied command on VM $ sudo docker run -d --privileged --restart=unless-stopped --net=host \ -v /etc/kubernetes:/etc/kubernetes -v /var/run:/var/run rancher/rancher-agent:v2.2.2 \ --server https://xx.xx.xxx.xx --token 666ltr6qntjz2xxxxxxxxxxxxxxxxxxxxxxxxxxxxxx \ --ca-checksum f707d53266d14e03ff3452896dxxxxxxxxxxxxxxxxxxxxxxxxxxx --address xx.xx.xxx.xx \ --internal-address 10.x.x.x --etcd --controlplane --worker
  14. 2019/4/25 Multi-Cluster Management with Rancher 127.0.0.1:5500/#54 33/54 Advance Preparation(on Azure)

    Create a new resource group for AKS rancher-aks-sample Create a service principal $ az ad sp create-for-rbac --skip-assignment -n sp-aks-sample appId: 03f94503-xxxx-xxxx-xxxx-xxxxxxxxxxxx displayName: sp-aks-sample name: http://sp-aks-sample password: xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx tenant: 2bdec7af-xxxx-xxxx-xxxx-xxxxxxxxxxxx $ az role assignment create --assignee 03f94503-xxxx-xxxx-xxxx-xxxxxxxxxxxx \ --role Contributor --resource-group rancher-aks-sample
  15. 2019/4/25 Multi-Cluster Management with Rancher 127.0.0.1:5500/#54 34/54 Advance Preparation(on Azure)

    Register resource providers $ az provider register -n Microsoft.OperationalInsights $ az provider register -n Microsoft.OperationsManagement https://docs.microsoft.com/en-us/azure/azure-resource- manager/resource-manager-register-provider-errors
  16. 2019/4/25 Multi-Cluster Management with Rancher 127.0.0.1:5500/#54 45/54 Launch Endpoint is

    created http://xip.io-wordpress.wordpress.00.000.000.000.xip.io
  17. 2019/4/25 Multi-Cluster Management with Rancher 127.0.0.1:5500/#54 49/54 Need to deploy

    LB on Azure Deploy nginx-ingress with helm(by default) Deploy wordpress-ingress.yaml apiVersion: extensions/v1beta1 kind: Ingress metadata: name: wordpress-ingress annotations: kubernetes.io/ingress.class: nginx nginx.ingress.kubernetes.io/ssl-redirect: "false" nginx.ingress.kubernetes.io/rewrite-target: / spec: rules: - http: paths: - path: / backend: serviceName: wordpress-wordpress servicePort: 80
  18. 2019/4/25 Multi-Cluster Management with Rancher 127.0.0.1:5500/#54 51/54 What I Felt

    Good for cluster management Can deploy many applications on GUI Can start monitoring & logging on GUI Not a few things we have to know But useful to manage multi-clusters on different platforms
  19. 2019/4/25 Multi-Cluster Management with Rancher 127.0.0.1:5500/#54 53/54 Links マルチクラウド時代の最強コンビ RancherによるKubernetes

    活⽤ガイド https://thinkit.co.jp/series/8740 Official - Rancher 2.x https://rancher.com/docs/rancher/v2.x/en/
  20. 2019/4/25 Multi-Cluster Management with Rancher 127.0.0.1:5500/#54 54/54 Actually, everything is

    here... Azure with Rancher !! https://speakerdeck.com/cyberblack28/azure-with-rancher