All Projects → sorenmat → K8s Rds

sorenmat / K8s Rds

Licence: mit
Kubernetes RDS provisioner

Programming Languages

go
31211 projects - #10 most used programming language

Projects that are alternatives of or similar to K8s Rds

instance-watcher
Get notified for Instances mistakenly left running across all AWS regions for specific AWS Account
Stars: ✭ 90 (-23.08%)
Mutual labels:  rds
Win Acme
A simple ACME client for Windows (for use with Let's Encrypt et al.)
Stars: ✭ 4,305 (+3579.49%)
Mutual labels:  rds
Waliyun
阿里云Node.js Open API SDK(完整版)
Stars: ✭ 40 (-65.81%)
Mutual labels:  rds
terraform-aws-backup
Terraform module to create AWS Backup plans. AWS Backup is a fully managed backup service that makes it easy to centralize and automate the back up of data across AWS services (EBS volumes, RDS databases, DynamoDB tables, EFS file systems, and Storage Gateway volumes).
Stars: ✭ 72 (-38.46%)
Mutual labels:  rds
Aws Demos
A hands on repo with multiple demonstrations on AWS 🎓
Stars: ✭ 324 (+176.92%)
Mutual labels:  rds
Startup Kit Templates
CloudFormation templates to accelerate getting started on AWS.
Stars: ✭ 669 (+471.79%)
Mutual labels:  rds
mysql2-lambda
Precompiled Mysql2 Gem for AWS Lambda
Stars: ✭ 19 (-83.76%)
Mutual labels:  rds
Awstaghelper
AWS bulk tagging tool
Stars: ✭ 98 (-16.24%)
Mutual labels:  rds
Commit Watcher
Find interesting and potentially hazardous commits in git projects
Stars: ✭ 345 (+194.87%)
Mutual labels:  rds
Alibaba Cloud Sdk Go
Alibaba Cloud SDK for Go
Stars: ✭ 876 (+648.72%)
Mutual labels:  rds
Redsea
A lightweight RDS to JSON decoder
Stars: ✭ 311 (+165.81%)
Mutual labels:  rds
Ec2instances.info
Amazon EC2 instance comparison site
Stars: ✭ 3,619 (+2993.16%)
Mutual labels:  rds
Aliyun Sdk Js
阿里云 SDK for Javascript,支持在浏览器和 Nodejs 环境使用,支持大部分阿里云服务。
Stars: ✭ 727 (+521.37%)
Mutual labels:  rds
awsctl
Control AWS infrastructure easily from a single command line written in Go
Stars: ✭ 97 (-17.09%)
Mutual labels:  rds
Awesome Aws
A curated list of awesome Amazon Web Services (AWS) libraries, open source repos, guides, blogs, and other resources. Featuring the Fiery Meter of AWSome.
Stars: ✭ 9,895 (+8357.26%)
Mutual labels:  rds
herman
Herman is a tool to simplify deployment of AWS Services using ECS and Lambda, and the provisioning of various AWS services.
Stars: ✭ 33 (-71.79%)
Mutual labels:  rds
Terraform Aws Rds
Terraform module which creates RDS resources on AWS
Stars: ✭ 430 (+267.52%)
Mutual labels:  rds
Check Reserved Instances
Compare instance reservations and running instances for AWS services
Stars: ✭ 102 (-12.82%)
Mutual labels:  rds
Aws Cli Cheatsheet
☁️ AWS CLI + JQ = Make life easier
Stars: ✭ 94 (-19.66%)
Mutual labels:  rds
Aliyungo
Go SDK for Aliyun (Alibaba Cloud) - Golang API for ECS, OSS, DNS, SLB, RDS, RAM, MNS, STS, SLS, MQ, Push, OpenSearch, DM, Container Service etc.
Stars: ✭ 756 (+546.15%)
Mutual labels:  rds

k8s-rds

Build Status Go Report Card

A Custom Resource Definition for provisioning AWS RDS databases.

State: BETA - use with caution

Assumptions

The node running the pod should have an instance profile that allows creation and deletion of RDS databases and Subnets.

The codes will search for the first node, and take the subnets from that node. And depending on wether or not your DB should be public, then filter them on that. If any subnets left it will attach the DB to that.

Building

go build

Installing

You can start the the controller by applying kubectl apply -f deploy/deployment.yaml

RBAC deployment

To create ClusterRole and bindings, apply the following instead:

kubectl apply -f deploy/operator-cluster-role.yaml
kubectl apply -f deploy/operator-service-account.yaml
kubectl apply -f deploy/operator-cluster-role-binding.yaml
kubectl apply -f deploy/deployment-rbac.yaml

Running

Kubernetes database provisioner

Usage:
  k8s-rds [flags]

Flags:
      --exclude-namespaces strings   list of namespaces to exclude. Mutually exclusive with --include-namespaces.
  -h, --help                         help for k8s-rds
      --include-namespaces strings   list of namespaces to include. Mutually exclusive with --exclude-namespaces.
      --provider string              Type of provider (aws, local) (default "aws")
      --repository string            Docker image repository, default is hub.docker.com)

The provider can be started in two modes:

Local - this will provision a docker image in the cluster, and providing a database that way

AWS - This will use the AWS API to create a RDS database

Deploying

When the controller is running in the cluster you can deploy/create a new database by running kubectl apply on the following file.

apiVersion: v1
kind: Secret
metadata:
  name: mysecret
type: Opaque
data:
  mykey: cGFzc3dvcmRvcnNvbWV0aGluZw==
---
apiVersion: k8s.io/v1
kind: Database
metadata:
  name: pgsql
  namespace: default
spec:
  class: db.t2.medium # type of the db instance
  engine: postgres # what engine to use postgres, mysql, aurora-postgresql etc.
  version: "9.6"
  dbname: pgsql # name of the initial created database
  name: pgsql # name of the database at the provider
  password: # link to database secret
    key: mykey # the key in the secret
    name: mysecret # the name of the secret
  username: postgres # Database username
  size: 20 # size in GB
  MaxAllocatedSize: 50 # size in GB
  backupretentionperiod: 10 # days to keep backup, 0 means diable
  deleteprotection: true # don't delete the database even though the object is delete in k8s
  encrypted: true # should the database be encrypted
  iops: 1000 # number of iops
  multiaz: true # multi AZ support
  storagetype: gp2 # type of the underlying storage
  tags: "key=value,key1=value1"
  

After the deploy is done you should be able to see your database via kubectl get databases

NAME         AGE
test-pgsql   11h

And on the AWS RDS page

subnets

instances

TODO

  • [X] Basic RDS support

  • [X] Local PostgreSQL support

  • [ ] Cluster support

  • [ ] Google Cloud SQL for PostgreSQL support

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].