Skip to content

chivalryq/mvela

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

13 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

mvela

a CLI tool for KubeVela trial

Demo

Prerequisites

  • docker
  • vela CLI

Run

  1. make
  2. bin/mvela create

Clean up

make uninstall

Configuration

Add following snippets to config file. Run it with mvela create -c conf.yaml

apiVersion: mvela.oam.dev/v1alpha1
kind: Simple
managedCluster: 2 # cluster numbers, 1st cluster will be seen as control plane
kubeconfigOpts:	
  output: /Users/qiaozp/.vela/kubeConfig # directory to write KubeConfigs
  updateEnvironment: true # whether update KUBECONFIG var in your shell

Run with external database

Note: token field or TOKEN environment variable is needed when using external database for connect to DB repeatably

When you want keep whole cluster metadata in an external DB, you can create a cluster based on an external DB. You can specify the storage field of configuration like

apiVersion: mvela.oam.dev/v1alpha1
kind: Simple
# other fields..

storage:
  endpoint: mysql://tcp(user:passwd@host:PORT)/DBNAME
  cert_file: /path/to/client.crt
  key_file: /path/to/client.key
token: SECRET

Keep database connection string in shell is more recommended. you can run like:

DATASTORE_ENDPOINT=mysql://tcp(user:passwd@host:PORT)/DBNAME TOKEN=SECRET mvela create
field in config environment var
storage.endpoint DATASTORE_ENDPOINT
storage.cert_file DATASTORE_CAFILE
storage DATASTORE_KEYFILE

For the connection string format, See k3s doc

Known Issue

  1. make uninstall will stop the container, but not clean up k3d data. In another word it's possible to restart the cluster by k3d CLI. That's not complete uninstall

About

Try KubeVela in Docker

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Languages