operator-sdk init

operator-sdk init

Initialize a new project

Synopsis

Initialize a new project including the following files:

  • a “go.mod” with project dependencies
  • a “PROJECT” file that stores project configuration
  • a “Makefile” with several useful make targets for the project
  • several YAML files for project deployment under the “config” directory
  • a “main.go” file that creates the manager that will run the project controllers
  1. operator-sdk init [flags]

Examples

  1. # Initialize a new project with your domain and name in copyright
  2. operator-sdk init --plugins go/v3 --domain example.org --owner "Your name"
  3. # Initialize a new project defining an specific project version
  4. operator-sdk init --plugins go/v3 --project-version 3

Options

  1. --component-config create a versioned ComponentConfig file, may be 'true' or 'false'
  2. --domain string domain for groups (default "my.domain")
  3. --fetch-deps ensure dependencies are downloaded (default true)
  4. -h, --help help for init
  5. --license string license to use to boilerplate, may be one of 'apache2', 'none' (default "apache2")
  6. --owner string owner to add to the copyright
  7. --project-name string name of this project
  8. --project-version string project version (default "3")
  9. --repo string name to use for go module (e.g., github.com/user/repo), defaults to the go package of the current working directory.
  10. --skip-go-version-check if specified, skip checking the Go version

Options inherited from parent commands

  1. --plugins strings plugin keys to be used for this subcommand execution
  2. --verbose Enable verbose logging

SEE ALSO

Last modified March 24, 2021: deps: bump kubebuilder to v3.0.0-beta.1 (#4581) (1e014367)