A very simple, silly little kubectl plugin / utility that guesses which language an application running in a kubernetes pod was written in.

get-pod-app-language

A very simple, silly little kubectl plugin / utility that guesses which language an application running in a kubernetes pod was written in. Just a PoC after learning Go to prove myself I can write something that's "useful". :)

Usage

Note that kubectl-get-pod-app-language is expected to be installed as a kubectl plugin - see installation instructions here.

For standalone usage, first run go build -o app. Then, choose any of the available commands to run your application with:

./app get-pod-app-language

Guesses the language. An interactive prompt will guide you towards available pods and containers. The actual guessing is done by looking at each command in docker history and matching it against a set of available language heuristics, stored in heuristics.json.

./app get-pod-app-language list-heuristics

Lists all possible heuristics (derived from heuristics.json) that might indicate the language an application was written in. Used by get-pod-app-language to make educated guesses.

./app get-pod-app-language add-to-heuristic

An easy way to add a new heuristic - just run get-pod-app-language add-to-heuristic java ./gradlew to add the heuristic to heuristic.json.

TODO

  • Add support for remote docker registries, including secret mgmt.
  • Add proper CLI support using Cobra, there's a mish-mash of argument and variable passing in the code that doesn't make a lot of sense
  • Support more heuristics - execing into the container and listing files, looking at actual dockerfile if available, etc..
Owner
Tom Granot
Solution Engineer @ Lightrun.
Tom Granot
Similar Resources

Kubectl-over-env - Created for github actions or any other CI/CD-Pipelining tool which cannot push to a custom local kubernetes cluster

kubectl-over-env This repository was created for github actions or any other CI/

Jan 4, 2022

quick debug program running in the k8s pod

quick debug program running in the k8s pod

quick-debug English | 中文 What Problem To Solve As the k8s becomes more and more popular, most projects are deployed in k8s, and so is the development

Apr 1, 2022

Display (Namespace, Pod, Container, Primary PID) from a host PID, fails if the target process is running on host

Display (Namespace, Pod, Container, Primary PID) from a host PID, fails if the target process is running on host

Oct 17, 2022

The OCI Service Operator for Kubernetes (OSOK) makes it easy to connect and manage OCI services from a cloud native application running in a Kubernetes environment.

OCI Service Operator for Kubernetes Introduction The OCI Service Operator for Kubernetes (OSOK) makes it easy to create, manage, and connect to Oracle

Sep 27, 2022

A small utility to generate a kubectl configuration file for all clusters you have access to in GKE.

gke-config-helper A small utility to generate a kubectl configuration file for all clusters you have access to in GKE. Usage $ gke-config-helper The b

Feb 9, 2022

A simple project (which is visitor counter) on kubernetesA simple project (which is visitor counter) on kubernetes

k8s playground This project aims to deploy a simple project (which is visitor counter) on kubernetes. Deploy steps kubectl apply -f secret.yaml kubect

Dec 16, 2022

A kubectl plugin for finding decoded secret data with productive search flags.

kubectl-secret-data What is it? This is a kubectl plugin for finding decoded secret data. Since kubectl only outputs base64-encoded secrets, it makes

Dec 2, 2022

A 'kubectl' plugin for interacting with Clusternet.

kubectl-clusternet A kubectl plugin for interacting with Clusternet. Installation Install With Krew kubectl-clusternet can be installed using Krew, pl

Aug 14, 2022

A kubectl plugin for finding decoded secret data with productive search flags.

kubectl-secret-data What is it? This is a kubectl plugin for finding decoded secret data. Since kubectl outputs base64-encoded secrets basically, it m

Dec 2, 2022
🦥 kubectl plugin to easy to view pod

kubectl-lazy Install curl -sSL https://mirror.ghproxy.com/https://raw.githubusercontent.com/togettoyou/kubectl-lazy/main/install.sh | bash Or you can

Oct 13, 2022
Kubectl plugin shows pod x node matrix with suitable colors to mitigate troubleshooting effort.

kubectl-pod-node-matrix WORK IN PROGRESS!! This plugin shows pod x node matrix with suitable colors to mitigate troubleshooting effort. Details Troubl

May 11, 2022
kubectl-fzf provides a fast and powerful fzf autocompletion for kubectl
kubectl-fzf provides a fast and powerful fzf autocompletion for kubectl

Kubectl-fzf kubectl-fzf provides a fast and powerful fzf autocompletion for kubectl. Table of Contents Kubectl-fzf Table of Contents Features Requirem

Nov 3, 2021
Kubectl golang - kubectl krew template repo

kubectl krew template repo There's a lot of scaffolding needed to set up a good

Jan 11, 2022
Kubectl Locality Plugin - A plugin to get the locality of pods

Kubectl Locality Plugin - A plugin to get the locality of pods

Nov 18, 2021
Kubectl plugin to ease sniffing on kubernetes pods using tcpdump and wireshark
Kubectl plugin to ease sniffing on kubernetes pods using tcpdump and wireshark

ksniff A kubectl plugin that utilize tcpdump and Wireshark to start a remote capture on any pod in your Kubernetes cluster. You get the full power of

Jan 4, 2023
kubectl plugin for signing Kubernetes manifest YAML files with sigstore
kubectl plugin for signing Kubernetes manifest YAML files with sigstore

k8s-manifest-sigstore kubectl plugin for signing Kubernetes manifest YAML files with sigstore ⚠️ Still under developement, not ready for production us

Nov 28, 2022
Kubectl plugin to run curl commands against kubernetes pods

kubectl-curl Kubectl plugin to run curl commands against kubernetes pods Motivation Sending http requests to kubernetes pods is unnecessarily complica

Dec 22, 2022
kubectl plugin for generating nginx-ingress compatible basic-auth secrets on kubernetes clusters

kubectl-htpasswd kubectl plugin for easily generating hashed basic auth secrets. Supported hash algorithms bcrypt Examples Create the secret on the cl

Jul 17, 2022
A kubernetes operator sample generated by kubebuilder , which run cmd in pod on specified time

init kubebuilder init --domain github.com --repo github.com/tonyshanc/sample-operator-v2 kubebuilder create api --group sample --version v1 --kind At

Jan 25, 2022