• Stars
    star
    114
  • Rank 308,031 (Top 7 %)
  • Language
    Go
  • License
    Apache License 2.0
  • Created over 3 years ago
  • Updated almost 2 years ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

Kubernetes Container Registry

k8scr

A kubectl plugin for pushing OCI images through the Kubernetes API server.

Quickstart

  1. Build k8scr
make build
  1. Move to location in PATH
sudo mv ./build/k8scr /usr/local/bin/kubectl-k8scr
  1. Deploy simple in-memory registry into cluster
kubectl apply -f distribution.yaml

Optional: tail logs to observe results of next step with kubectl logs k8scr -f.

  1. Push image to registry
kubectl k8scr push crossplane/crossplane:v1.2.1

Usage

Usage: k8scr <command>

Push and pull images through the Kubernetes API server.

Flags:
  -h, --help                   Show context-sensitive help.
      --kubeconfig=STRING      Override default kubeconfig path.
  -n, --namespace="default"    Namespace of registry Pod.
  -r, --registry="k8scr"       Name of registry Pod.

Commands:
  push <image>

  pull <image>

How Does This Work?

k8scr uses go-containerregistry to push and pull images, but passes in an http.RoundTripper that reconstructs OCI distribution compliant requests so that they pass through the Kubernetes API server Pod proxy endpoint, before eventually calling the underlying transport constructed from a user's kubeconfig. This allows for pushing and pulling directly to and from an OCI image registry running in a Kubernetes cluster without having to expose it publicly or privately. Any user with access to the cluster and pods/proxy RBAC permissions for the registry Pod is able to push and pull.

What Else Can It Do?

Pretty much any of the operations go-containerregistry supports could also be supported here as the transport is pluggable. I'll likely move it upstream or offer it as a stand-alone library if there is enough interest.

More Repositories

1

veneer

A library for representing OCI image layers in an abstract filesystem
Go
29
star
2

k8s-cr-validator

@kubernetes custom resource validation example
Go
12
star
3

crisscross

@crossplane Providers as a Function (PaaF)
Go
10
star
4

crossfaas

Go
9
star
5

fpgk8s

The easiest way to use FPGAs on @kubernetes.
Rust
6
star
6

crossplane-offline

A set of tools and documentation for learning @crossplane without a network connection.
Shell
5
star
7

vault-plugin-secrets-covert

An example HashiCorp Vault plugin for storing secrets in a Go map.
Go
5
star
8

crank

The next generation package manager for @crossplane
Go
3
star
9

waterlooContracts

JavaScript
3
star
10

danielmangum.com

HTML
3
star
11

kc-provider-github

@github provider for @crossplane - Kubecon NA 2020
Go
3
star
12

crossflux

@crossplane and @fluxcd
3
star
13

HashedDan.github.io

HTML
2
star
14

athodyd

Table-driven integration tests for Kubernetes controllers and CustomResourceDefinitions.
Go
2
star
15

stack-kubernetes-remote

2
star
16

security-context

An examination of (almost) every possible configuration of Kubernetes security context. (WIP)
Dockerfile
2
star
17

crosscd-archive

Infrastructure environments continuously deployed by @crossplaneio
2
star
18

certainly

can i haz certs? certainly!
Go
1
star
19

my-org

Cloud Native Platform for MyOrg.
1
star
20

cignal

1
star
21

lucidball

See the stats.
JavaScript
1
star
22

airtable-go

Go client for the Airtable Standard API
Go
1
star
23

xp-package-ports

Ports of @crossplane packages to the v2 format.
Makefile
1
star
24

quisc

A QUIC implementation in RISC-V assembly
Makefile
1
star
25

kaboose

1
star
26

zigsbi

Rust implementation of @riscv Service Binary Interface
1
star
27

crocket

CoAP Over WebSockets Forward-Proxy
1
star
28

capi-configs

@crossplane configuration packages for @kubernetes-sigs CAPI
1
star
29

podslate

The universal podcast URL translator.
Clojure
1
star
30

tepl

Tweet Eval Print Loop
Makefile
1
star
31

stream-build-on-upbound

Go
1
star
32

k8s-rust-mutating-webhook

An example of writing a @kubernetes mutating webhook in @rust-lang.
1
star
33

banterzone-media

JavaScript
1
star
34

stack-cluster-api

A Crossplane stack for provisioning and connecting to new Kubernetes clusters using the Cluster API project
1
star
35

riside

A @riscv IDE in the browser.
Rust
1
star
36

zicoprobe

picoprobe, but @zephyrproject-rtos
1
star