GithubHelp home page GithubHelp logo

frankyang0529 / support-bundle-kit Goto Github PK

View Code? Open in Web Editor NEW

This project forked from rancher/support-bundle-kit

0.0 2.0 0.0 44.17 MB

A toolkit to generate and analyze the support bundles for Kubernetes and Kubernetes-native applications

License: Apache License 2.0

Makefile 0.16% Shell 4.61% Go 94.69% Dockerfile 0.55%

support-bundle-kit's Introduction

Support Bundle Kit Build Status

working in progress

This project contains support bundle scripts and utilities for applications running on top of Kubernetes

  • harvester-sb-collector.sh: The script is used to collect k3os node logs. It can be run in a container with the host log folder mapped or be run on the host directly.
  • support-bundle-utils: This application contains several commands:
    • manager: start a support bundle kit manager. The manager does these works:

      • It collects the cluster bundle, including YAML manifests and pod logs.
      • It collects external bundles. e.g., Longhorn support bundle.
      • It starts a web server and waits for bundle downloading and uploading.
      • It starts a daemonset on each node. The agents in the daemonset collect node bundles and push them back to the manager.

      The manager is designed to be spawned as a Kubernetes deployment by the application. But it can also be deployed manually from a manifest file. Please check standalone mode for more information.

    • simulator: the command allows users to simulate an end user environment by loading the support bundle into a minimal apiserver allowing end users to browse the objects and logs from the support bundle. It will do the following things

      • It runs an embedded etcd server
      • It runs a minimal apiserver only
      • It runs a minimal kubelet

Support bundle contents

The Harvester support bundle is structured as the following layout:

- [logs]            # pod logs, organized by namespaces
  - [namespace1]
    - [pod1]
     - container1.log
    - [pod2]
  - [namespace2]
    - [pod1]

- [yamls]           # definition of resources
  - [cluster]        # cluster scope
    - [kubernetes]    # Kubernetes resources
      - nodes.yaml
      - volumeattachments.yaml
      - nodemetrics.yaml
    - [harvester]     # Harvester custom resources
      - settings.yaml
      - users.yaml
  - [namespaced]     # namespaced scope
    - [default]       # namespace `default`
      - [kubernetes]   # Kubernetes resources
        - pods.yaml
        - jobs.yaml
        - ...
      - [harvester]    # Harvester custom resources
        - keypairs.yaml
        - virtualmachineimages.yaml
        - ...
      - [cdi]          # cdi.kubevirt.io custom resources
        - datavolumes.yaml
      - [kubevirt]     # kubevirt.io custom resources
        - virtualmachines.yaml
        - virtualmachineinstancemigrations.yaml
        - ...
    - [harvester-system]
        - ...
    - [kube-system]
        - ...
    - [cattle-system]
        - ...

- [external]        # External support bundles
  - longhorn-support-bundle_d2f32c7f-6605-4a3b-8571-521856e64233_2021-05-05T03-28-37Z.zip

- [nodes1]          # Node support bundles
  - node1.zip
  - node2.zip
  - ...

Simulator command

The simulator command loads the contents of the support bundle into the apiserver, and updates the status of objects to reflect the contents of the support bundle.

The bundle-path should be the location of the extracted support bundle

The simulator command expects the following flags

Usage:
  support-bundle-kit simulator [flags]

Flags:
      --bundle-path string   location to support bundle. default is . (default ".")
  -h, --help                 help for simulator
      --reset                reset sim-home, will clear the contents and start a clean etcd + apiserver instance
      --sim-home string      default home directory where sim stores its configuration. default is $HOME/.sim (default "$HOME/.sim")
      --skip-load            skip load / re-load of bundle. this will ensure current etcd contents are only accessible

Known Issues: The following are known issues with the simulator at the moment:

  • creationTimepstamps of objects are reset, however the original creationTimestamp is copied into the object annoations.
  • to enable log parsing the node addresses are updated to localhost, to point them to the in process kubelet. The original addresses are again copied into annotations for future reference.
  • APIServices are skipped during the load processes as api aggregation cannot be replicated at the moment.

Additional information can be found in the QuickStart Guide

support-bundle-kit's People

Contributors

bk201 avatar c3y1huang avatar frankyang0529 avatar guangbochen avatar ibrokethecloud avatar joshimoo avatar keithalucas avatar mantissahz avatar shangma avatar vicente-cheng avatar w13915984028 avatar weihanglo avatar weizhe0422 avatar yangchiu avatar yasker avatar yu-jack avatar

Watchers

 avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.