Skip to content

Commit

Permalink
Add API groups explanation to golang tutorial (#5842)
Browse files Browse the repository at this point in the history
* Add API groups explanation to golang tutorial
* Add blurb about API groups being used for other things internally to golang tutorial

Signed-off-by: Jonathan Berkhahn <[email protected]>
  • Loading branch information
jberkhahn authored Oct 7, 2022
1 parent b97d84f commit 3fc75c9
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions website/content/en/docs/building-operators/golang/tutorial.md
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,12 @@ cd $HOME/projects/memcached-operator
# so all API groups will be <group>.example.com
operator-sdk init --domain example.com --repo github.com/example/memcached-operator
```
`--domain` will be used as the prefix of the API group your custom resources will be created in.
API groups are a mechanism to group portions of the Kubernetes API. You're probably already familiar with
some of the core Kubernetes API groups, such as `apps` or `rbac.authorization.k8s.io`. API groups are used
internally to version your Kubernetes resources and are thus used for many things. Importantly, you should
name your domain to group your resource types in meaningful group(s) for ease of understanding and because these
groups determine how access can be controlled to your resource types using RBAC. For more information, see [the core Kubernetes docs](https://kubernetes.io/docs/reference/using-api/#api-groups) and [the Kubebuilder docs](https://book.kubebuilder.io/cronjob-tutorial/gvks.html).

**Note** If your local environment is Apple Silicon (`darwin/arm64`) use the `go/v4-alpha`
plugin which provides support for this platform by adding to the init subCommand the flag `--plugins=go/v4-alpha`
Expand Down

0 comments on commit 3fc75c9

Please sign in to comment.