-
Notifications
You must be signed in to change notification settings - Fork 6
Expand file tree
/
Copy path.krew.yaml
More file actions
85 lines (82 loc) · 2.88 KB
/
.krew.yaml
File metadata and controls
85 lines (82 loc) · 2.88 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
apiVersion: krew.googlecontainertools.github.com/v1alpha2
kind: Plugin
metadata:
name: sql
spec:
version: {{ .TagName }}
homepage: https://github.com/yaacov/kubectl-sql
shortDescription: Query Kubernetes resources using SQL-like syntax
description: |
kubectl-sql is a kubectl plugin that allows you to query Kubernetes resources
using SQL-like syntax. It supports complex queries with WHERE clauses, sorting,
limiting, and filtering across multiple resource types and namespaces.
Features:
- SQL-like query language with operators (=, !=, ~=, >, <, etc.)
- Support for all Kubernetes resource types
- Cross-namespace queries
- Multiple output formats (table, json, yaml, name)
- Array operations (any, all, len)
- Time and size unit support
caveats: |
This plugin requires kubectl to be installed and configured to access your cluster.
Examples:
# Get pods with specific labels
kubectl sql "SELECT name, status.phase FROM */pods WHERE metadata.labels.app = 'nginx'"
# Find pods with high memory usage
kubectl sql "SELECT name FROM */pods WHERE spec.containers[*].resources.requests.memory > 1Gi"
platforms:
- selector:
matchLabels:
os: linux
arch: amd64
{{addURIAndSha "https://github.com/yaacov/kubectl-sql/releases/download/{{ .TagName }}/kubectl-sql-{{ .TagName }}-linux-amd64.tar.gz" .TagName }}
files:
- from: kubectl-sql-linux-amd64
to: kubectl-sql
- from: LICENSE
to: .
bin: kubectl-sql
- selector:
matchLabels:
os: linux
arch: arm64
{{addURIAndSha "https://github.com/yaacov/kubectl-sql/releases/download/{{ .TagName }}/kubectl-sql-{{ .TagName }}-linux-arm64.tar.gz" .TagName }}
files:
- from: kubectl-sql-linux-arm64
to: kubectl-sql
- from: LICENSE
to: .
bin: kubectl-sql
- selector:
matchLabels:
os: darwin
arch: amd64
{{addURIAndSha "https://github.com/yaacov/kubectl-sql/releases/download/{{ .TagName }}/kubectl-sql-{{ .TagName }}-darwin-amd64.tar.gz" .TagName }}
files:
- from: kubectl-sql-darwin-amd64
to: kubectl-sql
- from: LICENSE
to: .
bin: kubectl-sql
- selector:
matchLabels:
os: darwin
arch: arm64
{{addURIAndSha "https://github.com/yaacov/kubectl-sql/releases/download/{{ .TagName }}/kubectl-sql-{{ .TagName }}-darwin-arm64.tar.gz" .TagName }}
files:
- from: kubectl-sql-darwin-arm64
to: kubectl-sql
- from: LICENSE
to: .
bin: kubectl-sql
- selector:
matchLabels:
os: windows
arch: amd64
{{addURIAndSha "https://github.com/yaacov/kubectl-sql/releases/download/{{ .TagName }}/kubectl-sql-{{ .TagName }}-windows-amd64.zip" .TagName }}
files:
- from: kubectl-sql-windows-amd64.exe
to: kubectl-sql.exe
- from: LICENSE
to: .
bin: kubectl-sql.exe