• Stars
    star
    791
  • Rank 57,558 (Top 2 %)
  • Language
    Go
  • License
    Apache License 2.0
  • Created almost 7 years ago
  • Updated about 1 year ago

Reviews

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

Repository Details

Reduces repetitive interactions with kubectl

fubectl

Because it's fancy-kubectl!

Prerequisites?

Installation

You can directly download the fubectl.source and save it in some directory.

Download:

curl -LO https://rawgit.com/kubermatic/fubectl/master/fubectl.source

then add to your .bashrc/.zshrc file:

[ -f <path-to>/fubectl.source ] && source <path-to>/fubectl.source

Alternatively you can install fubectl using the ZSH plugin manager of your choice.

What can it do?

k - alias for kubectl

Like g for git but 133% more effective!

Examples:

  • k get nodes
  • k get pods
  • k version --short

Usage: kGif


kw - alias for 'watch kubectl'

Examples:

  • kw nodes
  • kw pods
  • kw nodes,pods,services

kall - All pods in all namespaces

Get all pods

Usage: kGif


kwall - Watch all pods in all namespaces

Watch all pods in all namespaces every 2 seconds.

Usage: kGif


kdes - Describe a resource

Examples:

  • kdes pod
  • kdes service
  • kdes nodes

Usage: kGif


kdel - Delete a resource

Examples:

  • kdel pod
  • kdel secret
  • kdel pvc

Usage: kGif


klog - Print the logs for a container in a pod

Examples:

  • klog - Print the last 10 lines
  • klog 100 - Print the last 100 lines
  • klog 250 -f - Print the last 250 lines and follow the output, like tail -f
  • klog 50 -p - Print the last 50 lines of the previous container

Usage: kGif


kex - Execute a command in a container

Examples:

  • kex bash - Start a bash in a container
  • kex date - Print the date in a container

Usage: kGif


kfor - Forward one or more local ports to a pod

Examples:

  • kfor 8000 - Forwards port 8000 to a pod
  • kfor 8000:80 Fowards local port 8000 to a pod's port 80

Usage: kGif


ksearch - Search for string in resources

Examples:

  • // TODO

Usage: kGif


kcl - Displays one or many contexts from the kubeconfig file

Context list

Usage: kGif

kcs - Sets the current context

Usage: kGif


kcns - Switch the default namespace

kcns - Set the current default namespace from list kcns kube-system - Set kube-system as default namespace immediately

Usage: kGif

kdebug - Start a debugging Pod in a Cluster

Usage: kGif


kp - Open the Kubernetes dashboard

Opens localhost:8001/ui in your browser and runs kubectl proxy


Extra!

Do you want to have the current kubecontext in your prompt?:

export PS1="\[$(kube_ctx_name)\] $PS1"

for the current namespace (this is currently slow, because it calls kubectl every time):

export PS1="\[$(kube_ctx_namespace)\] $PS1"

Troubleshooting

If you encounter issues file an issue or talk to us on the #fubectl channel on the Kubermatic Slack.

Contributing

Thanks for taking the time to join our community and start contributing!

Feedback and discussion are available on Kubermatic Slack.

Before you start

  • Please familiarize yourself with the Code of Conduct before contributing.
  • See CONTRIBUTING.md for instructions on the developer certificate of origin that we require.

Pull requests

  • We welcome pull requests. Feel free to dig through the issues and jump in.

More Repositories

1

kubeone

Kubermatic KubeOne automate cluster operations on all your cloud, on-prem, edge, and IoT environments.
Go
1,371
star
2

kubermatic

Kubermatic Kubernetes Platform - the Central Kubernetes Management Platform For Any Infrastructure
Go
1,030
star
3

kubecarrier

KubeCarrier - Service Management at Scale
Go
299
star
4

machine-controller

Go
288
star
5

k8sniff

k8sniff - tcp ingress controller with SNI support
Go
80
star
6

kubelb

Kubernetes based load balancing
Go
52
star
7

dashboard

Dashboard For The Kubermatic Kubernetes Platform
Go
41
star
8

operating-system-manager

Operating System Manager is responsible for creating and managing the configuration that are needed to configure worker nodes
Go
26
star
9

glog-gokit

This packages is a replacement for glog in projects that use the go-kit logger.
Go
18
star
10

docs

Documentation for Kubermatic projects
SCSS
16
star
11

gchl

Github changelog generator
Go
13
star
12

community-components

Collection of components for Kubermatic KKP and KubeOne
Shell
10
star
13

mla

MLA (Monitoring, logging, alerting) solution for KKP.
Mustache
8
star
14

reconciler

Simple codegen-based Go library to reconcile Kubernetes resources
Go
6
star
15

terraform-provider-kubermatic

Terraform Kubermatic provider
Go
6
star
16

kubermatic-installer

Installation instructions for setting up a kubermatic seed cluster
Shell
5
star
17

bulward

Multi User/Project management for Kubernetes
Go
5
star
18

kubelet

Containerized Kubelet Images
Shell
4
star
19

go-kubermatic

Go language bindings for Kubermatic API
Go
3
star
20

github-bot

Go
3
star
21

tail

Deprecated log viewer for Prow, consider using https://github.com/kubernetes/test-infra/tree/master/prow/spyglass instead
Go
3
star
22

benchmate

Network latency, throughput estimation tool
Go
2
star
23

zevenet-lb-controller

Go
2
star
24

nodeport-exposer

Go
2
star
25

glog-logrus

Go
2
star
26

telemetry-client

Telemetry-Client is an observability tool that can be used to track Kubermatic Kubernetes Platform and Kubernetes cluster usage.
Go
2
star
27

flowmatic

KubeFlow integration on KKP.
Shell
1
star
28

aur-kubeone

Shell
1
star
29

gk-installer

Installer for gluster/gluster-kubernetes
1
star
30

support

Kubernetes Support Tools
Shell
1
star
31

utils

Go
1
star
32

kubeflow-controller

KubeFlow controller
Go
1
star
33

kkp-single-node

Get started with KKP - “KKP on a single node with Kubeone on AWS”
HCL
1
star