{"id":13615225,"url":"https://github.com/dragonflydb/dragonfly-operator","last_synced_at":"2025-04-13T21:30:33.016Z","repository":{"id":152671446,"uuid":"614317683","full_name":"dragonflydb/dragonfly-operator","owner":"dragonflydb","description":"A Kubernetes operator to install and manage Dragonfly instances.","archived":false,"fork":false,"pushed_at":"2025-04-02T07:29:41.000Z","size":425,"stargazers_count":171,"open_issues_count":49,"forks_count":48,"subscribers_count":17,"default_branch":"main","last_synced_at":"2025-04-02T08:28:41.037Z","etag":null,"topics":["dragonfly","in-memory","kubernetes","operator","redis"],"latest_commit_sha":null,"homepage":"https://www.dragonflydb.io/docs/managing-dragonfly/operator/installation","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/dragonflydb.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":"CONTRIBUTING.md","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}},"created_at":"2023-03-15T10:50:03.000Z","updated_at":"2025-04-02T07:29:44.000Z","dependencies_parsed_at":"2024-01-31T09:49:21.072Z","dependency_job_id":"98c6928b-045a-4a8c-be9c-f86b455ad7a8","html_url":"https://github.com/dragonflydb/dragonfly-operator","commit_stats":null,"previous_names":[],"tags_count":22,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dragonflydb%2Fdragonfly-operator","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dragonflydb%2Fdragonfly-operator/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dragonflydb%2Fdragonfly-operator/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dragonflydb%2Fdragonfly-operator/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/dragonflydb","download_url":"https://codeload.github.com/dragonflydb/dragonfly-operator/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248785834,"owners_count":21161355,"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":["dragonfly","in-memory","kubernetes","operator","redis"],"created_at":"2024-08-01T20:01:10.777Z","updated_at":"2025-04-13T21:30:32.410Z","avatar_url":"https://github.com/dragonflydb.png","language":"Go","funding_links":[],"categories":["Go"],"sub_categories":[],"readme":"\u003cp align=\"center\"\u003e\n  \u003ca href=\"https://dragonflydb.io\"\u003e\n    \u003cimg  src=\"/.github/images/logo-full.svg\"\n      width=\"284\" border=\"0\" alt=\"Dragonfly\"\u003e\n  \u003c/a\u003e\n\u003c/p\u003e\n\nDragonfly Operator is a Kubernetes operator used to deploy and manage [Dragonfly](https://dragonflydb.io/) instances inside your Kubernetes clusters.\nMain features include:\n\n- Automatic failover\n- Scaling horizontally and vertically with custom rollout strategy\n- Authentication and server TLS\n- Automatic snapshots to PVCs and S3\n- Monitoring with Prometheus and Grafana\n- Comprehensive configuration options\n\nYou can find more information about Dragonfly in the [official documentation](https://dragonflydb.io/docs/).\nThere is also a dedicated [Dragonfly Operator section](https://www.dragonflydb.io/docs/managing-dragonfly/operator/installation)\nthat contains more details and examples on how to use the operator.\n\n## Installation\n\nMake sure to have your Kubernetes cluster up and running. Dragonfly Operator can be installed by running\n\n```sh\n# Install the CRD and Operator\nkubectl apply -f https://raw.githubusercontent.com/dragonflydb/dragonfly-operator/main/manifests/dragonfly-operator.yaml\n```\n\nBy default, the operator will be installed in the `dragonfly-operator-system` namespace.\n\n## Usage\n\n### Creating a Dragonfly instance\n\nTo create a sample Dragonfly instance, you can run the following command:\n\n```sh\nkubectl apply -f https://raw.githubusercontent.com/dragonflydb/dragonfly-operator/main/config/samples/v1alpha1_dragonfly.yaml\n```\n\nThis will create a Dragonfly instance with 3 replicas. You can check the status of the instance by running\n\n```sh\nkubectl describe dragonflies.dragonflydb.io dragonfly-sample\n```\n\nA service of the form `\u003cdragonfly-name\u003e.\u003cnamespace\u003e.svc.cluster.local` will be created, that selects the master instance. You can use this service to connect to the cluster. As pods are added/removed, the service will automatically update to point to the new master.\n\n#### Connecting with `redis-cli`\n\nTo connect to the cluster using `redis-cli`, you can run:\n\n```sh\nkubectl run -it --rm --restart=Never redis-cli --image=redis:7.0.10 -- redis-cli -h dragonfly-sample.default\n```\n\nThis will create a temporary pod that runs `redis-cli` and connects to the cluster. After pressing `shift + R`, You can then run Redis commands as\nusual. For example, to set a key and get it back, you can run\n\n```sh\nIf you don't see a command prompt, try pressing enter.\ndragonfly-sample.default:6379\u003e GET 1\n(nil)\ndragonfly-sample.default:6379\u003e SET 1 2\nOK\ndragonfly-sample.default:6379\u003e GET 1\n\"2\"\ndragonfly-sample.default:6379\u003e exit\npod \"redis-cli\" deleted\n```\n\n### Scaling up/down the number of replicas\n\nTo scale up/down the number of replicas, you can edit the `spec.replicas` field in the Dragonfly instance. For example, to scale up to 5 replicas, you can run\n\n```sh\nkubectl patch dragonfly dragonfly-sample --type merge -p '{\"spec\":{\"replicas\":5}}'\n```\n\n### Vertically scaling the instance\n\nTo vertically scale the instance, you can edit the `spec.resources` field in the Dragonfly instance. For example, to increase the memory limit to 2GiB, you can run\n\n```sh\nkubectl patch dragonfly dragonfly-sample --type merge -p '{\"spec\":{\"resources\":{\"requests\":{\"memory\":\"1Gi\"},\"limits\":{\"memory\":\"2Gi\"}}}}'\n```\n\n### Configuring instance authentication\n\nTo add authentication to the dragonfly pods, you either set the `DFLY_requirepass` environment variable, or add the `--requirepass` argument.\n\n### Deleting a Dragonfly instance\n\nTo delete a Dragonfly instance, you can run\n\n```sh\nkubectl delete dragonfly dragonfly-sample\n```\n\nThis will automatically delete all the resources (i.e pods and services) associated with the instance.\n\n### Uninstalling the operator\n\nTo uninstall the operator, you can run\n\n```sh\nkubectl delete -f https://raw.githubusercontent.com/dragonflydb/dragonfly-operator/main/manifests/dragonfly-operator.yaml\n```\n\n## License\n\nCopyright 2023 DragonflyDB authors.\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\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","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdragonflydb%2Fdragonfly-operator","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fdragonflydb%2Fdragonfly-operator","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdragonflydb%2Fdragonfly-operator/lists"}