> For the complete documentation index, see [llms.txt](https://k8.matthewdavis.io/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://k8.matthewdavis.io/kubernetes-specs/services.md).

# Services

## Example Service Spec

{% code title="service.yaml" %}

```yaml
apiVersion: v1
kind: Service
metadata:
  name: mysql
  labels:
    app: mysql
spec:
  ports:
    - port: 3306
      targetPort: 3306
  selector:
    app: mysql
```

{% endcode %}
