liveBook · Manning

Environment

As explained in Platform Engineering on Kubernetes

An environment is a distinct deployment context in which an application and its supporting resources run.

An environment is a running application instance with the configuration and supporting resources needed for a particular purpose. A packaged application can run in a local or cloud Kubernetes cluster; the cluster where it runs can serve as an environment. section 2.5

Environments serve different stages of delivery:

  • Development and staging give teams places to deploy and test changes; QA can support manual testing; production serves real users. section 4.1
  • An environment pipeline keeps each environment’s configuration in sync with what runs there. Promoting a release means updating configuration to select a new service or version. section 4.1

Development environments can also be requested on demand through a platform API. Provisioning must account for the application, its databases and other infrastructure, and a way for the team to connect. An isolated instance lets a team test changes without disrupting another team’s setup. section 6.1.1 section 6.3.2

Provision an environment for the Conference application

A team submits an Environment Kubernetes resource to the platform API. A Crossplane composition uses vcluster to create a virtual Kubernetes cluster and installs the Conference application Helm chart. The team can then connect to its cluster and work against the running application. section 6.3 section 6.3.2

Listing 6.2 Environment definition as a Kubernetes resource
apiVersion: salaboy.com/v1alpha1
kind: Environment
metadata:
  name: team-a-dev-env          #1
spec:
  compositionSelector:
    matchLabels:
      type: development         #2
    parameters:                 #3
      installInfra: true

The Kubernetes resource shows a named environment request selecting a development composition and requesting infrastructure installation. section 6.3.2

At larger scope, GitOps tooling can sync environment configurations to live clusters, while Crossplane can provision environments on cloud providers. That adds operational responsibilities: repositories for platform configuration, credentials, and access to cloud accounts. section 6.2.2

How Platform Engineering on Kubernetes covers it

How deep it goes
Works through configuration-based promotion and a provisionable development environment, while leaving broader platform configuration outside the walking skeleton.
Examples
Uses a Conference application development environment provisioned as a vcluster and an Environment Kubernetes resource showing its requested configuration.
What it assumes
Assumes familiarity with Kubernetes APIs and Helm deployment, while pointing to a step-by-step tutorial for the platform walking skeleton.
What you can do after
Operate/configure it by requesting an isolated development environment through the platform API and connecting to the provisioned virtual cluster.
How it connects
Connects environments to continuous delivery, environment pipelines, platform APIs, Kubernetes resources, GitOps, and Crossplane compositions.

Also explained in

Compare how 8 books explain environment →

Related concepts

This explainer was generated by Manning's knowledge graph from the text of Platform Engineering on Kubernetes. The section links point to the parts of the book it draws on.