---
title: Example helloworld test web application
summary: null
url: >-
  https://www.fastly.com/documentation/guides/next-gen-waf/setup-and-configuration/kubernetes/example-helloworld
---

This uses the `helloworld` example included with the Next-Gen WAF Golang module as a test web application named `helloworld`.

See `main.go` in the `sigsci-module-golang` [`helloworld` example](https://raw.githubusercontent.com/signalsciences/sigsci-module-golang/refs/heads/main/examples/helloworld/main.go).

## Dockerfile

Dockerfile to build the `signalsciences/example-helloworld` container:

```term copy
$ docker build . -t signalsciences/example-helloworld:latest
```

```text
FROM golang:latest

# Image metadata
LABEL com.signalsciences.sigsci-module-golang.examples="helloworld"
LABEL maintainer="Signal Sciences <support@fastly.com>"

# Install sigsci golang module example
RUN go install github.com/signalsciences/sigsci-module-golang/examples/helloworld@latest

ENTRYPOINT [ "helloworld" ]
```

## Kubernetes deployment file

Kubernetes `example-helloworld` deployment file (without the Next-Gen WAF agent):

```term copy
$ kubectl apply -f example-helloworld.yaml
```

```yaml
apiVersion: v1
kind: Service
metadata:
  name: helloworld
  labels:
    app: helloworld
spec:
  ports:
  - name: http
    port: 8000
    targetPort: 8000
  selector:
    app: helloworld
  type: LoadBalancer
---
apiVersion: apps/v1
kind: Deployment
metadata:
  name: helloworld
  labels:
    app: helloworld
spec:
  replicas: 2
  selector:
    matchLabels:
      app: helloworld
  template:
    metadata:
      labels:
        app: helloworld
    spec:
      containers:
      - name: helloworld
        image: signalsciences/example-helloworld:latest
        imagePullPolicy: IfNotPresent
        args:
        # Address for the app to listen on
        - localhost:8000
        ports:
        - containerPort: 8000
```

## Related content

- [Kubernetes installation overview](https://www.fastly.com/documentation/guides/next-gen-waf/setup-and-configuration/kubernetes/kubernetes-intro)
