Skip to content

Commit 4e2c630

Browse files
authored
Add Development notes (#2195)
1 parent 95f3511 commit 4e2c630

File tree

1 file changed

+61
-0
lines changed

1 file changed

+61
-0
lines changed

DEVELOPMENT.md

Lines changed: 61 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,61 @@
1+
# Development
2+
3+
## Deploy operator in K8s
4+
With a Kubernetes cluster (local you can use Kind) in `./` run:
5+
```
6+
kubectl apply -k resources/
7+
kubectl apply -k resources/base/
8+
```
9+
That will deploy an operator with a defined image.
10+
11+
To access the UI get the operator token from:
12+
```
13+
kubectl describe secrets -n minio-operator console-sa-secret | grep 'token:' | awk '{print $2}' | pbcopy
14+
```
15+
16+
Once the server is running you can see the UI either by port forwarding or using kubefwd for the operator pod.
17+
18+
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.
19+
```
20+
"proxy": "http://localhost:9090/"
21+
```
22+
23+
And in the web-app run:
24+
```
25+
yarn install
26+
yarn start
27+
```
28+
29+
## Deploy operator in K8s with custom image using Kind:
30+
31+
Build an image like:
32+
```
33+
make build TAG="minio/operator:<YOUR_TAG>" && kind load docker-image minio/operator:<YOUR_TAG>
34+
```
35+
36+
And update the image from resources/base/ for `console-ui.yaml` and `deployment.yaml`
37+
```
38+
spec:
39+
replicas: 1
40+
selector:
41+
matchLabels:
42+
app: console
43+
template:
44+
metadata:
45+
labels:
46+
app: console
47+
app.kubernetes.io/instance: minio-operator-console
48+
app.kubernetes.io/name: operator
49+
spec:
50+
containers:
51+
- args:
52+
- ui
53+
- --certs-dir=/tmp/certs
54+
image: minio/operator:cesnietor
55+
56+
```
57+
58+
Apply resources again to see this:
59+
```
60+
kubectl apply -k resources/base/
61+
```

0 commit comments

Comments
 (0)