Skip to content

Commit 3fc75c9

Browse files
authored
Add API groups explanation to golang tutorial (#5842)
* 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]>
1 parent b97d84f commit 3fc75c9

File tree

1 file changed

+6
-0
lines changed
  • website/content/en/docs/building-operators/golang

1 file changed

+6
-0
lines changed

website/content/en/docs/building-operators/golang/tutorial.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -37,6 +37,12 @@ cd $HOME/projects/memcached-operator
3737
# so all API groups will be <group>.example.com
3838
operator-sdk init --domain example.com --repo github.com/example/memcached-operator
3939
```
40+
`--domain` will be used as the prefix of the API group your custom resources will be created in.
41+
API groups are a mechanism to group portions of the Kubernetes API. You're probably already familiar with
42+
some of the core Kubernetes API groups, such as `apps` or `rbac.authorization.k8s.io`. API groups are used
43+
internally to version your Kubernetes resources and are thus used for many things. Importantly, you should
44+
name your domain to group your resource types in meaningful group(s) for ease of understanding and because these
45+
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).
4046

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

0 commit comments

Comments
 (0)