https://github.com/abstractmachines/kubebuilder-quickstart
Quickstart for Kubebuilder with Golang
https://github.com/abstractmachines/kubebuilder-quickstart
Last synced: 2 months ago
JSON representation
Quickstart for Kubebuilder with Golang
- Host: GitHub
- URL: https://github.com/abstractmachines/kubebuilder-quickstart
- Owner: abstractmachines
- Created: 2021-07-24T23:23:11.000Z (almost 4 years ago)
- Default Branch: main
- Last Pushed: 2021-07-24T23:39:41.000Z (almost 4 years ago)
- Last Synced: 2025-02-06T02:57:23.976Z (4 months ago)
- Language: Go
- Size: 41 KB
- Stars: 0
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Kubebuilder quickstart
```sh
kubebuilder init --domain my.domain --repo my.domain/guestbook
```## Create API (CR and Controller opts, yes)
```
kubebuilder create api --group webapp --version v1 --kind Guestbook
```## Test it out: Install CRDs into cluster
```
make install
```## Test it out: Run the Controller
```
make run
```## In new tab, install instances of custom resources
```
kubectl apply -f config/samples/
```## Run It On the Cluster
Build and push your image to the location specified by IMG:```
make docker-build docker-push IMG=/:tag
```## Deploy the controller to the cluster with image specified by IMG:
```
make deploy IMG=/:tag
```## Operate the custom resource / get
```
kubectl get guestbook
```## Get custom resource YAML
```
kubectl get guestbook -oyaml
```
- ... we could also add a shortname here and perform crud w kubectl api on that resource's shortname...
- ... we could add a label and select/delete/operate on, all custom resources which have that label ...## Uninstall CRDs
```
make uninstall
```## Undeploy Controller
```
make undeploy
```