{"id":13645061,"url":"https://github.com/rancher/kim","last_synced_at":"2025-04-21T11:32:43.966Z","repository":{"id":38405592,"uuid":"333185595","full_name":"rancher/kim","owner":"rancher","description":"In ur kubernetes, buildin ur imagez","archived":true,"fork":false,"pushed_at":"2022-01-07T16:55:10.000Z","size":341,"stargazers_count":325,"open_issues_count":19,"forks_count":19,"subscribers_count":11,"default_branch":"main","last_synced_at":"2025-03-21T23:35:40.399Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Go","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/rancher.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2021-01-26T18:56:37.000Z","updated_at":"2024-12-27T21:35:07.000Z","dependencies_parsed_at":"2022-08-26T17:01:01.453Z","dependency_job_id":null,"html_url":"https://github.com/rancher/kim","commit_stats":null,"previous_names":[],"tags_count":20,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rancher%2Fkim","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rancher%2Fkim/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rancher%2Fkim/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rancher%2Fkim/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/rancher","download_url":"https://codeload.github.com/rancher/kim/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":250048034,"owners_count":21366163,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-08-02T01:02:25.018Z","updated_at":"2025-04-21T11:32:43.938Z","avatar_url":"https://github.com/rancher.png","language":"Go","funding_links":[],"categories":["others","Go"],"sub_categories":[],"readme":"kim - The Kubernetes Image Manager\n==================================\n\n***STATUS: EXPERIMENT - Let us know what you think***\n\nThis project is a continuation of the experiment started with `k3c`, however, unlike the original aim/design for `k3c`,\nit ***IS NOT*** meant to be a replacement or re-build of the [containerd](https://containerd.io)/CRI.\n\n`kim` is a Kubernetes-aware CLI that will install a small builder backend consisting of a [BuildKit](https://github.com/moby/buildkit)\ndaemon bound to the Kubelet's underlying containerd socket (for building images) along with a small server-side agent\nthat the CLI leverages for image management (think push, pull, etc) rather than talking to the backing containerd/CRI\ndirectly. `kim` enables building images locally, natively on your [`k3s`](https://k3s.io) cluster.\n\n## A familiar UX\n\nThere really is nothing better than the classic Docker UX of `build/push/pull/tag`.\nThis tool copies the same UX as classic Docker (think Docker v1.12). The intention\nis to follow the same style but not be a 100% drop in replacement.  Behaviour and\narguments have been changed to better match the behavior of the Kubernetes ecosystem.\n\n## A single binary\n\n`kim`, similar to `k3s` and old school docker, is packaged as a single binary, because nothing is easier for\ndistribution than a static binary.\n\n## Built on Kubernetes Tech (and others)\n\nFundamentally `kim` is a built on the [Container Runtime Interface (CRI)](https://github.com/kubernetes/cri-api),\n[containerd](https://github.com/containerd/containerd), and [buildkit](https://github.com/moby/buildkit).\n\n## Architecture\n\n`kim` enables building `k3s`-local images by installing a DaemonSet Pod that runs both `buildkitd` and `kim agent`\nand exposing the gRPC endpoints for these active agents in your cluster via a Service. Once installed, the `kim` CLI\ncan inspect your installation and communicate with the backend daemons for image building and manipulation with merely\nthe KUBECONFIG that was available when installing the builder. When building `kim` will talk directly to the `buildkit`\nservice but all other interactions with the underlying containerd/CRI are mediated by the `kim agent` (primarily\nbecause the `containerd` \"smart client\" code assumes a certain level of co-locality with the `containerd` installation).\n\n## Building\n\n```bash\n# more to come on this front but builds are currently a very manual affair\n# git clone --branch=main https://github.com/rancher/kim.git ~/Projects/rancher/kim\n# cd ~/Projects/rancher/kim\ngo generate # only necessary when modifying the gRPC protobuf IDL, see Dockerfile for pre-reqs\nmake ORG=\u003cyour-dockerhub-org\u003e build publish\n```\n\n## Running\n\nHave a working `k3s` installation with a working `$HOME/.kube/config` or `$KUBECONFIG`, then:\n\n```bash\n# Installation on a single-node cluster is automatic\n# Installation on a multi-node cluster, targeting a Node named \"my-builder-node\"\nkim builder install --selector k3s.io/hostname=my-builder-node\n\n```\n\n`kim` currently works against a single builder Node so you must specify a narrow selector when\ninstalling on multi-node clusters. Upon successful installation this node will acquire the \"builder\" role.\n\nBuild images like you would with the Docker CLI:\n\n```\n$ ./bin/kim --help\nKubernetes Image Manager -- in ur kubernetes buildin ur imagez\n\nUsage:\n  kim [OPTIONS] COMMAND\n  kim [command]\n\nExamples:\n  kim image build --tag your/image:tag .\n\nAvailable Commands:\n  builder     Manage Builder(s)\n  help        Help about any command\n  image       Manage Images\n\nImages Shortcuts:\n  build       Build an image\n  images      List images\n  pull        Pull an image\n  push        Push an image\n  rmi         Remove an image\n  tag         Tag an image\n\nFlags:\n  -x, --context string      kubeconfig context for authentication\n      --debug               \n      --debug-level int     \n  -h, --help                help for kim\n  -k, --kubeconfig string   kubeconfig for authentication\n  -n, --namespace string    namespace (default \"kube-image\")\n  -v, --version             version for kim\n\nUse \"kim [command] --help\" for more information about a command.\n```\n\n## Roadmap\n\n- Automated functional/integration tests to be invoked from CI to catch/prevent regressions.\n- Image export/import, save/load functionality.\n- Smarter automatic-ish bootstrap for non-k3s installations (think EKS support)\n- Scheduling image content to non-builder (or simply, other) nodes in the cluster\n\n# License\n\nCopyright (c) 2020-2021 [Rancher Labs, Inc.](http://rancher.com)\n\nLicensed under the Apache License, Version 2.0 (the \"License\");\nyou may not use this file except in compliance with the License.\nYou may obtain a copy of the License at\n\n[http://www.apache.org/licenses/LICENSE-2.0](http://www.apache.org/licenses/LICENSE-2.0)\n\nUnless required by applicable law or agreed to in writing, software\ndistributed under the License is distributed on an \"AS IS\" BASIS,\nWITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\nSee the License for the specific language governing permissions and\nlimitations under the License.\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Francher%2Fkim","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Francher%2Fkim","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Francher%2Fkim/lists"}