Fastly Anywhere
- English
- 日本語
This information is part of a beta release. For additional details, read our product and feature lifecycle descriptions.
Fastly Anywhere makes it possible to deploy Fastly's software in public cloud environments. By installing Fastly Anywhere in Kubernetes clusters that you supply and manage, you can deploy your own point of presence (POP) and extend the Fastly platform.
Prerequisites and limitations
This product requires a paid Fastly user account and is designed to be installed in public cloud environments. You are responsible for maintaining your Kubernetes installation.
Fastly Anywhere currently only supports Compute services.
Distribution
A supported Kubernetes (k8s) distribution is required to run Fastly Anywhere. We support the following distributions:
Cloud provider | Supported versions |
---|---|
Alicloud Container Service for Kubernetes (ACK) |
|
Google Kubernetes Engine (GKE) |
|
Resources
The recommended minimum resources for cluster worker nodes is 4 vCPUs and 8 GB of RAM.
Kubernetes environment
Your Kubernetes environment must meet the following requirements.
Dedicated cluster
To minimize issues from noisy neighbors, we require a standalone cluster and a dedicated namespace to run Fastly Anywhere.
Storage Class
Either a default Storage Class or an overridden storage class name must be provided. As minimum volume sizes differ between cloud providers and storage classes, volume sizes must also be defined as Helm values.
Egress
We require network egress to be open for bootstrapping, operation, and observability. There are agents running in the Anywhere installation that assist with shipping application metrics and logs back to Fastly to be visualized internally and externally, as well as fetching Fastly configurations from our control planes.
Cert Manager
Fastly requires Cert Manager v1.14 to be installed and available for use within the cluster. The Fastly Anywhere product uses Cert Manager to manage mTLS credentials used for secure communications between Fastly services.
TLS Ingress
We expose the Anywhere installation via an internal Service, allowing you to use an Ingress or any other public or private load balancing solution to deliver traffic to the cluster. Delivery is the responsibility of the customer.
The Fastly TLS products are not supported. TLS should be terminated at the Ingress fronting the Anywhere installation.
# nginx-ingress-example.yamlapiVersion: networking.k8s.io/v1kind: Ingressmetadata: name: cafe-ingress annotations: nginx.ingress.kubernetes.io/upstream-vhost: cafe.example.com # This must match the domain configured for the service in Fastly.spec: tls: - hosts: - cafe.example.com secretName: cafe-secret rules: - host: cafe.example.com # This must match the DNS name that clients reach the Ingress over. http: paths: - path: / # You can change this to whatever works for your use case. pathType: Exact backend: service: name: h2o # The service name will technically be prefixed with the Helm chart name to minimize collisions, but it will include "h2o" in the name. port: number: 80 # Make sure this is port 80.
Helm
Fastly requires Helm version 3.x, for installation and ongoing operation.
The cluster must have valid Fastly Anywhere Registry credentials installed into a Kubernetes secret in order to install the Helm chart.
The Helm chart requires a valid Fastly API Token for the account whose services you want to load into the cluster. Additionally, Fastly will provide a bootstrap token to identify your cluster to Fastly's API.
Installation
Use the following steps to install Fastly Anywhere:
Create a Fastly API automation token.
Use the Fastly Anywhere bootstrap token and registry credentials provided by Fastly.
The username and password used for the docker registry and the Helm registry should be the same.
Create a Kubernetes namespace.
kubectl create namespace fastly-anywhereAdd a Docker registry secret to the Kubernetes cluster.
# access to container imageskubectl create secret docker-registry regcred \--namespace fastly-anywhere \--docker-server=us-docker.pkg.dev \--docker-username=_json_key_base64 \--docker-email="${EMAIL}" \--docker-password="${CREDENTIAL_B64}"Add the Helm registry credentials.
# access to Helm charthelm registry login https://us-docker.pkg.dev \--username _json_key_base64 \--password "${CREDENTIAL_B64}"Configure the Anywhere Helm chart with storage, automation, and bootstrap token values.
Use the following storage class names based on the cloud environment:
Cloud provider Recommended storage class Alibaba Cloud alicloud-disk-topology-alltype
Google Cloud premium-rwo
# your-values.yamledgeStack:cpuFootprint: 4memoryFootprint: 8Gireplicas: 3cached:volumeClaim:requests:storage: 32GistorageClassName: <STORAGE CLASS>xqd:volumeClaim:requests:storage: 32GistorageClassName: <STORAGE CLASS>bootstrap:token: <BOOTSTRAP TOKEN>fastly_key: <AUTOMATION TOKEN>Install the latest chart version.
# installs the fastly-anywhere chart into the namespacehelm install fastly-anywhere oci://us-docker.pkg.dev/fastly-anywhere-dev-41d5/anywhere-production/charts/fastly-anywhere \--version 0.1.0 \--namespace fastly-anywhere \--values your-values.yamlValidate that the installation initializes and runs correctly.
# status of the StatefulSet can be validated herekubectl get statefulset \--namespace fastly-anywhere \-l app.kubernetes.io/name=fastly-anywhere# status of the pods in the StatefulSet can be validated herekubectl get pods \--namespace fastly-anywhere- Ingress should point at the service named:
h2o
. - Must preserve HTTP host header from client.
- Target port is
80
.
- Ingress should point at the service named:
Validate that service hosting works via the chosen delivery mechanism.
Upgrading
Use the following steps to upgrade Fastly Anywhere:
Upgrade the installed releases via Helm upgrade.
# upgrades a deployed release to a specified version via Helmhelm upgrade fastly-anywhere \--namespace fastly-anywhere \--version $LATEST_VERSIONRestart the Fastly Anywhere StatefulSet.
# restarts Fastly Anywhere pods in sequencekubectl rollout restart statefulset/fastly-anywhere \--namespace fastly-anywhere
Data flows
The following architecture diagram shows data flowing between components of the Fastly Anywhere solution: Helm tooling, the Kubernetes API server, Kubernetes nodes, the Fastly API, and your log stores.
- Required values are provided by the customer and sent to the customer's Kubernetes API via Helm.
- The secrets loader exchanges the bootstrap token and Fastly automation token for credentials used by other processes.
- The Anywhere agent queries the customer's Kubernetes API for information necessary to produce clustering configurations.
- Loader containers fetch customer service configurations from the Fastly API.
- HTTP traffic from the customer-provided Ingress is routed to platform containers.
- Platform containers send observability metrics to the Fastly API.
- Service management data is sent to the Fastly API for internal debugging and alerting.
- Real-time logs are streamed to customer-defined log storage endpoints.