Sign inSign up

cilium/k8s-1abel

Sponsored OSS

By Isovalent.com

•Updated over 8 years ago

Kubernetes YAML/JSON survival kit

Image
0

7.3K

cilium/k8s-1abel repository overview

⁠k8s-1abel - Kubernetes YAML/JSON survival kit

The tool that helps you survive painful YAML days.

Kubernetes uses label selectors to create references between different resources such as services referring to pods or deployments. All references are loosely coupled using label names. Typos can lead to stale references between resources and can be very hard to find.

k8s-1abel ("k8s-label") validates all LabelSelector⁠ in Kubernetes resources such as Services⁠, and automatically points out label references that cannot be associated with a target pod or target deployment.

⁠Example - Validate all service references

screenshot

⁠Installation & Usage

$ kubectl apply -f https://raw.githubusercontent.com/cilium/k8s-1abel/master/k8s-1abel.yaml
$ kubectl exec -it -n k8s-1abel k8s-1abel bash
$ k8s-1abel services
✘ default/amazing:{"isGlobal":false,"matchLabels":{"1abel":"amazing"}} does not select anything
  "1abel":"amazing" not found. Did you mean "label":"amazing"? "1label":"amazing"
ℹ Run with -v to see the list of services/pods

⁠Supported Kubernetes Resources

Source ResourceTarget Resources
Service⁠Pod (and all higher level constructs such as Deployments⁠
CiliumNetworkPolicy⁠Pod (and all higher level constructs such as Deployments⁠

⁠Requirements

⁠Build & Development Requirements

Install yarn⁠, then

yarn

to install dependencies, then run

yarn test -h

to execute the CLI.

yarn build

to build all binaries.

Tag summary

Content type

Image

Digest

Size

43 MB

Last updated

over 8 years ago

docker pull cilium/k8s-1abel

This week's pulls

Pulls:

2

Last week