{"id":18947257,"url":"https://github.com/sparkfabrik/docker-cloud-tools","last_synced_at":"2026-02-27T14:03:00.206Z","repository":{"id":38307955,"uuid":"463571884","full_name":"sparkfabrik/docker-cloud-tools","owner":"sparkfabrik","description":"Cloud and kubernetes toolkit","archived":false,"fork":false,"pushed_at":"2026-01-29T20:30:51.000Z","size":142,"stargazers_count":1,"open_issues_count":2,"forks_count":1,"subscribers_count":5,"default_branch":"main","last_synced_at":"2026-01-30T08:49:41.631Z","etag":null,"topics":["aws","eks","gcloud","gke","k8s"],"latest_commit_sha":null,"homepage":"","language":"Shell","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"gpl-3.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/sparkfabrik.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,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2022-02-25T14:56:24.000Z","updated_at":"2026-01-14T08:34:00.000Z","dependencies_parsed_at":"2023-12-14T12:24:38.215Z","dependency_job_id":"e8264c29-976a-498d-b561-2680c1eb17f4","html_url":"https://github.com/sparkfabrik/docker-cloud-tools","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/sparkfabrik/docker-cloud-tools","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sparkfabrik%2Fdocker-cloud-tools","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sparkfabrik%2Fdocker-cloud-tools/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sparkfabrik%2Fdocker-cloud-tools/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sparkfabrik%2Fdocker-cloud-tools/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/sparkfabrik","download_url":"https://codeload.github.com/sparkfabrik/docker-cloud-tools/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sparkfabrik%2Fdocker-cloud-tools/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":29898857,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-02-27T12:09:13.686Z","status":"ssl_error","status_checked_at":"2026-02-27T12:09:13.282Z","response_time":57,"last_error":"SSL_read: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"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":["aws","eks","gcloud","gke","k8s"],"created_at":"2024-11-08T13:09:24.973Z","updated_at":"2026-02-27T14:03:00.171Z","avatar_url":"https://github.com/sparkfabrik.png","language":"Shell","funding_links":[],"categories":[],"sub_categories":[],"readme":"# cloud-tools\n\n## Usage\n\nYou can provide the cluster configuration and the authentication for the cloud vendor using environment variables. You can also use the `.env.template` file as a reference to create a `.env`.\n\n### GKE configuration\n\n```bash\ndocker run --rm -it \\\n    -v ~/.config/gcloud:/root/.config/gcloud \\\n    -e CLUSTER_TYPE=GKE \\\n    -e GCP_PROJECT=\u003cGCP project of the GKE cluster\u003e\n  ghcr.io/sparkfabrik/cloud-tools:latest\n```\n\n### EKS configuration\n\n```bash\ndocker run --rm -it \\\n    -e CLUSTER_TYPE=EKS \\\n    -e AWS_ACCESS_KEY_ID=\u003cAWS_ACCESS_KEY_ID\u003e \\\n    -e AWS_SECRET_ACCESS_KEY=\u003cAWS_SECRET_ACCESS_KEY\u003e \\\n    -e AWS_DEFAULT_REGION=\u003cAWS_DEFAULT_REGION\u003e \\\n  ghcr.io/sparkfabrik/cloud-tools:latest\n```\n\n### Configuration environment variables\n\n- `CLUSTER_NAME`: the name of the cluster that you want to configure (**optional**, if the variable is not provided, the first cluster in the `list` command will be configured; e.g.: `prod-cluster`).\n- `CLUSTER_LOCATION` (only for GCP): the location of the cluster (**optional**, if the variable is not provided, the location will be searched using the cluster name; e.g.: `europe-west4-a`).\n- `AVAILABLE_NAMESPACES`: the list of the available namespaces as space separated values (e.g.: `default stage production`).\n- `STARTUP_NAMESPACE`: the namespace configured at CLI startup (e.g.: `stage`).\n- `ORIGINAL_KUBENS`: if you want to use the original `kubens` command, set this variable to `1`. The default shipped `kubens` command is a custom script that uses the `AVAILABLE_NAMESPACES` environment variable to list the available namespaces to limit choices. It is useful to increase the developer experience when your teams have access only to few namespaces.\n\n### GCP secret\n\nYou can use a GCP secret to store AWS credentials and the additional configuration. The secret payload must follow this structure:\n\n```json\n{\n  \"AWS_ACCESS_KEY_ID\": \u003cAWS_ACCESS_KEY_ID\u003e,\n  \"AWS_SECRET_ACCESS_KEY\": \u003cAWS_SECRET_ACCESS_KEY\u003e,\n  \"AWS_DEFAULT_REGION\": \u003cAWS_DEFAULT_REGION\u003e,\n  \"AVAILABLE_NAMESPACES\": [ \u003cThe available namsespaces as a list of strings\u003e ],\n  \"STARTUP_NAMESPACE\": \u003cNamespace configured at startup\u003e\n}\n```\n\nTo use the secret you have to run the docker container using the following environment variables:\n\n- `SECRET_PROJECT`: the GCP project which hosts the secret\n- `SECRET_NAME`: the secret name\n- `SECRET_VER`: the secret version (**optional**, if the variable is not provided, the latest version will be used)\n\n```bash\ndocker run --rm -it \\\n    -v ~/.config/gcloud:/root/.config/gcloud \\\n    -e CLUSTER_TYPE=EKS \\\n    -e SECRET_PROJECT=\u003cGCP Project id which hosts the secret\u003e\n    -e SECRET_NAME=\u003cGCP secret name\u003e\n    -e SECRET_VER=\u003cGCP secret version\u003e\n  ghcr.io/sparkfabrik/cloud-tools:latest\n```\n\n## Bash history\n\nIf you want to maintain the bash history from one run to another, you can mount a local folder in `/root/dotfiles`. The docker image is configured to save the `HISTFILE` in `/root/dotfiles/.bash_history`.\n\n## Tools\n\nThis image is intended to be a cloud toolkit with some helpers to work with [Google Kubernetes Engine (GKE)](https://cloud.google.com/kubernetes-engine) and [Amazon Elastic Kubernetes Service (EKS)](https://aws.amazon.com/eks/).\n\nThe image is based on the `google/cloud-sdk` docker image. You can use the [gcloud CLI](https://cloud.google.com/sdk/gcloud) and the [AWS CLI](https://docs.aws.amazon.com/cli/latest/reference/) commands to work with your cloud vendor. If your user has access to a **GKE** or **EKS** cluster, the docker image tries to configure the proper `KUBECONFIG` at startup.\n\nIn the final docker image, you will also find the following tools:\n\n- gcloud ([GCP CLI](https://cloud.google.com/sdk/gcloud))\n- gsutil ([Google Cloud Storage Utility](https://cloud.google.com/storage/docs/gsutil))\n- aws ([AWS CLI](https://docs.aws.amazon.com/cli/latest/reference/))\n- kubectl\n- kubens (custom script which uses `AVAILABLE_NAMESPACES` environment variable as the list of namespaces)\n- helm\n- stern\n\n### GKE helper (CLUSTER_TYPE: GKE)\n\nIf you have configured your gcloud authentication and your user can access a cluster, the first GKE cluster listed using the `gcloud container clusters list` command will be automatically configured as default in the `kubeconfig` file.\n\nIf you need to configure another cluster you can use the `gcloud container clusters list` command to see the list of all the available clusters. Use `gcloud container clusters get-credentials \"\u003cput here the cluster name\u003e\" --project \"${GCP_PROJECT}\" --zone \"\u003cput here the GCP project name\u003e\"` to update the configuration.\n\nYou can also specify the `CLUSTER_NAME` environment variable to force the cluster configuration.\n\n### EKS helper (CLUSTER_TYPE: EKS)\n\nIf the IAM user configured to run inside the docker image has access to an EKS cluster, the first EKS cluster listed using the `aws eks list-clusters` command will be automatically configured as default in the `kubeconfig` file.\n\nIf you need to configure another cluster you can use the `aws eks list-clusters` command to see the list of all the available clusters. Use `aws eks update-kubeconfig --name \"\u003cput here the cluster name\u003e\" --kubeconfig \"${KUBECONFIG}\"` to update the configuration.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsparkfabrik%2Fdocker-cloud-tools","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fsparkfabrik%2Fdocker-cloud-tools","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsparkfabrik%2Fdocker-cloud-tools/lists"}