Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

github.com/jbw976/mysql-operator

Package Overview
Dependencies
Alerts
File Explorer
Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

github.com/jbw976/mysql-operator

  • v0.0.0-20180326100744-fcfe99459961
  • Source
  • Go
  • Socket score

Version published
Created
Source

MySQL Operator

A Kubernetes custom resource and Operator that allows a user to describe a trivial single-instance of MySQL. The tasks for running a single-instance stateful application are done by this operator.

Pre-reqs

You can run Kubernetes locally with Minikube.

Building

# From the root of repo, ensure all the libraries required are pulled down.
dep ensure

# build the sample operator binary
CGO_ENABLED=0 GOOS=linux go build

# Build the docker container.
docker build -t mysql-operator:0.1 .
docker save mysql-operator:0.1 | eval $(minikube docker-env) # Only needed for minikube.

Using the Operator

# Start the operator.
kubectl create -f mysql-operator.yaml

# Create a MySQL resource (might take a few seconds).
kubectl create -f mysql-resource.yaml

# Verify the MySQL resource is created by creating a new pod in the cluster and
# running a MySQL client that connects to the newly created service.
kubectl run -it --rm --image=mysql:5.6 --restart=Never mysql-client -- mysql -h mysql -ppassword

There is no support for updating the resource because there is nothing in its spec that will allow for a non-disruptive change to the service. To make changes to the service, it's recommended to tear it down and redeploy.

Cleanup

kubectl delete -f mysql-resource.yaml
kubectl delete -f mysql-operator.yaml

FAQs

Package last updated on 26 Mar 2018

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc