Skip to content

A golang library to create Kubernetes recipes following the command design pattern.

License

Notifications You must be signed in to change notification settings

spirosoik/k8s-commander

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

8 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

PkgGoDev report card

k8s-commander

A golang library to create Kubernetes recipes following the command design pattern.

Recipe Example

You can find an example of a k8s recipe here

make run-example

Check here how to run recipe with the k8s commander. Example:

	cm := commander.New()

	// create a recipe with a set of commands
	opts := recipeOpts{
		Name:           "es",
		Namespace:      "default",
		ContainerImage: "elastic/elasticsearch",
		ContainerPort:  9200,
		ContainerTag:   "7.8.1",
	}
	recipe := NewElasticsearchDeployment(opts, clientset, logger)

	// Execute the recipe
	err = cm.Execute(recipe)
	if err != nil {
		logger.WithError(err).Error()
		os.Exit(-1)
	}

Available Commands

  • CreateNamespace
  • DeleteNamespace
  • CreateDeployment
  • CreateIngressCommand
  • CreateService

About

A golang library to create Kubernetes recipes following the command design pattern.

Topics

Resources

License

Stars

Watchers

Forks

Packages

No packages published