text stringlengths 0 59.1k |
|---|
emptyDir: {} |
- name: certs |
hostPath: {path: /etc/ssl/certs} |
<|endoftext|> |
# source: k8s_examples/_archived/storage/vitess/guestbook-controller.yaml type: yaml |
kind: ReplicationController |
apiVersion: v1 |
metadata: |
name: guestbook |
spec: |
replicas: 3 |
template: |
metadata: |
labels: |
component: guestbook |
app: vitess |
spec: |
containers: |
- name: guestbook |
image: vitess/guestbook:v2.0.0-alpha5 |
ports: |
- name: http-server |
containerPort: 8080 |
resources: |
limits: |
memory: "128Mi" |
cpu: "100m" |
<|endoftext|> |
# source: k8s_examples/_archived/storage/vitess/vtctld-service.yaml type: yaml |
kind: Service |
apiVersion: v1 |
metadata: |
name: vtctld |
labels: |
component: vtctld |
app: vitess |
spec: |
ports: |
- port: 15000 |
name: web |
targetPort: 15000 |
nodePort: 30000 |
- port: 15001 |
name: grpc |
targetPort: 15001 |
nodePort: 30001 |
selector: |
component: vtctld |
app: vitess |
type: NodePort |
<|endoftext|> |
# source: k8s_examples/_archived/storage/vitess/README.md type: docs |
## Vitess Example |
This example shows how to run a [Vitess](http://vitess.io) cluster in Kubernetes. |
Vitess is a MySQL clustering system developed at YouTube that makes sharding |
transparent to the application layer. It also makes scaling MySQL within |
Kubernetes as simple as launching more pods. |
The example brings up a database with 2 shards, and then runs a pool of |
[sharded guestbook](https://github.com/youtube/vitess/tree/master/examples/kubernetes/guestbook) |
pods. The guestbook app was ported from the original |
[guestbook](../../../examples/guestbook-go/) |
example found elsewhere in this tree, modified to use Vitess as the backend. |
For a more detailed, step-by-step explanation of this example setup, see the |
[Vitess on Kubernetes](http://vitess.io/getting-started/) guide. |
### Prerequisites |
You'll need to install [Go 1.4+](https://go.dev/doc/install) to build |
`vtctlclient`, the command-line admin tool for Vitess. |
We also assume you have a running Kubernetes cluster with `kubectl` pointing to |
it by default. See the [Getting Started guides](https://kubernetes.io/docs/getting-started-guides/) |
for how to get to that point. Note that your Kubernetes cluster needs to have |
enough resources (CPU+RAM) to schedule all the pods. By default, this example |
requires a cluster-wide total of at least 6 virtual CPUs and 10GiB RAM. You can |
tune these requirements in the |
[resource limits](https://kubernetes.io/docs/user-guide/compute-resources.md) |
section of each YAML file. |
Lastly, you need to open ports 30000-30001 (for the Vitess admin daemon) and 80 (for |
the guestbook app) in your firewall. See the |
[Services and Firewalls](https://kubernetes.io/docs/user-guide/services-firewalls.md) |
guide for examples of how to do that. |
### Configure site-local settings |
Run the `configure.sh` script to generate a `config.sh` file, which will be used |
to customize your cluster settings. |
``` console |
./configure.sh |
``` |
Currently, we have out-of-the-box support for storing |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.