$30 off During Our Annual Pro Sale. View Details »

Monitoring of Rancher

Monitoring of Rancher

Rancher Meetup Tokyo #18
#rancherjp

cyberblack28

March 19, 2019
Tweet

More Decks by cyberblack28

Other Decks in Technology

Transcript

  1. Rancher Meetup Tokyo #18
    2019.3.19
    © 2019 cyberblack28
    MONITORING OF
    RANCHER!!

    View Slide

  2. Profile
    Twitter:cyberblack28
    Hatena Blog:https://cyberblack28.hatenablog.com/
    Speaker Deck:https://speakerdeck.com/cyberblack28
    Job
    Educational Solution Architect
    Developer Advocate / Technical Evangelist
    Infrastructure Engineer
    Frontend Engineer
    Community
    Music,Live,FES !! Take a picture !!
    https://www.flickr.com/photos/cyberblack
    ISBN-10: 4798155373
    ISBN-13: 978-4798155371
    I wrote the Chapter 6 Rancher 2.0 part.
    Release on March 15, 2018
    !
    #rancherjp
    #kujiraya
    #deepcn

    View Slide

  3. Profile
    http://bit.ly/thinkit_rancher

    View Slide

  4. AP Communications Co., Ltd
    We’re hireling !!
    Docker Kubernetes Rancher CloudNative

    View Slide

  5. 1. Basic Monitoring
    2. Alerts & Notifiers
    3. Basic Logging
    4. Monitoring & Logging Catalogs
    5. Rancher’s New Multi-Tenant Prometheus Support
    6. Multi-Cluster Apps
    7. Information
    Agenda

    View Slide

  6. BASIC MONITORING

    View Slide

  7. Basic Monitoring
    1.Cluster

    View Slide

  8. Basic Monitoring
    2.Nodes

    View Slide

  9. NOTIFIERS & ALERTS

    View Slide

  10. Notifiers & Alerts
    1.Notifers
    Alert notification destination

    View Slide

  11. VZ
    Notifiers & Alerts
    2.Alerts
    Default Setting (V2.2.0-rc6)
    etcd
    kube components
    event
    node
    a.Cluster Alert Default

    View Slide

  12. VZ
    Notifiers & Alerts
    Default Setting (V2.2.0-rc6)
    Workload
    Memory ※You need to enable Promethus features.
    b.Project Alert Default

    View Slide

  13. VZ
    Alert Rule Name
    Name Setting
    Alert
    Choose a Notifier
    Expression
    Select Metric
    Node Selector
    Node Select Setting
    Node
    Node Name Select
    Notifiers & Alerts
    3.Alert Setting
    Normal or Warning
    • DaemonSet
    • Deployment
    • Node
    • Pod
    • StatefulSet
    System Service
    • scheduller
    • etcd
    • controll-manager
    Alert Group Name
    Name Setting
    New by Prometheus

    View Slide

  14. BASIC LOGGING

    View Slide

  15. VZ
    Basic Logging
    Logging linkage

    View Slide

  16. MONITORING & LOGGING
    CATALOGS

    View Slide

  17. VZ
    Monitoring & Logging Catalogs

    View Slide

  18. RANCHER’S NEW MULTI-
    TENANT PROMETHEUS
    SUPPORT

    View Slide

  19. Rancher’s New Multi-Tenant Prometheus Support
    So far, deploy Prometheus and Grafana from the catalog function.
    Deploy from Catalog function

    View Slide

  20. Rancher’s New Multi-Tenant Prometheus Support
    http://ur0.link/PjFf
    Rancher Official Blog

    View Slide

  21. Rancher’s New Multi-Tenant Prometheus Support
    Rancher 2.2 simplifies and cuts this process down to just 2 steps

    View Slide

  22. Rancher’s New Multi-Tenant Prometheus Support
    Rancher Official Blog
    http://ur0.link/PjHe

    View Slide

  23. Rancher’s New Multi-Tenant Prometheus Support
    http://ur0.link/PjJn
    • December 2018 Online Meetup Introducing
    Rancher's New Multi Tenant Prometheus
    Support
    Webinar
    • Rancher v2.2.0-Alpha3 Multi-Tenant Prometheus Support
    Docs
    http://ur0.link/PjK6

    View Slide

  24. 1.Construct Rancher Server
    Rancher’s New Multi-Tenant Prometheus Support
    3.Create Kubernetes Cluster
    4.Prometheus Set up
    2.Create Node Instance

    View Slide

  25. 1.Construct Rancher Server
    1.Instance Prepare
    2.Docker Install
    $ curl https://releases.rancher.com/install-docker/18.09.sh | sh
    3.Rancher v2.2.0-Alpha6 Server Install
    $ sudo docker run -d --restart=unless-stopped -p 80:80 -p 443:443 rancher/rancher:v2.2.0-rc6
    Rancher’s New Multi-Tenant Prometheus Support
    Item Input Summary
    Name rancher-server
    Region asia-northeast1Tokyo
    Zone asia-northeast1-b
    MachineType vCPUx1
    BootDisk
    Ubuntu 16.04 LTS
    DiskSize 80GB
    Firewall Allow HTTP trafic,Allow HTTPS trafic

    View Slide

  26. 4. Launch your browser to access RancherUI
    https://EXTERNAL-IP/
    5. Initial login
    Rancher’s New Multi-Tenant Prometheus Support

    View Slide

  27. Rancher’s New Multi-Tenant Prometheus Support
    6.Activate the Helm Catalog
    Select upper menu “Tools”-”Catalogs” Change to “Enable”
    Select “Global”

    View Slide

  28. 2.Create Node Instance
    Rancher’s New Multi-Tenant Prometheus Support
    2.Install Docker on rancher-host
    $ curl https://releases.rancher.com/install-docker/18.09.sh | sh
    1.Instance Prepare
    Item Input Summary
    Name rancher-host
    Region asia-northeast1Tokyo
    Zone asia-northeast1-b
    MachineType vCPUx1
    BootDisk
    Ubuntu 16.04 LTS
    DiskSize 80GB
    Firewall Allow HTTP traffic,Allow HTTPS traffic

    View Slide

  29. 1.Press "Add Cluster" button
    Rancher’s New Multi-Tenant Prometheus Support
    3.Create Kubernetes Cluster

    View Slide

  30. Rancher’s New Multi-Tenant Prometheus Support
    2.Select “Custom”, enter an arbitrary name for “Cluster Name”, and press the “Next” button
    1
    2
    Select when linking with
    GKE, EKS, AKS
    Select when linking with
    Cloud Provider such as
    EC2, Azure,
    DigitalOcean, vSpher,
    etc.
    Select when linking with an
    existing Kubernetes Cluster

    View Slide

  31. Rancher’s New Multi-Tenant Prometheus Support
    3
    You can choose the version of Kubernetes.
    , . , ,

    View Slide

  32. Rancher’s New Multi-Tenant Prometheus Support
    3.Click “Show advanced options”

    View Slide

  33. Rancher’s New Multi-Tenant Prometheus Support
    4. Check “etcd” and “Control Plane” of “Node Role”, enter the IP address of the second (rancher-host) in “Public
    Address” and “Internal Address” of “Node Address”, “Copy to Clipboard” Press the button and execute the command
    on the second (rancher-host) console and then press the “Done” button
    1
    2

    View Slide

  34. Rancher’s New Multi-Tenant Prometheus Support
    3
    5
    4



    View Slide

  35. Rancher’s New Multi-Tenant Prometheus Support
    5.rancher-k8s-cluster

    View Slide

  36. Rancher’s New Multi-Tenant Prometheus Support
    6.

    View Slide

  37. Rancher’s New Multi-Tenant Prometheus Support
    1.Select upper menu “Tools” - ”Monitoring”
    4.Prometheus Set up

    View Slide

  38. Rancher’s New Multi-Tenant Prometheus Support
    2.Select “Enabled” and press “Save” button
    1
    2

    View Slide

  39. Rancher’s New Multi-Tenant Prometheus Support
    3.Upper menu “rancher-k8s-cluster“ – “Global“ Select

    View Slide

  40. Rancher’s New Multi-Tenant Prometheus Support
    4.Select cluster name

    View Slide

  41. Rancher’s New Multi-Tenant Prometheus Support
    5.Confirm that the Grafana button has been added

    View Slide

  42. Rancher’s New Multi-Tenant Prometheus Support
    6.Expand accordion menu
    .
    . .

    View Slide

  43. Rancher’s New Multi-Tenant Prometheus Support
    7.Click on the Grafana icon to see in the Grafana dashboard

    View Slide

  44. Rancher’s New Multi-Tenant Prometheus Support
    Nodes Cluster
    6.Press "Launch kubectl" button

    View Slide

  45. Rancher’s New Multi-Tenant Prometheus Support
    Console lauch

    View Slide

  46. Rancher’s New Multi-Tenant Prometheus Support
    8.Execute "kubectl get pods --all-namespaces" to check the status
    # Run kubectl commands inside here
    # e.g. kubectl get all
    > kubectl get pods --all-namespaces
    NAMESPACE NAME READY STATUS RESTARTS AGE
    cattle-prometheus exporter-kube-state-cluster-monitoring-58f946d4d7-j9ql4 1/1 Running 0 14m
    cattle-prometheus exporter-node-cluster-monitoring-96wg8 1/1 Running 0 14m
    cattle-prometheus grafana-cluster-monitoring-65d7cfccd8-xzhxf 2/2 Running 0 14m
    cattle-prometheus prometheus-cluster-monitoring-0 5/5 Running 1 14m
    cattle-prometheus prometheus-operator-monitoring-operator-579985494b-52zhh 1/1 Running 0 14m
    cattle-system cattle-cluster-agent-65566c9cd4-7dhdx 1/1 Running 0 26m
    cattle-system cattle-node-agent-vst9b 1/1 Running 0 26m
    cattle-system kube-api-auth-8qbs9 1/1 Running 0 26m
    ingress-nginx default-http-backend-78fccfc5d9-ffkjm 1/1 Running 0 26m
    ingress-nginx nginx-ingress-controller-4hlvm 1/1 Running 0 26m
    kube-system canal-q7cvr 2/2 Running 0 26m
    kube-system kube-dns-58bd5b8dd7-22dvk 3/3 Running 0 26m
    kube-system kube-dns-autoscaler-77bc5fd84-lb75t 1/1 Running 0 26m
    kube-system metrics-server-58bd5dd8d7-5mmlx 1/1 Running 0 26m
    kube-system rke-ingress-controller-deploy-job-r6xbk 0/1 Completed 0 26m
    kube-system rke-kube-dns-addon-deploy-job-82db5 0/1 Completed 0 26m
    kube-system rke-metrics-addon-deploy-job-9gclh 0/1 Completed 0 26m
    kube-system rke-network-plugin-deploy-job-2hltf 0/1 Completed 0 26m
    >

    View Slide

  47. MULTI-CLUSTER APPS

    View Slide

  48. Multi-Cluster Apps
    Deploy and deploy apps to multiple Kubernetes
    clusters, and launch "Rancher 2.2" with new features
    such as rolling updates by Publickey 2019.2.15
    https://rancher.com/blog/
    https://www.publickey1.jp/blog/19/kubernetesrancher_22.html

    View Slide

  49. Multi-Cluster Apps
    http://urx3.nu/RYwU
    • February 2019 Online Meetup: Multi Cluster
    Applications, Global DNS, and Multi Tenant
    Catalogs
    Webinar
    • Rancher 2.2 Tech Preview Multi-Cluster App
    Docs
    http://urx3.nu/UYcM

    View Slide

  50. Multi-Cluster Apps
    New to Rancher 2.2 is the ability to deploy applications from the catalog in bulk to Multi Kubernetes Cluster.

    View Slide

  51. In conjunction with Rancher, run Multi-Cluster Apps from the place where I built a cluster on AKS, EKS, GKE.
    Multi-Cluster Apps

    View Slide

  52. 1.Select the upper menu “Multi-Cluster Apps” and press the “Launch” button.
    Multi-Cluster Apps

    View Slide

  53. 2.Enter “word” in the search field and press the “View Details” button on “wordpress”
    Multi-Cluster Apps

    View Slide

  54. 3.Set 1 to 3
    " , ,
    " , 2 - 3.
    " . 1, 1 , -
    . - . ,
    2 - .
    By selecting the
    namespace for the
    kubernetes cluster to
    deploy
    You can deploy to multi-
    kubernetes cluster.
    Multi-Cluster Apps

    View Slide

  55. 4.Set 4.1 to 4 and press the “Launch” button
    .3 1 . 224 1
    3 2
    .3 1 . 224 1
    3 . 1
    Multi-Cluster Apps

    View Slide

  56. 5.Completed wordpress deployment on aks-kubernetes-cluster, eks-kubernetes-cluster, gke-kubernetes-
    cluster
    Multi-Cluster Apps

    View Slide

  57. 6. Access WordPress by clicking 443/tcp, 80/tcp in Service of AKS, EKS, GKE
    Multi-Cluster Apps

    View Slide

  58. 7.https or http://ExternalIP/wp-login.php (Username:user Password:your set password)
    Multi-Cluster Apps

    View Slide

  59. INFORMATION

    View Slide

  60. Information
    Cloud Native Tokyo #01
    2019/4/10 (wed) 18:3022:00
    NTT Software Innovation Center
    34F Granpark Tower, 3-4-1 Shibaura, Minato, TokyoS
    Container Orchestration Platform OpenShift & Rancher Feature

    View Slide

  61. Docker / Kubernetes / Rancher One Day Training
    2019.4.15 https://eventregist.com/e/cndf2019training
    #rancherjp
    Coupon Code
    rancherjp1000
    #kujiraya
    Coupon Code
    kujiraya1000
    CloudNative Days 2019
    CloudNative Days Tokyo 2019
    OpenStack Days Tokyo 2019
    Toranomon Hills Forum, July 22-23, 2019
    CloudNative Days Kansai 2019
    2019.4.16 https://eventregist.com/e/cndf2019
    We will carry out popular training in JapanContainerDays as well, and we
    will carry out the “limited training to learn Docker / Kubernetes / Rancher
    from the foundation in one day”.
    Let's get training and attend the conference!

    View Slide

  62. ONE MORE THING…

    View Slide

  63. Lightweight
    Kubernetes
    Easy to install.
    A binary of less than 40 MB.
    Only 512 MB of RAM required to run.
    Cross-Cluster
    Network
    Connectivity
    for Kubernetes

    View Slide

  64. Rancher v2.2.0-rc3 or later
    Support k3s cluster import !!

    View Slide

  65. Information
    #01 2019/3/26 (tue) 18:3021:00
    4-23-1 Ebisu, Shibuya-ku, Tokyo
    #02 2019/4/11 (thu) 18:3021:00

    View Slide

  66. ! !

    View Slide