<commit_before># User Guide

This document will walk you through the steps of deploying the Flink Operator to
a Kubernetes cluster and running a sample Flink job.

## Prerequisite

First, you need to have a running Kubernetes cluster, you can verify the cluster
info with

```bash
kubectl cluster-info
```

Second, clone the Flink Operator repo to your local machine with

```bash
git clone git@github.com:GoogleCloudPlatform/flink-on-k8s-operator.git
```

then switch to the repo directory, we need to use the scripts in the repo for
deployment. (This step will not be needed in the future after we have a Helm
chart.)

## Deploy the operator to a Kubernetes cluster

Deploy the Flink Operator to the Kubernetes cluster with

```bash
make deploy [FLINK_OPERATOR_NAMESPACE=<namespace>]
```

By default, the operator will be deployed to namespace `flink-operator-system`,
but you can configure it with the environment variable
`FLINK_OPERATOR_NAMESPACE`.

After that, you can verify CRD `flinkclusters.flinkoperator.k8s.io` has been
created with

```bash
kubectl get crds | grep flinkclusters.flinkoperator.k8s.io
```<commit_msg>Added helm install option to user guide.<commit_after># User Guide

This document will walk you through the steps of deploying the Flink Operator to
a Kubernetes cluster and running a sample Flink job.

## Prerequisite

First, you need to have a running Kubernetes cluster, you can verify the cluster
info with

```bash
kubectl cluster-info
```

Second, clone the Flink Operator repo to your local machine with

```bash
git clone git@github.com:GoogleCloudPlatform/flink-on-k8s-operator.git
```

then switch to the repo directory, we need to use the scripts in the repo for
deployment. (This step will not be needed in the future after we have a Helm
chart.)

## Deploy the operator to a Kubernetes cluster

Deploy the Flink Operator to the Kubernetes cluster with [Helm Chart Installation Instruction](https://github.com/GoogleCloudPlatform/flink-on-k8s-operator/blob/master/helm-chart/flink-operator/README.md) or with

```bash
make deploy [FLINK_OPERATOR_NAMESPACE=<namespace>]
```

By default, the operator will be deployed to namespace `flink-operator-system`,
but you can configure it with the environment variable
`FLINK_OPERATOR_NAMESPACE`.

After that, you can verify CRD `flinkclusters.flinkoperator.k8s.io` has been
created with

```bash
kubectl get crds | grep flinkclusters.flinkoperator.k8s.io
```
{'fraction_non_alphanumeric': 0.06970069700697007, 'fraction_numerical': 0.002870028700287003, 'mean_word_length': 5.009852216748769, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 5, 'https://': 1, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 2, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '5678456', 'n_tokens_mistral': 738, 'n_tokens_neox': 693, 'n_words': 312}