{"id":15010020,"url":"https://github.com/ycliuhw/kforce","last_synced_at":"2025-04-09T17:53:51.747Z","repository":{"id":51264572,"uuid":"121711215","full_name":"ycliuhw/kforce","owner":"ycliuhw","description":"To use manifest (yaml/JSON template) to manage K8s Cluster via kops","archived":false,"fork":false,"pushed_at":"2024-01-11T17:26:19.000Z","size":230,"stargazers_count":5,"open_issues_count":3,"forks_count":3,"subscribers_count":4,"default_branch":"dev","last_synced_at":"2025-03-23T20:01:33.911Z","etag":null,"topics":["aws","gitops","k8s","kops","kubernetes","manifest","python-3-6","template"],"latest_commit_sha":null,"homepage":"https://pypi.python.org/pypi/kforce","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/ycliuhw.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":"CODE_OF_CONDUCT.md","threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2018-02-16T03:27:52.000Z","updated_at":"2024-10-31T09:08:17.000Z","dependencies_parsed_at":"2024-12-03T18:44:06.942Z","dependency_job_id":"f8d795fa-bf76-45e3-92ba-1062c8def5b9","html_url":"https://github.com/ycliuhw/kforce","commit_stats":{"total_commits":102,"total_committers":5,"mean_commits":20.4,"dds":0.2941176470588235,"last_synced_commit":"6b35e9c5f8c8f9ac712c207b8f82878b8ae5f9ea"},"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ycliuhw%2Fkforce","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ycliuhw%2Fkforce/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ycliuhw%2Fkforce/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ycliuhw%2Fkforce/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/ycliuhw","download_url":"https://codeload.github.com/ycliuhw/kforce/tar.gz/refs/heads/dev","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247974731,"owners_count":21026742,"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":["aws","gitops","k8s","kops","kubernetes","manifest","python-3-6","template"],"created_at":"2024-09-24T19:29:33.137Z","updated_at":"2025-04-09T17:53:51.718Z","avatar_url":"https://github.com/ycliuhw.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Kubernetes\n\n![build-status](http://nginx.k8s.example.com/api/badges/ycliuhw/kforce/status.svg?branch=master)\n[![MIT Licence](https://badges.frapsoft.com/os/mit/mit.svg?v=103)](https://opensource.org/licenses/mit-license.php)\n[![Open Source Love](https://badges.frapsoft.com/os/v1/open-source.svg?v=103)](https://github.com/ellerbrock/open-source-badges/)\n\n\n## Create and manage K8S cluster using templates in an automated way ^.^\n\n----\n\n\u003e \u003chttps://github.com/kubernetes/kops/blob/master/docs/cluster_spec.md\u003e\n\n### Requirements\n\n----\n\n* [kops](https://github.com/kubernetes/kops/)\n* python3.6\n\n### Installation\n\n----\n\n#### from pypi\n\n----\n\n```bash\npip install kforce\n```\n\n#### from source\n\n----\n\n```bash\ngit clone https://github.com/ycliuhw/kforce.git\ncd kforce\n\nvirtualenv -p $(which python3.6) venv\nsource venv/bin/activate\npython setup.py install\n```\n\n### Usage\n\n----\n\n#### create `kops` iam group, attach related policies, create user then add user to group:\n\n```bash\nAWS_PROFILE=[admin] make ensure_iam\n```\n\n#### create access key for `kops` user\n\n```bash\nAWS_PROFILE=[admin] make create_access_key\n```\n\n#### initialize templates dirs for a new cluster\n\n```bash\nAWS_PROFILE=[kops] kforce initialize --account-name=[aws-account1] --env=[s|p|u|m] --vpc-id=vpc-xxxx [--force=True]\n```\n\n#### build kops template\n\n```bash\nAWS_PROFILE=[kops] kforce build --account-name=[aws-account1] --env=[s|p|u|m] --vpc-id=vpc-xxxx\n```\n\n#### diff kops template\n\n```bash\nAWS_PROFILE=[kops] kforce diff --account-name=[aws-account1] --env=[s|p|u|m] --vpc-id=vpc-xxxx\n```\n\n#### apply kops template to create the cluster\n\n```bash\nAWS_PROFILE=[kops] kforce apply --account-name=[aws-account1] --env=[s|p|u|m] --vpc-id=vpc-xxxx\n```\n\n### directory structure\n\n----\n\n```text\n├── Makefile\n├── README.md\n├── addons  # some required pre-installed addon packages (monitoring, logging, helm server - tiller etc.)\n│   ├── README.md\n│   └── cluster_role.yaml\n├── __generated__  # WARNING: supposed for version control auto-generated templates(`GitOps` -\u003e version controlled infra), DO NOT make any changes here\n│   ├── README.md\n│   ├── aws-account1-s.yaml\n├── bin\n│   └── kforce\n├── kforce\n│   ├── aws_facts.py\n│   ├── renderer.py\n│   └── utils.py\n├── requirements.txt\n├── setup.cfg\n├── templates  # cluster global definition\n│   ├── cluster.yaml  # template\n│   ├── values.yaml.j2  # configure\n│   └── addons\n│       ├── README.md\n│       ├── autoscaler.yaml\n│       ├── dashboard.yaml\n│       ├── external-dns.yaml\n│       ├── fluentd.yaml\n│       ├── ingress-nginx-external.yaml\n│       └── ingress-nginx-internal.yaml\n└── vars  # new cluster configure customization goes here\n    ├── aws-account2\n    │   └── m.yaml\n    ├── aws-account1\n    │   ├── m-addons\n    │   │   ├── grafama.yaml\n    │   │   ├── influxdb.yaml\n    │   │   ├── jenkins.yaml\n    │   │   └── prometheus.yaml\n    │   ├── s.yaml  # IMPORTANT: `aws-account1-[s]taging` cluster configure - naming convention ([env].yaml)\n    │   ├── s-snippets  # IMPORTANT: any additional `instance group` defines here(high memory, spot, etc.)\n    │   │   └── ig-spot.yaml  # spot instance group definition\n    │   │   └── ig-high-memory.yaml  # high memory instance group definition\n    │   ├── u.yaml  # `aws-account1-[u]at` cluster with standard 3*node IG and spot IG\n    │   ├── u-snippets\n    │   │   └── ig-spot.yaml\n    │   └── m.yaml  # `aws-account1-[m]anagement` cluster with standard 3*node IG\n    └── aws-account3\n        └── s.yaml\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fycliuhw%2Fkforce","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fycliuhw%2Fkforce","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fycliuhw%2Fkforce/lists"}