Moshe Immerman
    • Create new note
    • Create a note from template
      • Sharing URL Link copied
      • /edit
      • View mode
        • Edit mode
        • View mode
        • Book mode
        • Slide mode
        Edit mode View mode Book mode Slide mode
      • Customize slides
      • Note Permission
      • Read
        • Only me
        • Signed-in users
        • Everyone
        Only me Signed-in users Everyone
      • Write
        • Only me
        • Signed-in users
        • Everyone
        Only me Signed-in users Everyone
      • Engagement control Commenting, Suggest edit, Emoji Reply
    • Invite by email
      Invitee

      This note has no invitees

    • Publish Note

      Share your work with the world Congratulations! 🎉 Your note is out in the world Publish Note

      Your note will be visible on your profile and discoverable by anyone.
      Your note is now live.
      This note is visible on your profile and discoverable online.
      Everyone on the web can find and read all notes of this public team.
      See published notes
      Unpublish note
      Please check the box to agree to the Community Guidelines.
      View profile
    • Commenting
      Permission
      Disabled Forbidden Owners Signed-in users Everyone
    • Enable
    • Permission
      • Forbidden
      • Owners
      • Signed-in users
      • Everyone
    • Suggest edit
      Permission
      Disabled Forbidden Owners Signed-in users Everyone
    • Enable
    • Permission
      • Forbidden
      • Owners
      • Signed-in users
    • Emoji Reply
    • Enable
    • Versions and GitHub Sync
    • Note settings
    • Note Insights New
    • Engagement control
    • Make a copy
    • Transfer ownership
    • Delete this note
    • Save as template
    • Insert from template
    • Import from
      • Dropbox
      • Google Drive
      • Gist
      • Clipboard
    • Export to
      • Dropbox
      • Google Drive
      • Gist
    • Download
      • Markdown
      • HTML
      • Raw HTML
Menu Note settings Note Insights Versions and GitHub Sync Sharing URL Create Help
Create Create new note Create a note from template
Menu
Options
Engagement control Make a copy Transfer ownership Delete this note
Import from
Dropbox Google Drive Gist Clipboard
Export to
Dropbox Google Drive Gist
Download
Markdown HTML Raw HTML
Back
Sharing URL Link copied
/edit
View mode
  • Edit mode
  • View mode
  • Book mode
  • Slide mode
Edit mode View mode Book mode Slide mode
Customize slides
Note Permission
Read
Only me
  • Only me
  • Signed-in users
  • Everyone
Only me Signed-in users Everyone
Write
Only me
  • Only me
  • Signed-in users
  • Everyone
Only me Signed-in users Everyone
Engagement control Commenting, Suggest edit, Emoji Reply
  • Invite by email
    Invitee

    This note has no invitees

  • Publish Note

    Share your work with the world Congratulations! 🎉 Your note is out in the world Publish Note

    Your note will be visible on your profile and discoverable by anyone.
    Your note is now live.
    This note is visible on your profile and discoverable online.
    Everyone on the web can find and read all notes of this public team.
    See published notes
    Unpublish note
    Please check the box to agree to the Community Guidelines.
    View profile
    Engagement control
    Commenting
    Permission
    Disabled Forbidden Owners Signed-in users Everyone
    Enable
    Permission
    • Forbidden
    • Owners
    • Signed-in users
    • Everyone
    Suggest edit
    Permission
    Disabled Forbidden Owners Signed-in users Everyone
    Enable
    Permission
    • Forbidden
    • Owners
    • Signed-in users
    Emoji Reply
    Enable
    Import from Dropbox Google Drive Gist Clipboard
       Owned this note    Owned this note      
    Published Linked with GitHub
    • Any changes
      Be notified of any changes
    • Mention me
      Be notified of mention me
    • Unsubscribe
    ## Incident Roles | | | | ------------------------------ | ---------------------------------------- | | :worker: Incident Responder(s) | The person who has the hands-on keyboard | | :captain: Incident Commander | Communicating with stakeholders | | :talk: Incident Communicator | Overseeing the incident | The steps below are applicable for Sev 1 & 2 incidents – see the [Escalations](#Escalations) section for more detailed steps. <span style="font-size: 28px; color: grey">:1:</span> The first responder automatically becomes the incident commander until it is transferred: <br/> !!! warning You are still the :captain: commander until someone else says :speak: *I have command* <span style="font-size: 28px; color: grey; ">:2:</span> The incident commander is also automatically the incident communicator until it is transferred: !!! warning You are still :talk: communicator until someone else says :speak: *I have comms* <span style="font-size: 28px; color: grey">:3:</span> Setup a communications channel on %%{support.channel}%% <span style="font-size: 28px; color: grey">:4:</span> Communicate a new incident and channel details to %%{support.email}%% ## Severity Classification <table> <tr> <td> </td> <td>Sev 1 </td> <td>Sev 2 </td> <td>Sev 3 </td> </tr> <tr> <td>Kubernetes </td> <td>Cannot schedule pods </td> <td> </td> <td>Other performance issues </td> </tr> <tr> <td>Harbor </td> <td>Cannot Pull Images </td> <td>Cannot Push Images </td> <td>Performance issues / Cannot use UI </td> </tr> <tr> <td>Postgres </td> <td> </td> <td> </td> <td>No replicas / HA lost </td> </tr> <tr> <td>Vault </td> <td> </td> <td> </td> <td> </td> </tr> <tr> <td>Elasticsearch </td> <td> </td> <td> </td> <td> </td> </tr> </table> ## Escalations After receiving a new alert or ticket, spend a few minutes (&lt; 5m) doing a preliminary investigation to identify the reproducibility and impact of the incident. Once confirmed as an issue being the formal incident response process: ## Hypothesis development :1: Start with checking general cluster health :2: Check recent changes that may have had an impact :3: Check recent trends in consumption metrics: * has a threshold been reached? A threshold can be both fixed (e.g. memory) and cumulative (disk space) :4: Check performance metrics * Are metrics within bounds? * Are any metrics abnormal :5: ## Hypothesis Testing ## Mitigation See [Generic mitigations](https://www.oreilly.com/content/generic-mitigations/) ### :kubernetes: Kubernetes ### :heart: Health Checks * :bash: `karina status` (lists control-plane / etcd versions / leaders / orphans ) * :bash: `karina status pods` * :octicons-graph-16: control-plane logs [TODO - elastic query] * :octicons-graph-16: karma, canary alerts * :bash: [kubectl-popeye](https://github.com/derailed/popeye) | | | | ----------------------------- | ------------------------------------------------------------ | | Deployments | See [Troubleshooting Deployments](https://learnk8s.io/troubleshooting-deployments) <br>:bash: <a href="https://github.com/aylei/kubectl-debug">kubectl-debug</a> | | No Scheduling | :worker: Manual schedule by specifying node name in spec | | Network Connectivity | See <a href="https://itnext.io/an-illustrated-guide-to-kubernetes-networking-part-1-d1ede3322727">Guide to K8S Networking</a> and :material-video: <a href="https://sookocheff.com/post/kubernetes/understanding-kubernetes-networking-model/">Networking Model</a> <a href="https://www.youtube.com/watch?v=RQNy1PHd5_A">Packet-level Debugging</a> <br>:bash: <a href="https://github.com/eldadru/ksniff">kubectl-sniff</a> - tcpdump specific pods<br/>:bash: <a href="https://soluble-ai.github.io/kubetap/">kubectl-tap</a> - expose services locally<br/>:bash: <a href="https://github.com/mehrdadrad/tcpprobe">tcpprobe</a> - measure 60+ metrics for socket connections <br/>:octicons-graph-16: check node to node connectivity using :material-docker: <a href="https://github.com/bloomberg/goldpinger">goldpinger</a> : <br/>:action: Restart CNI controllers / agents <br> | | End User Access Denied | :action: Temporarily increase access level<br />Check access using :bash: <a href="https://github.com/corneliusweig/rakkess">rbac-matrix</a> | | Disk / Volume Space | :action: Check PV usage using :bash: <a href="https://github.com/yashbhutwala/kubectl-df-pv">kubectl-df-pv</a><br/>:worker: Remove old filebeat/journal logs <br>:worker: Scale down replicated storage <br>:worker: Reduce replicas from 3 → 2 → 1 | | DNS Latency | :octicons-graph-16: Check DNS request/failure count on grafana<br /> :octicons-graph-16: Check pod ndots configuration and reduce if possible<br />:octicons-graph-16: Check node-local cache hit rates<br /> :worker: Scale coredns replicas and/or increase cpu limits on coredns and node-local-dns | | Failing Webhooks | :worker: Temporarily disable the webhooks by either deleting them or setting the **FailurePolicy** to *ignore* | | Loss of Control Plane Access | :worker: Try gain access to master nodes and regen certs using `/etc/kubernetes/pki` <br />:worker: Downscale cluster to 1 master, and regen certs using kubeadm, scale masters back up <br /> | | Failure during rolling update | Run :bash: `karina terminate-node` followed by `karina provision` | | Worker Node failure | Run :bash: `kubectl terminate-node` followed by `karina provision` | | Control Plane Node Failure | :action: Run :bash: `kubectl terminate-node` followed by `karina provision`<br />:worker: Remove any failed etcd members using :bash: `karina etcd remove-member` | | Namespace Overutilization | | | Load Balancer Failure | | | Cluster Failure | :action: Cordon the cluster by removing GSLB entries<br />:action: Without PVCs Run :bash: `kubectl terminate` followed by `karina provision` to reprovision the cluster <br />:action: With PVCs: Try take a backup first (`karina backup or velero backup`), provision a new cluster with a new name, restore from backup `karina restore or velero restore` | | Cluster over-utilized | :action: Increase capacity if possible (even temporarily)<br />:action: Shed load starting with <br />* moving workloads to other clusters <br />* reducing replica counts <br />* terminating non critical workloads (dynamic namespaces, etc) | | Node Performance | :octicons-graph-16: Check container top using :bash: `crictl stats` and `crictl ps<br /`<br />:octicons-graph-16: Check VM host CPU/Memory/IO staturation<br />See <a href="https://publib.boulder.ibm.com/httpserv/cookbook/">Performance Cookbook</a> and <a href="http://www.brendangregg.com/USEmethod/use-linux.html">USE</a> | | Unable to SSH | Try :bash: <a href="https://github.com/kvaps/kubectl-node-shell">kubectl-node-shell</a> | ### :etcd: Etcd | | | | ---------------- | ------------------------------------------------------------ | | Slow Performance | :octicons-graph-16: Check disk I/O <br>:worker: Reduce size of etcd cluster | | Loss of Quorum | See <a href="https://etcd.io/docs/v3.4.0/op-guide/recovery/">Disaster recovery</a> | | Key Exposure | | | DB Size Exceeded | :action: Run etcd compaction and/or reduce version history retention | | | | | | | ### :postgres: Postgresql | | | | --------------- | ------------------------------------------------------------ | | Slow Performace | | | Data Loss | Recover from backup | | Key Exposure | | | Failover | :bash: run `patronctl failover`<br />Delete config endpoint if failover is stuck without any master | ### :vault: Vault / :consul: Consul | | | | --------------- | ------------------- | | Slow Performace | | | Data Loss | Recover from backup | | Key Exposure | | | Failover | | ### :harbor: Harbor | | | | --------------- | ------------------------------------------------------------ | | Inaccessible | :worker: compare accessibilty via UI / API / docker login<br /> :worker: Reset CSRF_TOKEN in harbor-core configmap<br /> :worker: Reset admin password in `harbor_users` postgres table | | Slow Performace | :octicons-graph-16: Check performance of underlying registry storage (S3 / Disk etc)<br />:octicons-graph-16: Check CPU load/throttling on the postgres DB | | Data Loss | :worker: Fail forward and ask dev-teams to rebuild and repush images <br />:worker: Recover images from running nodes | | Key Exposure | | | Failover | | ### :elastic: Elasticsearch | | | | --------------- | ------------------------------------------------------------ | | Slow Performace | :octicons-graph-16: Check performance of underlying disks <br />:octicons-graph-16: Check CPU load/throttling on the elastic instance <br />:octicons-graph-16: Check memory saturation under elastic node health | | Data Loss | | | Key Exposure | | | Failover | | ## Incident Resolution

    Import from clipboard

    Paste your markdown or webpage here...

    Advanced permission required

    Your current role can only read. Ask the system administrator to acquire write and comment permission.

    This team is disabled

    Sorry, this team is disabled. You can't edit this note.

    This note is locked

    Sorry, only owner can edit this note.

    Reach the limit

    Sorry, you've reached the max length this note can be.
    Please reduce the content or divide it to more notes, thank you!

    Import from Gist

    Import from Snippet

    or

    Export to Snippet

    Are you sure?

    Do you really want to delete this note?
    All users will lose their connection.

    Create a note from template

    Create a note from template

    Oops...
    This template has been removed or transferred.
    Upgrade
    All
    • All
    • Team
    No template.

    Create a template

    Upgrade

    Delete template

    Do you really want to delete this template?
    Turn this template into a regular note and keep its content, versions, and comments.

    This page need refresh

    You have an incompatible client version.
    Refresh to update.
    New version available!
    See releases notes here
    Refresh to enjoy new features.
    Your user state has changed.
    Refresh to load new user state.

    Sign in

    Forgot password

    or

    By clicking below, you agree to our terms of service.

    Sign in via Facebook Sign in via Twitter Sign in via GitHub Sign in via Dropbox Sign in with Wallet
    Wallet ( )
    Connect another wallet

    New to HackMD? Sign up

    Help

    • English
    • 中文
    • Français
    • Deutsch
    • 日本語
    • Español
    • Català
    • Ελληνικά
    • Português
    • italiano
    • Türkçe
    • Русский
    • Nederlands
    • hrvatski jezik
    • język polski
    • Українська
    • हिन्दी
    • svenska
    • Esperanto
    • dansk

    Documents

    Help & Tutorial

    How to use Book mode

    Slide Example

    API Docs

    Edit in VSCode

    Install browser extension

    Contacts

    Feedback

    Discord

    Send us email

    Resources

    Releases

    Pricing

    Blog

    Policy

    Terms

    Privacy

    Cheatsheet

    Syntax Example Reference
    # Header Header 基本排版
    - Unordered List
    • Unordered List
    1. Ordered List
    1. Ordered List
    - [ ] Todo List
    • Todo List
    > Blockquote
    Blockquote
    **Bold font** Bold font
    *Italics font* Italics font
    ~~Strikethrough~~ Strikethrough
    19^th^ 19th
    H~2~O H2O
    ++Inserted text++ Inserted text
    ==Marked text== Marked text
    [link text](https:// "title") Link
    ![image alt](https:// "title") Image
    `Code` Code 在筆記中貼入程式碼
    ```javascript
    var i = 0;
    ```
    var i = 0;
    :smile: :smile: Emoji list
    {%youtube youtube_id %} Externals
    $L^aT_eX$ LaTeX
    :::info
    This is a alert area.
    :::

    This is a alert area.

    Versions and GitHub Sync
    Get Full History Access

    • Edit version name
    • Delete

    revision author avatar     named on  

    More Less

    Note content is identical to the latest version.
    Compare
      Choose a version
      No search result
      Version not found
    Sign in to link this note to GitHub
    Learn more
    This note is not linked with GitHub
     

    Feedback

    Submission failed, please try again

    Thanks for your support.

    On a scale of 0-10, how likely is it that you would recommend HackMD to your friends, family or business associates?

    Please give us some advice and help us improve HackMD.

     

    Thanks for your feedback

    Remove version name

    Do you want to remove this version name and description?

    Transfer ownership

    Transfer to
      Warning: is a public team. If you transfer note to this team, everyone on the web can find and read this note.

        Link with GitHub

        Please authorize HackMD on GitHub
        • Please sign in to GitHub and install the HackMD app on your GitHub repo.
        • HackMD links with GitHub through a GitHub App. You can choose which repo to install our App.
        Learn more  Sign in to GitHub

        Push the note to GitHub Push to GitHub Pull a file from GitHub

          Authorize again
         

        Choose which file to push to

        Select repo
        Refresh Authorize more repos
        Select branch
        Select file
        Select branch
        Choose version(s) to push
        • Save a new version and push
        • Choose from existing versions
        Include title and tags
        Available push count

        Pull from GitHub

         
        File from GitHub
        File from HackMD

        GitHub Link Settings

        File linked

        Linked by
        File path
        Last synced branch
        Available push count

        Danger Zone

        Unlink
        You will no longer receive notification when GitHub file changes after unlink.

        Syncing

        Push failed

        Push successfully