• Stars
    star
    266
  • Rank 154,103 (Top 4 %)
  • Language
    Python
  • License
    Apache License 2.0
  • Created over 8 years ago
  • Updated about 3 years ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

Kubernetes as a FUSE Filesystem

KubeFuse

KubeFuse

Kubernetes as a Filesystem Build Status

Why?

Because kubectl is great, but sometimes a bit slow to navigate.

Enter KubeFuse.

Beta quality software for quick Kubernetes browsing and editing. What's not to love.

Features

  • Browse Kubernetes resources in your file system...
  • ...with (some of) your favourite tools: ls, find, cat, vim, ...
  • List all your favourite resources such as: services, replication controllers, pods and namespaces. All entity types up to v1.3 are supported.
  • Access resource descriptions as files (eg. cat ~/kubernetes/default/pod/postgres-aazm1/describe)
  • Quickly read resources as YAML or JSON (eg. cat ~/kubernetes/default/pod/postgres-aazm1/json)
  • Edit resources with your editor of choice and have Kubernetes update on writes (vim ~/kubernetes/default/rc/postgres/json πŸ™‹)
  • Works with Python 2 and 3

A more detailed introductory post can be found on this beautiful blog.

Requirements

KubeFuse runs on both Linux and Mac, but does require additional libraries to be installed (eg. OSXFUSE).

KubeFuse also uses the kubectl binary under the hood so this needs to be on the path.

Setup and Usage

Getting the latest release

You should be able to:

pip install kubefuse

After which the kubefuse command will be installed into a bin/ directory that is hopefully already on your path (if not look for the line starting with Installing kubefuse script to .... and add that directory to your PATH and restart your shell).

You should then be able to run:

kubefuse [MOUNTPOINT]

From Source

When "building" from source:

pip install -r requirements.txt

Will install all the dependencies (on fresh systems you may need to easy_install pip first). After which you can run KubeFuse with:

python kubefuse/kubefuse.py [MOUNTPOINT] 

Tests

KubeFuse is extensively tested using a tool called Myna. It also uses the nose framework to discover and orchestrate the tests. To run the tests install Myna and then:

make test

Examples

Create the mount:

python kubefuse.py ~/kubernetes

List all pods in the default namespace:

ls ~/kubernetes/default/pod/

List all known objects in the default namespace:

find ~/kubernetes/default -type d -mindepth 2

Describe the postgres pod:

cat ~/kubernetes/default/pod/postgres-aazm1/describe

Get logs from a graphite pod:

cat ~/kubernetes/default/pod/graphite-i3bb2/logs

Export the postgres replication controller to YAML:

cat ~/kubernetes/default/rc/postgres/yaml

Export the postgres replication controller to JSON:

cat ~/kubernetes/default/rc/postgres/json

Export all service definitions in the default namespace:

find ~/kubernetes/default/svc -name yaml | while read line ; do cat $line ; echo "----" ; echo ; done

We can edit replication controllers and other resources in our editor. Saving the file will replace the resource in kubernetes:

vim ~/kubernetes/default/rc/postgres/json

License

Apache License version 2.0 See LICENSE for details.

(c) OpenCredo 2016.

More Repositories

1

terrahelp

Terraform helper. Terrahelp is as a command line utility written in Go and is aimed at providing supplementary functionality which can sometimes prove useful when working with Terraform.
Go
379
star
2

test-automation-quickstart

Quickstart project for test automation, covering performance, ui acceptance and api acceptance testing
Java
144
star
3

concursus

Java
93
star
4

opencredo-react-boilerplate

JavaScript
64
star
5

proxology

Java
64
star
6

letsencrypt-terraform

Example source code for the blog "Let's Encrypt and Terraform - Getting free certificates for your infrastructure" - https://opencredo.com/letsencrypt-terraform
HCL
57
star
7

neo4j-in-action

Java
37
star
8

opencredo-esper

Spring support classes for Esper
Java
27
star
9

ruby-acceptance-testing-quickstart

A quickstart project to start web acceptance testing within minutes.
Ruby
26
star
10

angular2-boilerplate

TypeScript
24
star
11

mesos_framework_demo

A sample Mesos framework
Java
19
star
12

tornado-analytics

JavaScript
18
star
13

akka-java8-examples

Simple examples of using Akka Java 8 interface
Java
17
star
14

mesos_service_discovery

Service Discovery script for Mesos and Marathon
Go
15
star
15

js-api-testing-quickstart

A quickstart project for testing APIs with javascript, mocha and chai
JavaScript
15
star
16

springkoans

Koans for the Programming Spring book from O'Reilly
Java
14
star
17

kafka-connect-venafi

Kafka connector for Venafi Security Events
Java
12
star
18

spring-data-cassandra-example

Java
10
star
19

golang-api-test-quickstart

Test APIs with golang
Go
8
star
20

self-testing-vault

Ruby
7
star
21

log-classifier

Log Classifier
Python
4
star
22

cassandra-spark-ansible

Jinja
3
star
23

secure-pipeline-verifier

PoC for Secure CI/CD Pipeline project that makes use of policy-as-code to check configuration and settings in a repository making use of GitHub REST APIs or GitLab REST APIs and Open Policy Agent OPA
Go
3
star
24

opa-single-message-transformer

A single message transformer that filters based on OPA policies
Java
3
star
25

si-cep-samples

Java
2
star
26

springboot-workshops

JavaScript
2
star
27

vault-pki-demo

Shell
1
star
28

hacking-k8s-on-mac

HCL
1
star
29

hierarchical-expansion-blog

A repository holding the companion notebook to the Hierarchical Expansion blog post
Jupyter Notebook
1
star
30

neo4j-puppet

Puppet module to install Neo4j Graph Database Server
Puppet
1
star
31

sample-terragrunt-bootstrap

When first adopting Terragrunt, there is a bootstrapping challenge around setting up remote state and locking resources.
HCL
1
star
32

neo4j-cluster

Neo4j development cluster
1
star