内容简介:Mount kubernetes's metadata object store as a file system
kubefs
Mount kubernetes's metadata object store as a file system
Downloading
There are several options for downloading kubefs:
-
Download the latest release from GitHub
-
Build it directly from source using
go get:go get github.com/configurator/kubefs
Note: this is often broken because it not only gets the
masterbranch of this repository - but also all the dependencies. -
Build it directly from source by cloning this repository and running
go build .
to create a
kubefsbinary -
Run it directly from source by cloning tihs repository and using
go run . [<options>] <dir>
instead of a
kubefsbinary.
Dependencies
For MacOS you will need osxfuse :
or you can install with brew formula:
$ brew install osxfuse
For Windows you will need WinFSP .
Usage
kubefs [<options>] <dir>
Mounts the default kubernetes cluster onto dir.
Options
-
-c,--kubeconfig:Like in
kubectl, you can use the--kubeconfigflag to specify an alternatekube.configfile, or pass theKUBECONFIGenvironment flag. All contexts in the passed config file will be available. -
--show-json-files:Show json files in directory listings. By default, they are there but hidden.
-
--show-yaml-files=false:Hide yaml files in directory listings. If you don't combine this with
--show-json-files, directories will all be empty. Files are still readable, just not listed in directory listings. -
--pretty-json:When opening
.jsonfiles, pretty-print them with newlines and indentation..
Files
Files in the mounted directory will have the following directory structure:
-
/<context>- all contexts available from
kubeconfigshould appear here, allowing you to browse multiple clusters without switching withkube config use-context.
- all contexts available from
-
/<context>/<object-type> -
/<context>/<object-type>/<name>.yaml- for global objects that have no namespace, such as
nodes,clusterrolesornamespacesthemselves
- for global objects that have no namespace, such as
-
/<context>/<object-type>/<namespace> -
/<context>/<object-type>/<namespace>/<name>.yaml- for namespaced objects such as
pods,deployments, etc.
- for namespaced objects such as
All object files end in .yaml . However, the file system has a secret - the extension can be changed to see the objects in different formats. Currently supported formats are:
.yaml .json
These extra formats will not show up in directory listings, but are available to any application that tries to read them. Omitting the extension also works and returns the default format, yaml.
Ideas for exploring
-
Use
find <dir>to see an entire listing of all kubernetes objects. -
Open the directory in an IDE to look around
-
Snapshot the entire kubernetes object store by copying directory contents - though restoring isn't currently possible, you'd have a backup of each individual object.
Some more screenshots
Roadmap
以上所述就是小编给大家介绍的《Mount kubernetes metadata storage as a filesystem - ⭐if you liked it!》,希望对大家有所帮助,如果大家有任何疑问请给我留言,小编会及时回复大家的。在此也非常感谢大家对 码农网 的支持!
本站部分资源来源于网络,本站转载出于传递更多信息之目的,版权归原作者或者来源机构所有,如转载稿涉及版权问题,请联系我们。
企业IT架构转型之道:阿里巴巴中台战略思想与架构实战
钟华 / 机械工业出版社 / 2017-4-1 / 79
在当今整个中国社会都处于互联网转型的浪潮中,不管是政府职能单位、业务规模庞大的央企,还是面临最激烈竞争的零售行业都处于一个重要的转折点,这个转折对企业业务模式带来了冲击,当然也给企业的信息中心部门带来了挑战:如何构建IT系统架构更好地满足互联网时代下企业业务发展的需要。阿里巴巴的共享服务理念以及企业级互联网架构建设的思路,给这些企业带来了不少新的思路,这也是我最终决定写这本书的最主要原因。本书从阿......一起来看看 《企业IT架构转型之道:阿里巴巴中台战略思想与架构实战》 这本书的介绍吧!