An app that helps you monitor your Kubernetes cluster, debug critical deployments & gives recommendations for standard practices
Go to file
2018-12-31 11:09:58 +05:30
build Support 2-way communication with slack bot to exec kubectl commands 2018-12-27 14:12:52 +05:30
cmd/controller Support 2-way communication with slack bot to exec kubectl commands 2018-12-27 14:12:52 +05:30
hack Add verify-gofmt, update-gofmt, verify-golint and verify-govet scripts 2018-12-31 11:09:58 +05:30
helm/kubeops Add ping command, support for nodes, pvcs resources 2018-12-28 15:11:24 +05:30
pkg Add ping command, support for nodes, pvcs resources 2018-12-28 15:11:24 +05:30
vendor Add vendoring 2018-12-26 13:12:17 +05:30
Gopkg.lock Add vendoring 2018-12-26 13:12:17 +05:30
Gopkg.toml Add vendoring 2018-12-26 13:12:17 +05:30
kubeopsconfig.yaml Add ping command, support for nodes, pvcs resources 2018-12-28 15:11:24 +05:30
README.md Update README.md 2018-12-28 15:04:31 +05:30

kubeops

Watch kubernetes resources, events and get recommedations

Building

build/docker.sh <docker-repo> <tag>

Creating slack bot

  • Create a bot with name kubeops https://my.slack.com/services/new/bot
  • Set icon, name and copy API token (required to configure kubeops)
  • Add the bot into a channel by inviting with @kubeops in the message area

Configuration

Kubeops reads configurations from kubeopsconfig.yaml file placed at KUBEOPS_CONFIG_PATH Syntax:

# Resources you want to watch
resources:
  - name: RESOURCE_NAME    # Name of the resources e.g pods, deployments, ingresses, etc. (Resource name must be in plural form)
    namespaces:            # List of namespaces, "all" will watch all the namespaces
      - all
    events:                # List lifecycle events you want to receive, e.g create, update, delete OR all
      - all
  - name: pods
    namespaces:
      - kube-system
      - default
    events:
      - create
      - delete
  - name: roles
    namespaces:
      - all
    events:
      - create
      - delete

# K8S errors/warnings events you want to receive for the configured resources
events:
  types:
    - normal
    - warning

# Check true if you want to receive recommendations
# about the best practices for the created resource
recommendations: true

# Channels configuration
communications:
  slack:
    channel: 'SLACK_CHANNEL_NAME'
    token: 'SLACK_API_TOKEN_FOR_THE_BOT'

Supported resources:

  • pods
  • nodes
  • services
  • namespaces
  • replicationcontrollers
  • persistentvolumes
  • persistentvolumeclaims
  • secrets
  • configmaps
  • deployments
  • daemonsets
  • replicasets
  • ingresses
  • jobs
  • roles
  • rolebindings
  • clusterroles
  • clusterrolebindings

Installing

Using helm

git clone https://github.com/infracloudio/kubeops.git
  • Update default kubeopsconfig in helm/kubeops/values.yaml to watch the resources you want.
  • Deploy kubeops using helm install in your cluster.
helm install --name kubeops --namespace kubeops --set kubeopsconfig.communications.slack.channel={SLACK_CHANNEL_NAME} --set kubeopsconfig.communications.slack.token={SLACK_API_TOKEN_FOR_THE_BOT} helm/kubeops/
  • Send @kubeops help in the channel to see if kubeops is responding.