{"id":13557815,"url":"https://github.com/coreos/kpm","last_synced_at":"2025-04-03T12:31:10.709Z","repository":{"id":62574636,"uuid":"53004827","full_name":"coreos/kpm","owner":"coreos","description":"KPM is a tool to deploy and manage application stacks on Kubernetes.","archived":true,"fork":false,"pushed_at":"2018-01-04T20:31:12.000Z","size":462,"stargazers_count":124,"open_issues_count":38,"forks_count":27,"subscribers_count":9,"default_branch":"master","last_synced_at":"2025-04-01T23:36:49.694Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","language":"Python","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/coreos.png","metadata":{"files":{"readme":"README.md","changelog":"Changelog.md","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":"2016-03-02T23:39:24.000Z","updated_at":"2023-07-05T16:16:53.000Z","dependencies_parsed_at":"2022-11-03T20:11:30.340Z","dependency_job_id":null,"html_url":"https://github.com/coreos/kpm","commit_stats":null,"previous_names":[],"tags_count":16,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/coreos%2Fkpm","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/coreos%2Fkpm/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/coreos%2Fkpm/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/coreos%2Fkpm/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/coreos","download_url":"https://codeload.github.com/coreos/kpm/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247002241,"owners_count":20867431,"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-01T12:04:33.825Z","updated_at":"2025-04-03T12:31:09.623Z","avatar_url":"https://github.com/coreos.png","language":"Python","readme":"## \u003cimg src=\"Documentation/achtung.png\" alt=\"WARNING\" width=\"30\" height=\"30\"\u003e\u003cimg src=\"Documentation/achtung.png\" alt=\"WARNING\" width=\"30\" height=\"30\"\u003e\u003cimg src=\"Documentation/achtung.png\" alt=\"WARNING\" width=\"30\" height=\"30\"\u003e Deprecation warning \u003cimg src=\"Documentation/achtung.png\" alt=\"WARNING\" width=\"30\" height=\"30\"\u003e\u003cimg src=\"Documentation/achtung.png\" alt=\"WARNING\" width=\"30\" height=\"30\"\u003e\u003cimg src=\"Documentation/achtung.png\" alt=\"WARNING\" width=\"30\" height=\"30\"\u003e\u003ca name=\"deprecation-warning\"\u003e\u003c/a\u003e\nkpm is no longer developed or maintained by CoreOS.\n\n[![Build Status](https://travis-ci.org/coreos/kpm.svg?branch=master)](https://travis-ci.org/coreos/kpm)\n\nif you have any question you can **chat** with us  [![SlackStatus](https://slack.kubespray.io/badge.svg)](https://kubespray.slack.com)\n\n# KPM\n\nKPM is a tool to deploy and manage application stacks on kubernetes.\n\nKPM provides the glue between kubernetes resources (ReplicaSet, DaemonSet, Secrets...). It defines a package as a composition of kubernetes resources and dependencies to other packages.\n\n##### Versioning and rollbacks\n\nKPM uses a global registry, packages are immediately accessible and visible to the community. Versioning is strong and was easy to implement: https://cnr.kubespray.com\n\n\n##### Clustered applications and persistent-storage !\n\n  - How to scale database slaves(postgresql/mysql/redis) ?\n  - How to deploy a production-grade elasticsearch/rabbitmq/zookeep/etcd/ clusters on kubernetes?\nIt requires stable network identity and a unique storage per pod!\n\n---\u003e KPM creates multiple variation of a single template with simplicity\n\nCreating a 3 node rabbitmq cluster is easy:\n\n1. List the resources\n2. Add the keyword `sharded: true` to enable unique variation\n3. List the shards and define\n\n```\nresources:\n  - name: rabbitmq\n    file: rabbitmq-rc.yaml\n    type: replicationcontroller\n    sharded: yes\n\n  - name: rabbitmq\n    file: rabbitmq-svc.yaml\n    type: service\n    sharded: yes\n\n  # LB to any of the rabbitmq shard\n  - name: rabbitmq\n    file: rabbitmq-umbrella-svc.yaml\n    type: service\n\nshards:\n  - name: hare\n    variables:\n      data_volume: {name: data, persistentVolumeClaim: {claimName: claim-hare}}\n  - name: bunny\n    variables:\n      data_volume:  {name: data, persistentVolumeClaim: {claimName: claim-bunny}}\n- name: rabbit-on-ram\n    variables:\n       data_volume: {name: data, emptyDir: \"\"}\n       args: [--ram]\n```\nDemo:\n[![asciicast](https://asciinema.org/a/2ktj7kr2d2m3w25xrpz7mjkbu.png)](https://asciinema.org/a/2ktj7kr2d2m3w25xrpz7mjkbu?speed=2)\n\n\n##### Server-side\nKPM is an API with an command line interface, its major difference in terms of design and possible integration.\n\n--\u003e We wanted a tool that could be integrated anywhere, for that KPM is building the package server side.\nClients are brainless and easy to implement. As a POC we integrated KPM to a fork of https://github.com/kubernetes/dashboard in less than a day:\nhttps://youtu.be/7SJ6p38W-WM\n\n\n## Install kpm\n\n##### From Pypi\n\nkpm is a python2 package and available on pypi\n```\n$ sudo pip install kpm -U\n````\n\n##### From git\n\n```\ngit clone https://github.com/coreos/kpm.git kpm-cli\ncd kpm-cli\nsudo make install\n```\n\n### Configuration\n\nKPM uses `kubectl` to communicate with the kubernetes cluster.\nCheck if the cluster is accessible:\n```bash\n$ kubectl version\nClient Version: version.Info{Major:\"1\", Minor:\"1\", GitVersion:\"v1.1.4\", GitCommit:\"a5949fea3a91d6a50f40a5684e05879080a4c61d\", GitTreeState:\"clean\"}\nServer Version: version.Info{Major:\"1\", Minor:\"1\", GitVersion:\"v1.1.4\", GitCommit:\"a5949fea3a91d6a50f40a5684e05879080a4c61d\", GitTreeState:\"clean\"}\n\n```\n\n### List packages\n\n- All packages: `kpm list`\n- Filter by user: `kpm -u username`\n\nThe website [https://kpm.kubespray.io](https://kpm.kubespray.io) has more advanced search and browsing featutres than the CLI.\n\n### Deploy an application\n\n`kpm deploy package_name [-v VERSION] [--namespace namespace]`\n```\n$ kpm deploy ant31/rocketchat --namespace myns\ncreate ant31/rocketchat\n\npackage           version    type                   name        namespace    status\n----------------  ---------  ---------------------  ----------  -----------  --------\nant31/mongodb     1.0.0      namespace              myns        myns         created\nant31/mongodb     1.0.0      service                mongodb     myns         created\nant31/mongodb     1.0.0      replicationcontroller  mongodb     myns         created\nant31/rocketchat  1.6.2      namespace              myns        myns         ok\nant31/rocketchat  1.6.2      service                rocketchat  myns         created\nant31/rocketchat  1.6.2      replicationcontroller  rocketchat  myns         created\n```\n\nIt deploys the package and its dependencies.\nThe command can be executed multiple times, kpm detects changes in resource and apply only the modified ones.\n\n### Uninstall an application\n\nThe opposite action to `deploy` is the `remove` command. It performs a delete on all resources created by `deploy`.  It's possible to mark some resources as `protected`.\n\n`Namespace` resources are protected by default.\n\n```\nkpm remove ant31/rocketchat --namespace demo\npackage           version    type                   name        namespace    status\n----------------  ---------  ---------------------  ----------  -----------  ---------\nant31/mongodb     1.0.0      namespace              myns        myns         protected\nant31/mongodb     1.0.0      service                mongodb     myns         deleted\nant31/mongodb     1.0.0      replicationcontroller  mongodb     myns         deleted\nant31/rocketchat  1.6.2      namespace              myns        myns         protected\nant31/rocketchat  1.6.2      service                rocketchat  myns         deleted\nant31/rocketchat  1.6.2      replicationcontroller  rocketchat  myns         deleted\n```\n","funding_links":[],"categories":["Python","others","Configuration Management"],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcoreos%2Fkpm","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fcoreos%2Fkpm","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcoreos%2Fkpm/lists"}