diff --git a/crowdsec-docs/unversioned/bouncers/traefik.mdx b/crowdsec-docs/unversioned/bouncers/traefik.mdx new file mode 100644 index 000000000..056072928 --- /dev/null +++ b/crowdsec-docs/unversioned/bouncers/traefik.mdx @@ -0,0 +1,58 @@ +--- +id: traefik +title: Traefix +sidebar_position: 5 +--- + +import Tabs from '@theme/Tabs'; +import TabItem from '@theme/TabItem'; +import useBaseUrl from '@docusaurus/useBaseUrl'; +import RemediationSupportBadges from '@site/src/components/remediation-support-badge'; + + +

+CrowdSec +

+

+ + +

+

+📚 Documentation +💠 Hub +💬 Discourse +

+ + + +### Traefik on kubernetes + +Traefik expects a resource of "Middleware" type named "bouncer", which we will create now. + +Here is bouncer-middleware.yaml: + +```yaml +apiVersion: traefik.io/v1alpha1 +kind: Middleware +metadata: + name: bouncer + namespace: traefik +spec: + plugin: + bouncer: + enabled: true + crowdsecMode: stream + crowdsecLapiScheme: https + crowdsecLapiHost: crowdsec-service.crowdsec:8080 + crowdsecLapiKey: mysecretkey12345 +``` + +You can see all the configuration options in the [bouncer documentation](https://plugins.traefik.io/plugins/6335346ca4caa9ddeffda116/crowdsec-bouncer-traefik-plugin). + +Now, you can install the remediation component: + +```bash +kubectl apply -f bouncer-middleware.yaml +``` diff --git a/crowdsec-docs/unversioned/getting_started/installation/kubernetes.mdx b/crowdsec-docs/unversioned/getting_started/installation/kubernetes.mdx index 2f101a593..2107a9468 100644 --- a/crowdsec-docs/unversioned/getting_started/installation/kubernetes.mdx +++ b/crowdsec-docs/unversioned/getting_started/installation/kubernetes.mdx @@ -122,73 +122,7 @@ lapi: Then, you can install the remediation component with the following command: -#### Traefik -Traefik expects a resource of "Middleware" type named "bouncer", which we will create now. - -Here is bouncer-middleware.yaml: - -```yaml -apiVersion: traefik.io/v1alpha1 -kind: Middleware -metadata: - name: bouncer - namespace: traefik -spec: - plugin: - bouncer: - enabled: true - crowdsecMode: stream - crowdsecLapiScheme: https - crowdsecLapiHost: crowdsec-service.crowdsec:8080 - crowdsecLapiKey: mysecretkey12345 -``` - -You can see all the configuration options in the [bouncer documentation](https://plugins.traefik.io/plugins/6335346ca4caa9ddeffda116/crowdsec-bouncer-traefik-plugin). - -Now, you can install the remediation component: - -```bash -kubectl apply -f bouncer-middleware.yaml -``` - -#### Nginx - -:::info -We supposed that you have already installed the Nginx ingress controller using this [helm chart](https://artifacthub.io/packages/helm/ingress-nginx/ingress-nginx). -::: - -We need to patch ingress-nginx helm chart to add and enable [the crowdsec lua plugin](https://github.com/crowdsecurity/cs-openresty-bouncer). -You can put this configuration example in a file `crowdsec-ingress-nginx.yaml`: - -```yaml -controller: - extraVolumes: - - name: crowdsec-bouncer-plugin - emptyDir: {} - extraInitContainers: - - name: init-clone-crowdsec-bouncer - image: crowdsecurity/lua-bouncer-plugin - imagePullPolicy: IfNotPresent - env: - - name: API_URL - value: "http://crowdsec-service.crowdsec.svc.cluster.local:8080" - - name: API_KEY - value: "mysecretkey12345" - - name: BOUNCER_CONFIG - value: "/crowdsec/crowdsec-bouncer.conf" - command: ['sh', '-c', "sh /docker_start.sh; mkdir -p /lua_plugins/crowdsec/; cp -R /crowdsec/* /lua_plugins/crowdsec/"] - volumeMounts: - - name: crowdsec-bouncer-plugin - mountPath: /lua_plugins - extraVolumeMounts: - - name: crowdsec-bouncer-plugin - mountPath: /etc/nginx/lua/plugins/crowdsec - subPath: crowdsec - config: - plugins: "crowdsec" - lua-shared-dicts: "crowdsec_cache: 50m" -``` Once we have this patch we can upgrade the ingress-nginx chart diff --git a/crowdsec-docs/unversioned/getting_started/installation/windows.mdx b/crowdsec-docs/unversioned/getting_started/installation/windows.mdx index 022ebb1f4..165b8ee62 100644 --- a/crowdsec-docs/unversioned/getting_started/installation/windows.mdx +++ b/crowdsec-docs/unversioned/getting_started/installation/windows.mdx @@ -15,7 +15,7 @@ Before getting started, it is advised to read the [introduction](/unversioned/ge We provide MSI installers for Windows. You can download the latest version from the [release page](https://github.com/crowdsecurity/crowdsec/releases/latest) -Download and run the installer, it will install CrowdSec as a service and start it. +Download and run the installer, it will install CrowdSec as a service and start it after next reboot. ### Chocolatey