-
Notifications
You must be signed in to change notification settings - Fork 459
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
1 changed file
with
61 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,61 @@ | ||
# Development | ||
|
||
## Deploy operator in K8s | ||
With a Kubernetes cluster (local you can use Kind) in `./` run: | ||
``` | ||
kubectl apply -k resources/ | ||
kubectl apply -k resources/base/ | ||
``` | ||
That will deploy an operator with a defined image. | ||
|
||
To access the UI get the operator token from: | ||
``` | ||
kubectl describe secrets -n minio-operator console-sa-secret | grep 'token:' | awk '{print $2}' | pbcopy | ||
``` | ||
|
||
Once the server is running you can see the UI either by port forwarding or using kubefwd for the operator pod. | ||
|
||
For development you can also run locally yarn in the web-app/ folder just make sure the port in `package.json` is the same as the operator console service. | ||
``` | ||
"proxy": "http://localhost:9090/" | ||
``` | ||
|
||
And in the web-app run: | ||
``` | ||
yarn install | ||
yarn start | ||
``` | ||
|
||
## Deploy operator in K8s with custom image using Kind: | ||
|
||
Build an image like: | ||
``` | ||
make build TAG="minio/operator:<YOUR_TAG>" && kind load docker-image minio/operator:<YOUR_TAG> | ||
``` | ||
|
||
And update the image from resources/base/ for `console-ui.yaml` and `deployment.yaml` | ||
``` | ||
spec: | ||
replicas: 1 | ||
selector: | ||
matchLabels: | ||
app: console | ||
template: | ||
metadata: | ||
labels: | ||
app: console | ||
app.kubernetes.io/instance: minio-operator-console | ||
app.kubernetes.io/name: operator | ||
spec: | ||
containers: | ||
- args: | ||
- ui | ||
- --certs-dir=/tmp/certs | ||
image: minio/operator:cesnietor | ||
``` | ||
|
||
Apply resources again to see this: | ||
``` | ||
kubectl apply -k resources/base/ | ||
``` |