kubevol

command module
v0.6.1 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jul 13, 2020 License: GPL-3.0 Imports: 3 Imported by: 0

README

kubevol

Kubevol allows you to audit all your Kubernetes pods for an attached volume or see all the volumes attached to each pod by a specific type (eg: ConfigMap, Secret).

Features:

  • Query for ConfigMaps and Secrets (future support coming for other types of volumes)
  • Kubernetes controller to watch and record changes to ConfigMaps and Secrets
  • Filter by namespace
  • Filter by a specific object name
  • See if attached volume has a stale version attached

Installation

You can download the latest release from Releases.

Watch And Record Changes

Since Kubernetes doesn't keep track of when a Secret or Configmap was updated, kubevol has a Kubernetes controller that will watch for all changes and will record the last modified date. This then gives kubevol the ability to detect if an attached Secret or Configmap is outdated.

To install the watch controller, run:

$ kubectl apply -f https://raw.githubusercontent.com/bmaynard/kubevol/master/deployment/manifest.yaml
Configuration

If your kubeconfig is not in the default location in your home directory, you can specify a custom kubeconfig file by creating the following file:

~/.kubevol.yaml

---
kubeconfig: /path/to/kube/config

Sample Output

$ kubevol secret
There are 12 pods in the cluster
Searching for pods that have a Secret attached

+------------------+----------+-----------------------+-----------------------+-------------+
| NAMESPACE        | POD NAME | SECRET NAME           | VOLUME NAME           | OUT OF DATE |
+------------------+----------+-----------------------+-----------------------+-------------+
| kubevol-test-run | redis    | redis-secret          | redis-secret          | No          |
| kubevol-test-run | redis    | redis-secret-outdated | redis-secret-outdated | Yes         |
+------------------+----------+-----------------------+-----------------------+-------------+

Documentation

Overview

Copyright © 2020 NAME HERE <EMAIL ADDRESS>

Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at

http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.

Directories

Path Synopsis
pkg

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL