Coder Social home page Coder Social logo

jordanwilson230 / kubectl-plugins Goto Github PK

View Code? Open in Web Editor NEW
610.0 7.0 62.0 154 KB

A Collection of Plugins for kubectl Integration (exec as any user, context switching, etc).

License: Apache License 2.0

Ruby 7.54% Shell 92.46%
kubectl kubernetes gke google-cloud devops namespace kubectl-plugins automated-deployment ci-cd deployment

kubectl-plugins's Introduction

kubectl-plugins

CI Status

A collection of plugins for kubectl integration (for Kubectl versions >= 1.12.0)

A portion of these plugins are available on krew as well.

Note
  • These plugins are for kubectl versions at or above 1.12.0 only. Check your version via kubectl version
  • For versions below 1.12.0, use the 1.11.0 branch.
  • To upgrade your kubectl version via homebrew: brew upgrade kubectl, or via gcloud: gcloud components update
  • The kubectl-ip plugin requires jq ( brew/apt/yum install jq )
  • All coding was written to maintain compatibility across both BSD and GNU.
  • Requires Bash.

Install on Linux/Mac

git clone https://github.com/jordanwilson230/kubectl-plugins.git
cd kubectl-plugins
./install-plugins.sh
source ~/.bash_profile

To Uninstall

rm -rf ~/.kube/plugins/jordanwilson230
ex '+g/jordanwilson230/d' -cwq ~/.bash_profile

Remove the image plugin:

ex '+g/IMG_REGISTRY=/d' -cwq ~/.bash_profile

Remove the prompt plugin:

ex '+g/function kubectl()/d' -cwq ~/.bash_profile
ex '+g/KUBECTL_\(.*\)_PROMPT/d' -cwq ~/.bash_profile

kubectl ssh

kapssh

  • Like kubectl exec, but offers a --user flag to exec as root (or any other user)
  • 'ssh' is a misnomer (it works by mounting a docker socket as a volume), but it's easier to work with as a command.
  • You must be in the same namespace as the target pod or you can use -n namespace option to specify the namespace
  • Kudos to mikelorant for thinking of the docker socket! :)

Usage: kubectl ssh [OPTIONAL: -n <namespace>] [OPTIONAL: -u <user>] [OPTIONAL: -c <Container Name>] [REQUIRED: <PodName> ] -- [command]

Example: kubectl ssh -n default -u root -c prometheus prometheus-282sd0s2 -- bash

Option Required Description Example
-h N Show usage kubectl ssh -h
-d N Enable debug mode. Print a trace of each commands kubectl ssh -d kafka-0
-n N The namespace scope for this CLI request kubectl ssh -n infra kafka-0
-u N User to exec as. Defaults to root kubectl ssh -u kafka kafka-0
-c N Specify container within pod kubectl ssh -c burrow-metrics kafka-0
-- N Pass an optional command. Defaults to /bin/sh kubectl ssh kafka -- ls /etc/burrow

kubectl switch

switch

  • View current namespace: kubectl switch
  • Switch namespace: kubectl switch preprod
  • Switch cluster: kubectl switch cluster staging (accepts fuzzy on the cluster name)
  • List and select from all available clusters: kubeclt switch cluster -l
Option Required Description Example
-l N List available clusters and prompts for selection. Can only be used when cluster is passed. kubNctl switch cluster -l
-h N Show usage kubectl switch -h

kubectl prompt

prompt

  • Displays a warning prompt when issuing commands in a flagged cluster or namespace
  • Commands that trigger the prompt include create, scale, delete, apply, etc.,
  • Flag a namespace: kubectl prompt add -n production
  • Flag a cluster: kubectl prompt add -c my-cluster
  • List flagged environments: kubectl prompt list
  • Clear flagged environments: kubectl prompt remove
  • View description: kubectl prompt

kubectl image

image

  • Search for Docker images
  • If you have a Google Container Registry, run kubectl image -c to set it as the default for future searches.
  • If not configured with -c, searches will use Docker Hub by default.
  • Adding -p will search Docker Hub, regardless of any default.
  • Sorts Docker Hub images by number of stars.
  • Sorts GCR images by upload date.

Example: kubectl image kafka

kubectl ip

kap_ip

  • Outputs the node name, node IP, and Pod IP for a given resource. Search is performed against common labels (defaults to app, name, component)

Example: kubectl ip cassandra

kubectl uptime

kap_uptime

  • Displays total uptime for pods/statefulsets in the current namespace.

Example: kubectl uptime

kubectl-plugins's People

Contributors

bwmills avatar flavono123 avatar gothrek22 avatar jordanwilson230 avatar kam1kaze avatar kirrmann avatar lchenay avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar

kubectl-plugins's Issues

SSH plugin fails if no namespace is set

If the namespace preference isn't set, the SSH plugin fails as such:


Connecting...
Pod: podname
User: root
Container:containername
Command:/bin/sh

Error: unknown command "value>" for "kubectl"
Run 'kubectl --help' for usage.
unknown command "value>" for "kubectl"
Error: unknown command "value>" for "kubectl"
Run 'kubectl --help' for usage.
unknown command "value>" for "kubectl"
/Users/username/.kube/plugins/jordanwilson230/kubectl-ssh: line 66: no: No such file or directory

The query on line 44 returns <no value> in this case, which causes the problem. It's a pretty easy fix to just have it default to default, which would solve the problem.

Support `run` command as prompt trigger

Is your feature request related to a problem? Please describe.
Like create, run changes the envs(clusters or namespaces).

Describe the solution you'd like
Trigger a prompt when a command run is executed.

Describe alternatives you've considered
...

Additional context
...

[BUG] kubectl exec-as not working with containerd

I'm running a kubernetes cluster which is 1.20.
But kubectl exec-as <pod-id> hangs for ever.
This is the debug output.

❯ k exec-as -d $minio_pod
+ getopts hdp:n:u:c: arg
+ shift 1
+ [[ -z x ]]
+ POD=minio-684b4857c9-6bf52
+ shift
+ [[ 0 -gt 0 ]]
+ echo -e '\nConnecting...\nPod: minio-684b4857c9-6bf52\nNamespace: NONE\nUser: root\nContainer: NONE\nCommand: /bin/sh\n'

Connecting...
Pod: minio-684b4857c9-6bf52
Namespace: NONE
User: root
Container: NONE
Command: /bin/sh

+++ whoami
+++ tr -dc '[:alnum:]'
++ exec /usr/bin/kubectl get po rajeshr-1
+ test ''
++ whoami
++ tr -dc '[:alnum:]'
+ container=rajeshr-1
++ /usr/bin/kubectl get pod minio-684b4857c9-6bf52 -o 'go-template={{.spec.nodeName}}'
+ NODENAME=scw-k8s-asayer-install-default-9c53ad4f75f94b5
+ NODESELECTOR='"nodeSelector": {"kubernetes.io/hostname": "scw-k8s-asayer-install-default-9c53ad4f75f94b5"},'
++ /usr/bin/kubectl get pod minio-684b4857c9-6bf52 '-ojsonpath={.spec.tolerations[].value}'
+ TOLERATION_VALUE=
+ [[ -n '' ]]
+ TOLERATIONS=
+ [[ NONE != \N\O\N\E ]]
++ /usr/bin/kubectl get pod minio-684b4857c9-6bf52 -o 'go-template={{ (index .status.containerStatuses 0).containerID }}'
+ DOCKER_CONTAINERID=docker://f205b6a80eec37819b81e034d79ea705ba4e7833511439293085860d6fb4f289
+ CONTAINERID=f205b6a80eec37819b81e034d79ea705ba4e7833511439293085860d6fb4f289
+ read -r -d '' OVERRIDES
++ to_json /bin/sh
++ text=/bin/sh
++ p=
++ for i in $text
++ [[ -n '' ]]
++ p+='"/bin/sh"'
++ echo -en '"/bin/sh"'
+ :
+ trap '$KUBECTL delete pod $container >/dev/null 2>&1 &' 0 1 2 3 15
+ eval /usr/bin/kubectl run -it --restart=Never --image=docker '--overrides='\''{
    "apiVersion": "v1",
    "spec": {
        "containers": [
            {
                "image": "docker",
                "name": "'\''rajeshr-1'\''",
                "stdin": true,
                "stdinOnce": true,
                "tty": true,
                "restartPolicy": "Never",
                "args": [
                  "exec",
                  "--privileged",
                  "-it",
                  "-u",
                  "root",
                  "f205b6a80eec37819b81e034d79ea705ba4e7833511439293085860d6fb4f289",
                  "/bin/sh"
                ],
                "volumeMounts": [
                    {
                        "mountPath": "/var/run/docker.sock",
                        "name": "docker"
                    }
                ]
            }
        ],

        "nodeSelector": {"kubernetes.io/hostname": "scw-k8s-asayer-install-default-9c53ad4f75f94b5"},



        "volumes": [
            {
                "name": "docker",
                "hostPath": {
                    "path": "/var/run/docker.sock",
                    "type": "File"
                }
            }
        ]
    }
}'\''' rajeshr-1
++ /usr/bin/kubectl run -it --restart=Never --image=docker '--overrides={
    "apiVersion": "v1",
    "spec": {
        "containers": [
            {
                "image": "docker",
                "name": "rajeshr-1",
                "stdin": true,
                "stdinOnce": true,
                "tty": true,
                "restartPolicy": "Never",
                "args": [
                  "exec",
                  "--privileged",
                  "-it",
                  "-u",
                  "root",
                  "f205b6a80eec37819b81e034d79ea705ba4e7833511439293085860d6fb4f289",
                  "/bin/sh"
                ],
                "volumeMounts": [
                    {
                        "mountPath": "/var/run/docker.sock",
                        "name": "docker"
                    }
                ]
            }
        ],

        "nodeSelector": {"kubernetes.io/hostname": "scw-k8s-asayer-install-default-9c53ad4f75f94b5"},



        "volumes": [
            {
                "name": "docker",
                "hostPath": {
                    "path": "/var/run/docker.sock",
                    "type": "File"
                }
            }
        ]
    }
}' rajeshr-1

error: timed out waiting for the condition
+ /usr/bin/kubectl delete pod rajeshr-1

kubectl-switch should pick exact match if available

Is your feature request related to a problem? Please describe.
I have contexts like "stage-foo", "stage-foo-bar", "stage-foo-baz" because those are the names of the k8s namespaces. When doing "k switch cluster stage-foo-bar" I get an error because it selects all three cluster names and then does something like "kubectl config use-context stage-foo stage-foo-bar stage-foo-baz".

The globbing feature is really nice but if there is an exact match, it should be preferred.

Publish the ssh plugin to krew

Is your feature request related to a problem? Please describe.

Please integrate the ssh plugin into krew to make it more convenient to install.

Describe the solution you'd like

Publish ssh to krew.

exec-as typo

says ezec

kubectl exec-as -h
/Users/ahmetb/.krew/bin/kubectl-exec_as: option requires an argument -- h

Usage: kubectl ezec-as [OPTIONS] [-- <commands...>]

Run a command in a running container

Bulk inserts have no response???

shell

for i in kubectl -n spring get pod -o wide | grep harbor | awk '{print $1}';do kubectl exec-as -u root -n spring $i -- echo "192.168.0.3 harbor.kubesphere.lan" >> /etc/hosts;done

It didn't go back in

kubectl exec-as does not work

Is your feature request related to a problem? Please describe.
kubectl exec-as does not work for me

More details:

❱ kubectl exec-as --help
Error: unknown command "exec-as" for "kubectl"
Run 'kubectl --help' for usage.
unknown command "exec-as" for "kubectl"
❱ type -a kubectl-exec-as
kubectl-exec-as is /Users/kam1kaze/.kube/plugins/jordanwilson230/kubectl-exec-as
❱ kubectl version
Client Version: version.Info{Major:"1", Minor:"15", GitVersion:"v1.15.0", GitCommit:"e8462b5b5dc2584fdcd18e6bcfe9f1e4d970a529", GitTreeState:"clean", BuildDate:"2019-06-20T04:49:16Z", GoVersion:"go1.12.6", Compiler:"gc", Platform:"darwin/amd64"}

Work-a-round:

❱ ln -s kubectl-exec-as ~/.kube/plugins/jordanwilson230/kubectl-ssh
❱ type -a kubectl-ssh
kubectl-ssh is /Users/kam1kaze/.kube/plugins/jordanwilson230/kubectl-ssh
❱ kubectl ssh --help
Usage: kubectl ssh <options> <pod name>
   p) # Specify pod name.
   u) # Specify user
   c) # Specify container
   h) # Display help.

Describe the solution you'd like
do not have right now

Describe alternatives you've considered

ln -s kubectl-exec-as ~/.kube/plugins/jordanwilson230/kubectl-ssh

kube-ssh Error: No such container

After kubernetes migrated to containerd and updating the plugin with the workaround, now I get the following error:

$ kubectl ssh -u root -n cms videocms-backend-7f75745599-qbrnk

Connecting...
Pod: videocms-backend-7f75745599-qbrnk
Namespace: cms
User: root
Container: NONE
Command: /bin/sh

Error: No such container: 212182d630c5d728aa2f06b809f41b15a1c599823e4d1195e64a9d15b2967e9a
pod cms/ssh-pod-13694 terminated (Error)

Can you shed some light on this?

Make `kubectl-prompt` suitable for use with zsh

Is your feature request related to a problem? Please describe.
Currently it is impossible to use kubectl-prompt with zsh because :

  • function definition does not work in zsh
  • changes are kept in .bash_profile

Describe the solution you'd like

  • change function kubectl () definition to be both bash and zsh compatibile
  • store configuration (cluster, namespaces, function definition) outside .bash_profile
  • source configuration (from above) in .bash_profile or .zshrc (depending on shell)

Additional context
Currently when I extracted configuration to separate file and try to source it in zsh I get

kubectl: command not found: kubectl () {\n\tkube=$(which kubectl) \n\t$kube prompt "${@}" && command $kube "${@}"\n}

probably because different handling of references in zsh (problematic part : kube=$(which kubectl) inside a function called kubectl)

-i, -i support for exec-as

Is your feature request related to a problem? Please describe.

Please support conventional -i, -t flags for exec-as, so that the command is able to support interactive shell sessions, just like kubectl exec.

Describe the solution you'd like

Implement -i and -t.

Describe alternatives you've considered

Skipping the exec-as plugin altogether and diving into the node.

Unable to use exec_as with resource quotas

There's no visible way to set resource quotas when creating the temporary pod. Please add a way to specify limits and requests.

$ kubectl exec-as -n dlb dlb-node-review-lv-master-mqe0vx-77fc8f6967-cvprn
Connecting...
Pod: dlb-node-review-lv-master-mqe0vx-77fc8f6967-cvprn
Namespace: dlb
User: root
Container: NONE
Command: /bin/sh

Error from server (Forbidden): pods "glen-1" is forbidden: failed quota: quota-dlb: must specify limits.cpu,limits.memory,requests.cpu,requests.memory

$ kubectl  exec-as -n dlb --resources=limits.cpu=100m dlb-node-review-lv-master-mqe0vx-77fc8f6967-cvprn
/Users/glen/.krew/bin/kubectl-exec_as: illegal option -- -

Usage: kubectl exec-as [OPTIONS] <pod name> [-- <commands...>]

Run a command in a running container

Options:
  -h  Show usage
  -d  Enable debug mode. Print a trace of each commands
  -n  If present, the namespace scope for this CLI request
  -u  Username or UID (format: <name|uid>[:<group|gid>])
  -c  Container name. If omitted, the first container in the pod will be chosen

Got timeout when trying ssh connection

Hi,

I tried the ssh connection using kubectl ssh -n <namespace> <pod> and got the following error:
error: timed out waiting for the condition

any idea?

kubectl ssh assumes user's GCP username

"kubectl ssh" assumes that the local user (i.e., "ben") has the same GCP username (e.g., ben, and not Benjamin). It should allow for either an init or flag option.

container flag does not seem implemented correctly

✗  kubectl ssh -n es -u root -c elasticsearch es-es-data-client-2 -- bash

Connecting...
Pod: es-es-data-client-2
Namespace: es
User: root
Container: elasticsearch
Command: bash

Unable to use a TTY - container istio-proxy did not allocate one
If you don't see a command prompt, try pressing enter.

Container: elasticsearch is selected, why is it trying to get a TTY on the istio-proxy container?

exec-as will fail if username not in lowercase

Hello,

test "$(exec "${KUBECTL}" get po "$(whoami|tr -dc '[:alnum:]')-1" 2>/dev/null)" && container="$(whoami|tr -dc '[:alnum:]')-2" || container="$(whoami|tr -dc '[:alnum:]')-1"

Locally I modified it as:

test "$(exec "${KUBECTL}" get po "$(whoami|tr '[:upper:]' '[:lower:]'|tr -dc '[:alnum:]')-1" 2>/dev/null)" && container="$(whoami|tr '[:upper:]' '[:lower:]'|tr -dc '[:alnum:]')-2" || container="$(whoami|tr '[:upper:]' '[:lower:]'|tr -dc '[:alnum:]')-1"

If the kubectl in "Application Support", on MacOS will got "No such file or directory"

+ temp_container=ssh-pod-20674
++ /Users/duan/Library/Application Support/OpenLens/binaries/kubectl/1.22.6/kubectl --namespace=argocd get pod argocd-server-5678b46b8c-kktx9 -o 'go-template={{.spec.nodeName}}'
/Users/duan/.kube/plugins/jordanwilson230/kubectl-ssh: line 92: /Users/duan/Library/Application: No such file or directory

True path is /Users/duan/Library/Application\ Support/OpenLens/binaries/kubectl/1.22.6/kubectl

Start distributing plugins via Krew

Hello again. 👋 We've discussed about this privately in email, opening an issue here for tracking the public interest.

I'd love to have some of these great plugins at krew, the plugin manager for kubectl. https://github.com/GoogleContainerTools/krew

Since we last talked, krew has added support for kubectl-1.12 style plugins –and krew is being donated to Kubernetes SIG CLI.

Some plugins with common names (like "ssh") maybe a problem but the rest looks pretty interesting. I've personally ported a few other people's bash-based plugins to krew and it's pretty simple!

You can get started at the Developer Guide.

Error running temporary pod with ssh plugin

I wanted to bring this situation to your attention and share this issue for others that might also run into this problem.

I have been successfully using your ssh plugin to run as root user in running pods for over six months and have been using with kubernetes managed service (EKS) on AWS. Thank you for providing this excellent set of utilities. I don't know the root cause, but somewhere along the line, I updated the EKS nodes and kubectl to these versions:

Client Version: version.Info{Major:"1", Minor:"20+", GitVersion:"v1.20.4-dirty", GitCommit:"e87da0bd6e03ec3fea7933c4b5263d151aafd07c", GitTreeState:"dirty", BuildDate:"2021-03-15T10:03:32Z", GoVersion:"go1.16.2", Compiler:"gc", Platform:"darwin/amd64"}
Server Version: version.Info{Major:"1", Minor:"19+", GitVersion:"v1.19.6-eks-49a6c0", GitCommit:"49a6c0bf091506e7bafcdb1b142351b69363355a", GitTreeState:"clean", BuildDate:"2020-12-23T22:10:21Z", GoVersion:"go1.15.5", Compiler:"gc", Platform:"linux/amd64"}

Now when I run kubectl ssh -u root jenkins-bffffdf94-t92th the ssh no longer works because the temporary pod fails to run with the error: MountVolume.SetUp failed for volume "docker" : hostPath type check failed: /var/run/docker.sock is not a file

The only way that I was able to get the ssh to work again was to modify your ssh plugin script and remove the line which specifies the docker.sock as a file type, which kind of makes sense given the error message above.

Not sure if you can/should make this change to the scripts, but others will probably run into this after upgrading some part of the stack.

get errors while the ssh command invoking

Hello,
I followed the README guide to run the tool (on the master branch) and got several errors. Did I use it in the wrong way? please help, thanks a lot.

I am using k8s 1.13.5 as below:

kubectl version
Client Version: version.Info{Major:"1", Minor:"13", GitVersion:"v1.13.4", GitCommit:"c27b913fddd1a6c480c229191a087698aa92f0b1", GitTreeState:"clean", BuildDate:"2019-02-28T13:37:52Z", GoVersion:"go1.11.5", Compiler:"gc", Platform:"linux/amd64"}
Server Version: version.Info{Major:"1", Minor:"13", GitVersion:"v1.13.5", GitCommit:"2166946f41b36dea2c4626f90a77706f426cdea2", GitTreeState:"clean", BuildDate:"2019-03-25T15:19:22Z", GoVersion:"go1.11.5", Compiler:"gc", Platform:"linux/amd64"}

when I install the plugins, it shows:

root@robota:~/kubectl-plugins# ./install-plugins.sh

Done.
Please open a new terminal or run: source ~/.bash_profile

The following kubectl-compatible plugins are available:

kubectl image
kubectl ip
kubectl prompt
kubectl ssh
kubectl switch
kubectl uptime

when I run the commands, it shows these:

kubectl ssh -n gitlab-managed-apps -u root -p runner-gitlab-runner-789c484674-bfdtd

Connecting...
Pod: -n
User: root
Container:
Command:/bin/sh

Error: unknown command "value>" for "kubectl"
Run 'kubectl --help' for usage.
unknown command "value>" for "kubectl"
Error: unknown command "value>" for "kubectl"
Run 'kubectl --help' for usage.
unknown command "value>" for "kubectl"
Error: unknown command "value>" for "kubectl"
Run 'kubectl --help' for usage.
unknown command "value>" for "kubectl"
whoami

Remove dependency on .bash_profile (or other profiles)

Hi! Thanks for starting such a cool project! I'm already getting excited just thinking about all the possibilities.

Is your feature request related to a problem? Please describe.
I have just started using kubectl-plugins and keep forgetting to reload my terminal or open a new terminal tab. It would be great to remove some of the acrobatics required to get my clusters and namespaces protected.

Describe the solution you'd like
A simple config file living in $HOME would probably do the trick. Could get really fancy with it and even scope namespaces to clusters, give clusters shorthand names (some gke clusters have some serious character counts), and add the container registry there as well.

The only dependency on the .bash_profile (or .zshrc if Zsh support is added down the road 😜 ) would be to add the initial function.

Describe alternatives you've considered
Changing my habits and re-sourcing more often.

Additional context
I've done similar things to this before in other kubernetes projects I've done and it worked well. It was with higher-level languages, but it would still be possible for these use cases I believe.

I doubt you want to make dependencies on tools like jq or yq but something like that would make this feature request extremely easy to accomplish. Confirming some GNU/BSD compatibility could be crucial.

exec-as not working with containerd

I was originally getting the type issue and applied the fix at https://github.com/jordanwilson230/kubectl-plugins/pull/36/files

Now I get a different error:

If you don't see a command prompt, try pressing enter.
Error attaching, falling back to logs: unable to upgrade connection: container effy-1 not found in pod effy-1_default
error during connect: Get "http://docker:2375/v1.24/containers/52b9ff502b9f1d16dc34808ecfe37702c985b0643bb8313d149c2c7121c1a3f6/json": dial tcp: lookup docker on 100.64.0.10:53: no such host
pod default/effy-1 terminated (Error)

My version details:

Client Version: version.Info{Major:"1", Minor:"20", GitVersion:"v1.20.9", GitCommit:"7a576bc3935a6b555e33346fd73ad77c925e9e4a", GitTreeState:"clean", BuildDate:"2021-07-15T21:01:38Z", GoVersion:"go1.15.14", Compiler:"gc", Platform:"darwin/amd64"}
Server Version: version.Info{Major:"1", Minor:"20", GitVersion:"v1.20.9", GitCommit:"7a576bc3935a6b555e33346fd73ad77c925e9e4a", GitTreeState:"clean", BuildDate:"2021-07-15T20:56:38Z", GoVersion:"go1.15.14", Compiler:"gc", Platform:"linux/amd64"}

[krew] Distribute with license

👋 Hello, maintainer of the kubectl plugin manager krew here.

Thank you for your commitment to open source by making this plugin available via krew!

Krew wants to give credit where credit is due by installing the proper license file for the plugins it distributes. However, your plugin was found to not contain any license file. We wanted to remind you that if you're using a license such as Apache 2.0, you should be bundling your LICENSE file with your plugin’s distributions.

What do you have to do?

  • Please ensure your GitHub repository has a license file.
  • Make sure your archive file (.tar.gz or .zip) contains the license file.
  • Please submit a pull-request to krew-index and update the files: section to copy the file to the installation directory. Have a look at this PR for an example: https://github.com/kubernetes-sigs/krew-index/pull/314/files

If you need further assistance, don't hesitate to ask for help.

kubectl ssh doesnt show command prompt

Either of below doesnt work well with me:

- kubectl ssh -d -u root -n kong -c kong kong-5c6d75696c-dj95q -- /bin/bash
- kubectl exec --user root kong-5c6d75696c-dj95q -c kong -- /bin/bash

I need to install a lua Kong plugin as root only:
luarocks install lua-resty-openidc

Am getting no command prompt, just blanks even after pressing enter's

The ssh plugin timesout after a while if no new input is received

There is a bug with the ssh plugin where the session terminates unexpectedly after a while if no new input is provided.
When the user next tries to send new input, they will receive a message like this:
E0821 13:07:24.069237 3819 v2.go:105] EOF
Then the only way for the user to get back a prompt is to Ctrl+C out of the kubectl ssh process.

ssh plugin not working with k3d - MountVolume.SetUp failed for volume "docker" : hostPath type check failed: /var/run/docker.sock is not a file

I'm trying to exec into a pod as root in my k3d cluster but after a while I always get a ssh-pod-24136 error: timed out waiting for the condition error message.

I can see that the ssh plugin tries to spin up an ssh-pod, but immediately after start the pod fails with the following error message:

MountVolume.SetUp failed for volume "docker" : hostPath type check failed: /var/run/docker.sock is not a file

Am I doing something wrong?

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.