kubectl-ttl

command module
v0.0.1-alpha.0...-ef4a7fd Latest Latest
Warning

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

Go to latest
Published: Dec 17, 2020 License: Apache-2.0 Imports: 2 Imported by: 0

README

kubectl-ttl Build License Go Report Card

A kubectl plugin to add time-to-live option to Kubernetes resources.

Story time (Why?)

The story behind the creation of this tool is quite straight forward, we just required a tool to somehow kill/clean resources after certain point of time.

To facilitate the above mentioned process, kubectl-ttl came into existence just to help myself and others in the K8s community to use the tool and make life easier.

How?

Nothing complex, based on the command parameters the tool creates a job within the namespace with the appropriate role to delete the given resources at a particular time within the namespace.

Usage


#Default ttl of 15mins for a particular resource
kubectl get deployments -o yaml | kubectl ttl

#Custom ttl for 10mins for a particular resource
kubectl get pods -o yaml | kubectl ttl -t 10

Help menu


A tiny kubectl plugin to add time to live option
to k8s resources within a namespace.

Tool helps to create a job within the specified namespace
to kill/clean the resources after certain time.

Usage:
  kubectl-ttl [flags]

Flags:
  -h, --help        help for kubectl-ttl
  -t, --time uint   time in minutes to keep the resource alive (default 15)

Similar Projects

How can I help?

All kind of contributions are always welcome 👏, if you find the tool useful star ⭐️ the project. Always happy to help with any issues or new feature requests.

License

This project is distributed under the Apache License, Version 2.0, see LICENSE for more information.

Documentation

Overview

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
internal
pkg
k8s

Jump to

Keyboard shortcuts

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