You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on Jan 8, 2026. It is now read-only.
- Build the docker image from the [Dockerfile](https://github.com/casbin/k8s-authz/blob/master/Dockerfile) manually by running the following command and then change the build version here and at the deployment [file](https://github.com/casbin/k8s-authz/blob/718f58c46e3dbf79063b5b1c18348c2fee5de9e9/manifests/deployment.yaml#L18), as per the builds.
47
-
```
48
-
docker build -t casbin/k8s_authz:latest .
49
-
```
60
+
- For a production server, we need to create a k8s `secret` to place the certificates for security purposes.
61
+
```
62
+
kubectl create secret generic authz -n default \
63
+
--from-file=key.pem=certs/casbin-key.pem \
64
+
--from-file=cert.pem=certs/casbin-crt.pem
65
+
```
66
+
- Once, this part is done we need to change the directory of the certs in [main.go](https://github.com/ashish493/k8s-authz/blob/3560551427c0431a9d4594ad1206f084ede37c49/main.go#L26) and then in [manifests](https://github.com/ashish493/k8s-authz/blob/3560551427c0431a9d4594ad1206f084ede37c49/manifests/deployment.yaml#L22) with that of the `secret`.
67
+
68
+
- Build the docker image from the [Dockerfile](https://github.com/casbin/k8s-authz/blob/master/Dockerfile) manually by running the following command and then change the build version here and at the deployment [file](https://github.com/casbin/k8s-authz/blob/718f58c46e3dbf79063b5b1c18348c2fee5de9e9/manifests/deployment.yaml#L18), as per the builds.
69
+
```
70
+
docker build -t casbin/k8s_authz:latest .
71
+
```
72
+
50
73
- Define the casbin policies in the [model.conf](https://github.com/casbin/k8s-authz/blob/master/config/model.conf) and [policy.csv](https://github.com/casbin/k8s-authz/blob/master/config/policy.csv). You can refer the [docs](https://casbin.org/docs/how-it-works) to get to know more about the working of these policies.
51
74
52
75
- Before deploying, you can change the ports in [main.go](https://github.com/casbin/k8s-authz/blob/master/main.go) and also in the validation webhook configuration [file](https://github.com/casbin/k8s-authz/blob/master/manifests/deployment.yaml) depending on your usage.
53
-
- Deploy the validation controller and the webhook on k8s cluster by running:-
54
-
```
55
-
kubectl apply -f manifests/deployment.yaml
56
-
```
57
-
- For a production server, we need to create a k8s `secret` to place the certificates for security purposes.
58
-
```
59
-
kubectl create secret generic casbin -n default \
60
-
--from-file=key.pem=certs/casbin-key.pem \
61
-
--from-file=cert.pem=certs/casbin-crt.pem
62
-
```
63
-
- Once, this part is done we need to change the directory of the certs in [main.go](https://github.com/ashish493/k8s-authz/blob/3560551427c0431a9d4594ad1206f084ede37c49/main.go#L26) and then in [manifests](https://github.com/ashish493/k8s-authz/blob/3560551427c0431a9d4594ad1206f084ede37c49/manifests/deployment.yaml#L22) with that of the `secret`.
76
+
77
+
- Deploy the validation controller and the webhook on k8s cluster by running:
0 commit comments