https://github.com/dhellmann/k8s-example-operator
https://github.com/dhellmann/k8s-example-operator
Last synced: 9 months ago
JSON representation
- Host: GitHub
- URL: https://github.com/dhellmann/k8s-example-operator
- Owner: dhellmann
- Created: 2019-01-04T16:32:36.000Z (over 7 years ago)
- Default Branch: master
- Last Pushed: 2019-02-05T15:29:00.000Z (over 7 years ago)
- Last Synced: 2025-01-04T22:35:05.632Z (over 1 year ago)
- Language: Go
- Size: 13.9 MB
- Stars: 0
- Watchers: 3
- Forks: 2
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Example Operator
## Setup with minishift
1. Install and launch minishift
https://docs.okd.io/latest/minishift/getting-started/index.html
2. Install operator-sdk
```
go get github.com/dhellmann/k8s-example-operator
cd ~/go/src/github.com/dhellmann/k8s-example-operator
oc --as system:admin apply -f deploy/service_account.yaml
oc --as system:admin apply -f deploy/role.yaml
oc --as system:admin apply -f deploy/role_binding.yaml
oc --as system:admin apply -f deploy/crds/app_v1alpha1_appservice_crd.yaml
```
3. Ensure you're logged in to the correct context
```
oc config use-context minishift
```
4. Launch the operator locally
```
export OPERATOR_NAME=k8s-example-operator
operator-sdk up local --namespace=myproject
```
5. Create the CR
```
oc apply -f deploy/crds/app_v1alpha1_appservice_cr.yaml
```