{"id":26332544,"url":"https://github.com/ogticrd/kubectl-envsecret","last_synced_at":"2026-05-04T08:38:29.031Z","repository":{"id":243780794,"uuid":"809959691","full_name":"ogticrd/kubectl-envsecret","owner":"ogticrd","description":"Create Kubernetes secrets from .env files with multiline support.","archived":false,"fork":false,"pushed_at":"2025-05-19T06:43:51.000Z","size":201,"stargazers_count":0,"open_issues_count":5,"forks_count":0,"subscribers_count":3,"default_branch":"main","last_synced_at":"2025-06-10T15:08:53.103Z","etag":null,"topics":["cobra-cli","krew","krew-plugin","kubectl-plugin","kubectl-plugins","kubernetes"],"latest_commit_sha":null,"homepage":"","language":"Go","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/ogticrd.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,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null}},"created_at":"2024-06-03T19:26:36.000Z","updated_at":"2025-03-15T17:41:57.000Z","dependencies_parsed_at":"2024-06-11T05:34:30.487Z","dependency_job_id":"706875f0-a214-4195-b645-801412303c70","html_url":"https://github.com/ogticrd/kubectl-envsecret","commit_stats":null,"previous_names":["ogticrd/kubectl-envsecret"],"tags_count":8,"template":false,"template_full_name":null,"purl":"pkg:github/ogticrd/kubectl-envsecret","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ogticrd%2Fkubectl-envsecret","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ogticrd%2Fkubectl-envsecret/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ogticrd%2Fkubectl-envsecret/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ogticrd%2Fkubectl-envsecret/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/ogticrd","download_url":"https://codeload.github.com/ogticrd/kubectl-envsecret/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ogticrd%2Fkubectl-envsecret/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":278813794,"owners_count":26050631,"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","status":"online","status_checked_at":"2025-10-07T02:00:06.786Z","response_time":59,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"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":["cobra-cli","krew","krew-plugin","kubectl-plugin","kubectl-plugins","kubernetes"],"created_at":"2025-03-15T23:21:58.815Z","updated_at":"2025-10-07T17:33:32.971Z","avatar_url":"https://github.com/ogticrd.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"# kubectl-envsecret\n\n## Overview\n\n`kubectl-envsecret` is a Kubernetes plugin designed to simplify the creation of\nKubernetes secrets from `.env` files, including support for multiline\nenvironment variables. This tool streamlines the management of secrets, making\nit easier to handle configurations that include complex multiline values.\n\n## Features\n\n- Create Kubernetes secrets from `.env` files.\n- Support for multiline environment variables.\n- Easy integration with `kubectl` as a plugin.\n\n## Installation\n\nTo install `kubectl-envsecret`, you need to have Go installed on your machine.\nYou can then use the following command to install the plugin:\n\n```sh\ngo install github.com/ogticrd/kubectl-envsecret@latest\n```\n\n## Usage\n\n### Basic Usage\n\nThe primary command provided by `kubectl-envsecret` is `create`, which reads a\n`.env` file and creates a corresponding Kubernetes secret.\n\n```sh\nkubectl envsecret create --from-env-file \u003cpath-to-env-file\u003e --from-env-file \u003cpath-to-other-files\u003e\n```\n\n### Command Options\n\n- `--from-env-file`: Specifies the path(s) to the `.env` file. This option can\n  be used multiple times to specify multiple `.env` files.\n\n### Examples\n\n#### Create a Secret from a Single `.env` File\n\n```sh\nkubectl envsecret create --from-env-file /path/to/.env\n```\n\n#### Create a Secret from Multiple `.env` Files\n\n```sh\nkubectl envsecret create --from-env-file /path/to/.env --from-env-file /another/path/.env\n```\n\n## Development\n\n### Prerequisites\n\n- Go\n- Cobra CLI\n\n### Downloading the project\n\nFirst you need is cloning the project\n\n```sh\ngit clone https://github.com/ogticrd/kubectl-envsecret.git\ncd kubectl-envsecret\n```\n\n### Building the Project\n\nTo build the project, clone the repository and run:\n\n#### With `go` command\n\n```sh\ngo build -o kubectl-envsecret main.go\n```\n\n#### Using `make` command\n\n```sh\nmake build\n```\n\n### Running the Project\n\n#### With `go` command\n\n```sh\ngo run main.go\n```\n\n\u003e [!NOTE]\\\n\u003e Just run `./kubectl-envsecret` if you already built it.\n\n#### Using `make` command\n\n```sh\nmake run\n\n# For passing args and flags\nmake run CMD=\"create\" ARGS=\"secret-name\" FLAGS=\"--from-env-file /path/to/secret --namespace default\"\n```\n\n### Running Tests\n\nTo run the tests, use the following command:\n\n#### With `go` command\n\n```sh\ngo test ./...\n```\n\n#### Using `make` command\n\n```sh\nmake test\n```\n\n## Project Structure\n\n```plaintext\n.\n├── LICENSE\n├── Makefile\n├── README.md\n├── cmd\n│   ├── create.go\n│   └── root.go\n├── go.mod\n├── go.sum\n├── internal\n│   ├── k8sapi\n│   │   └── k8s.go\n│   ├── parser\n│   │   └── env.go\n│   └── utils\n│       └── utils.go\n└── main.go\n```\n\n- **cmd**: Contains the CLI command definitions.\n- **internal/k8sapi**: Contains a wrapper of the usage of Kubernetes API to\n  manage secrets.\n- **internal/parser**: Contains functions to parse `.env` files.\n- **internal/utils**: Contains utility functions used by the commands.\n\n## Contributing\n\nContributions are welcome! Please fork the repository and submit a pull request.\n\n## License\n\nThis project is licensed under the MIT License - see the [LICENSE](LICENSE) file\nfor details.\n\n## Acknowledgements\n\nThis project uses the following libraries:\n\n- [Cobra CLI](https://github.com/spf13/cobra) for creating the command-line\n  interface.\n- [Kubernetes CLI Runtime](https://github.com/kubernetes/cli-runtime) for\n  Kubernetes API interactions.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fogticrd%2Fkubectl-envsecret","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fogticrd%2Fkubectl-envsecret","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fogticrd%2Fkubectl-envsecret/lists"}