Code Monkey home page Code Monkey logo

peg's Introduction

peg

Kubernetes is hard ... helm makes it harder. Try peg for to "peg" up a seamless Kubernetes experience.

peg is a oras based storage for kubernetes manifests. a minimalist package manager geared at helping the deployment story for private container registries.

With peg a user can seamlessly push their kubernetes application manifest into a OCI compliant container registry. When they need to deploy their applications, they can pull down their manifests or seamlessly deploy their applications to the target kubernetes cluster.

install cli

Install from the latest release artifacts:

  • Linux

    curl -LO https://github.com/zwachtel11/peg/releases/download/v0.0.1/peg
    mv peg /usr/local/bin/
  • macOS

    curl -LO https://github.com/zwachtel11/peg/releases/download/v0.0.1/peg-darwin
    mv peg-darwin /usr/local/bin/peg
  • Windows

    Add %USERPROFILE%\bin\ to your PATH environment variable so that peg.exe can be found.

    curl.exe -sLO  https://github.com/zwachtel11/peg/releases/download/v0.0.1/peg.exe
    copy peg.exe %USERPROFILE%\bin\
    set PATH=%USERPROFILE%\bin\;%PATH%
    
    

usage

Lets say you have a custom redis configuration that your team commonly uses on clusters.

For instance here is pods/config/redis-pod.yaml

apiVersion: v1
kind: Pod
metadata:
  name: redis
spec:
  containers:
  - name: redis
    image: redis:5.0.4
    command:
      - redis-server
      - "/redis-master/redis.conf"
    env:
    - name: MASTER
      value: "true"
    ports:
    - containerPort: 6379
    resources:
      limits:
        cpu: "0.1"
    volumeMounts:
    - mountPath: /redis-master-data
      name: data
    - mountPath: /redis-master
      name: config
  volumes:
    - name: data
      emptyDir: {}
    - name: config
      configMap:
        name: example-redis-config
        items:
        - key: redis-config
          path: redis.conf

Instead of copy and pasting this config from machine to machine or cloning git repos you decide to use peg to seamlessly push and pull your kubernetes manifests.

First use peg to login into your private OCI compliant container registry.

peg login pegimages.azurecr.io -u <CR_USERNAME> -p <CR_PASSWORD>

Once you are authenticated, you are ready to push manifests into the registry.

peg push --file pods/config/redis-pod.yaml --manifest pegimages.azurecr.io/myteam-redis:latest

For here, you should be able to pull your config just as you expect for a docker image.

peg pull --manifest pegimages.azurecr.io/myteam-redis:latest --outfile myteam-redis.yaml

Or if you already know the config is ready for deployment, cut out the middle step and use peg to deploy your application straight to your cluster.

peg deploy --manifest pegimages.azurecr.io/myteam-redis:latest --kubeconfig=kubeconfig

Or if your kubeconfig is already set in ~/.kube/config

peg deploy --manifest pegimages.azurecr.io/myteam-redis:latest

roadmap

  • Docker Secrets embedded in the deployment yamls for seamless private container pull.
  • "pegify" the helm chart experience with a simple push & pull flow for helm charts.
  • Post an issue!

peg's People

Contributors

zawachte avatar

Stargazers

Francis Begyn avatar Ross Crawford-d'Heureuse avatar Chris "Not So" Short avatar  avatar

Watchers

James Cloos avatar Zachary Wachtel avatar  avatar  avatar

peg's Issues

Helm Chart Support

Helm v2 carries so much bloat, add peg support for chart deployment.

User should be able to push, pull deploy charts in from an OCI compliant container registry without dealing with any of the baggage of helm "repos".

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.