Coder Social home page Coder Social logo

ajanidev / docker-webhook-kubectl Goto Github PK

View Code? Open in Web Editor NEW

This project forked from weibeld/docker-webhook-kubectl

0.0 0.0 0.0 3 KB

A Docker image containing 'webhook' and 'kubectl'

Home Page: https://hub.docker.com/r/weibeld/webhook-kubectl

Dockerfile 100.00%

docker-webhook-kubectl's Introduction

webhook-kubectl

A Docker image containing webhook, kubectl, and additional other useful tools.

Great for automating Kubernetes maintenance operations! ☸️

Docker Image Version (latest semver) Docker Image Size (latest semver)

Description

The Docker image is based on Alpine.

Besides webhook and kubectl, the latest version of this image includes the following tools:

Note: the image also includes the gcompat compatibility layer for GNU libc on top of musl libc. This allows binaries that are dynamically linked against GNU libc to run in this container. This is necessary because Alpine uses musl libc rather than GNU libc.

The image does not define a default command or entrypoint, so if you want to run the webhook command, you have to specify it explicitly when running the image (see Usage below).

Versions

The versions of webhook and kubectl included in the image are defined in the versions file.

For the latest version of the image, these are:

  • webhook: 2.8.0
  • kubectl: v1.23.0

Usage

Assuming you have a webhook config file named hooks.yaml in your current working directory, you can run the Docker image as follows:

docker run \
  -p 9000:9000 \
  -v "$PWD"/hooks.yaml:/home/hooks.yaml \
  weibeld/webhook-kubectl:0.0.2 \
  webhook --hooks /home/hooks.yaml

Note: you have to explicitly specify the webhook command since the image does not define an entrypoint command.

Using kubectl

If you deploy the image to a Kubernetes cluster, then kubectl configures itself to acess this cluster by using the information injected into each container by Kubernetes. This includes the Pod's ServiceAccount token (/var/run/secrets/kubernetes.io/serviceaccount/token) for authentication.

So, if you want to access the cluster that kubectl is running, in you don't need a kubeconfig file or any other configuration.

If you want to access a different cluster, or deploy the image outside of Kubernetes, you need to provide an appropriate kubeconfig file to kubectl in the container.

In any case, for granting permissions to kubectl, you need to create appropriate Roles or ClusterRoles in the target cluster and bind them to the ServiceAccount or user used by kubectl with corresponding RoleBindings or ClusterRoleBindings.

docker-webhook-kubectl's People

Contributors

weibeld avatar

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.