liveBook · Manning

Infrastructure resource

As explained in Platform Engineering on Kubernetes

Application infrastructure is the set of supporting software components and services required by application services, distinct from the underlying infrastructure that runs them.

An infrastructure resource is a supporting component that an application service needs to run, such as a database or message broker. These resources are application infrastructure, not the hardware underneath them. They may run in a Kubernetes cluster or be provided as cloud services. section 5.0 section 5.1

Provisioning a resource is only part of the job. Teams must choose suitable configurations, account for scaling and maintenance, and give services connection details. A cloud provider can operate the component, but provisioning it through provider-specific tools ties the workflow to that provider. section 5.1 section 5.1.1

Two approaches illustrate the developer workflow:

  • Install PostgreSQL, Redis, or Kafka with a Helm chart. Review its parameters with the relevant operations specialists, install it into Kubernetes, then connect the application service using its address and credentials. section 5.1.1
  • Expose a simpler Kubernetes resource through a Crossplane Composite Resource Definition. A platform team configures providers and compositions; application teams request databases or message brokers without managing cloud-provider accounts or provisioning details. section 5.3.1 section 5.5

Connecting a Conference application

A Conference deployment uses a SQL database backed by PostgreSQL, a key-value database backed by Redis, and a Kafka message broker. After checking that the requested resources are ready, configure service endpoints and the relevant Kubernetes Secret names in the application’s Helm values. Install the application with its bundled infrastructure disabled so it connects to those provisioned instances. section 5.3.1

Listing 5.17 Helm Chart customized values.yaml file
install:
  infrastructure: false                               #1
frontend:
  kafka:
    url: my-mb-kafka.default.svc.cluster.local        #2
agenda:
  kafka:
    url: my-mb-kafka.default.svc.cluster.local
  redis:
    host: my-db-keyavalue-redis-master.default.svc.cluster.local
    secretName: my-db-keyavalue-redis
c4p:
  kafka:
    url: my-mb-kafka.default.svc.cluster.local
  postgresql:
    host: my-db-sql-postgresql.default.svc.cluster.local
    secretName: my-db-sql-postgresql                  #3
notifications:
  kafka:
    url: my-mb-kafka.default.svc.cluster.local

The Helm values show how service-specific Kafka, Redis, and PostgreSQL addresses and Secret names connect the application to separately provisioned infrastructure. section 5.3.1

Separating infrastructure resources from application code lets a platform team change implementations or configurations across environments while developers work against consistent interfaces. The aim is to let services be released without requiring their developers to operate each database or broker. section 5.3.1 section 7.4

How Platform Engineering on Kubernetes covers it

How deep it goes
Works through provisioning and connecting example resources with Helm and Crossplane, while leaving specialist component configuration to operations teams.
Examples
Uses PostgreSQL, Redis, and Kafka resources, readiness listings, and Helm values that connect application services to them.
What it assumes
Assumes familiarity with application services and Kubernetes deployment workflows; assigns database tuning and high-availability choices to specialists.
What you can do after
Apply it via Crossplane to request infrastructure through Kubernetes resources and connect services using endpoints and Secrets.
How it connects
Links Kubernetes resources, Helm charts, Crossplane compositions, Kubernetes Secrets, and platform APIs to application-service dependencies.

Also explained in

Compare how 3 books explain infrastructure resource →

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.