kubernetes
VerifiedEnrichment0.2.1Use when: When containers run on a Kubernetes cluster and you need to say how they are scheduled, reached, configured and secured.
How containers are scheduled, exposed, configured and secured on a Kubernetes cluster, and packaged with Helm: clusters, namespaces, workloads, services, ingresses, config, secrets, storage and access. Model what a designer decides; what the cluster creates for itself (pods, nodes, replica sets) is left out. Rules keep every object in a namespace and every workload running a container.
Add it
Open it in trumly cloud to start a project with this pack already in. In an existing project, open the editor's Packs tab, choose kubernetes, then Add. Nodes you change after adding are kept when the pack is upgraded.
From a known source. Reviewed by us, and the publisher is known.
Explore is a read-only demo in your browser: nothing to sign in to, and nothing is saved.
- Namespace
k8s--- Size
- 56 nodes
- Needs
- core@^1.0.0, containers@^0.1.0
- Works with
- hosting@^0.3.0, links@^1.0.0
- Enriches
- design
- Publisher
- trumly
- Versions
0.2.1·0.2.0·0.1.1- Checksum
12333f9b171ed38f…
Examples 1
- The ops API on KubernetesA starting point
The operations API on an Amazon EKS cluster: its workloads, the service and ingress in front of it, config, a secret, storage, access and a Helm chart and release, alongside the laptop and App Runner copies.
Show the 69 nodes
- Jobs listed
acceptance-criterionacceptance-criterion-jobs-listed - Ops staff
actoractor-ops-staff - Job volume stays modest
assumptionassumption-job-volume - API autoscaler
autoscalerautoscaler-ops-api - View job status
capabilitycapability-view-job-status - ops
chartchart-ops - AWS
cloud-providercloud-provider-aws - AWS App Runner
cloud-servicecloud-service-apprunner - Amazon ECR
cloud-servicecloud-service-ecr - Amazon EKS
cloud-servicecloud-service-eks - ECS Fargate
cloud-servicecloud-service-fargate - RDS for PostgreSQL
cloud-servicecloud-service-rds - Production cluster
clustercluster-eks-prod - Log agent
componentcomponent-log-agent - Ops API
componentcomponent-ops-api - Local development stack
compose-projectcompose-project-ops-local - Job
conceptconcept-job - API settings
config-mapconfig-map-ops-api - Vertical scaling
consequenceconsequence-one-engine - Data stays in UK/EU
constraintconstraint-uk-eu-data - Log agent container
containercontainer-log-agent - API on App Runner
containercontainer-ops-api-apprunner - API in the cluster
containercontainer-ops-api-cluster - API on a laptop
containercontainer-ops-api-local - Cache container
containercontainer-ops-cache - Migration container
containercontainer-ops-migrate - Short titles
conventionconvention-short-titles - Ops cache
datastoredatastore-ops-cache - Ops db
datastoredatastore-ops-db - Managed document store
decision-optiondecision-option-document-store - Managed PostgreSQL
decision-optiondecision-option-managed-postgres - Database choice
decisiondecision-use-postgres - Production
environmentenvironment-production - Timely ops visibility
goalgoal-timely-visibility - Developer laptop
hosthost-dev-laptop - Log agent image
imageimage-log-agent - ops-api image
imageimage-ops-api - Cache image
imageimage-ops-cache - Live job status
incrementincrement-live-status - API front door
ingressingress-ops-api - Ops API
interfaceinterface-ops-api - Job status age
metricmetric-status-freshness - ops
namespacenamespace-ops - Ops default policy
network-policynetwork-policy-ops-default - Application pool
nodepoolnodepool-apps - Ops API
overviewoverview - data
persistent-volume-claimpersistent-volume-claim-ops-cache - Prefer managed services
principleprinciple-prefer-managed - London
regionregion-london - Container registry
registryregistry-ecr - Operations API (production)
releaserelease-ops-prod - List jobs
requirementrequirement-list-jobs - Job volume growth
riskrisk-job-volume-growth - API reads metrics
role-bindingrole-binding-metrics-reader - API reads config
role-bindingrole-binding-ops-reader - Metrics reader
rolerole-metrics-reader - Config reader
rolerole-ops-reader - db
secretsecret-ops-db - API identity
service-accountservice-account-ops-api - API address
serviceservice-ops-api - Dev
teamteam-dev - Platform
teamteam-platform - Local API data
volumevolume-ops-local-data - Build status API
work-packagework-package-build-status-api - log-agent
workloadworkload-log-agent - ops-api
workloadworkload-ops-api - ops-cache
workloadworkload-ops-cache - ops-migrate
workloadworkload-ops-migrate - Private zone
network-zonezone-private
- Jobs listed
Patterns 1
Small fragments you lift into a project of your own. In the editor or through an agent, insert one under its root node.
- Kubernetes – StarterA small working cluster to start from, with its names already set. A production environment, a cluster and node pool in it, a namespace, a service account, an API workload with its container, image and registry, a service and a config map. Namespaces calculate as {app}-{belongs-to/runs-in/code} (myapp-prd) from the app field and the environment code.Hangs from a
cluster.
Planes 2
- Kubernetes
- Helm
Types 16
- autoscalerUse when a workload should add or remove copies of itself automatically as load changes. Skip it for workloads with a fixed size.
- chartUse for a reusable, versioned package of Kubernetes objects (workloads, services, config) that can be installed again and again with different settings.
- clusterUse for one Kubernetes cluster: the set of machines and the control plane that runs your workloads. Usually one per environment, or one shared by several.
- config-mapUse for non-confidential settings a workload reads at start-up, such as feature switches, URLs and log levels, kept outside the image so they can change without a rebuild.
- ingressUse for the public front door that routes outside web traffic by hostname and path to a service inside the cluster. Skip it for anything that is only used internally.
- namespaceUse for a named partition of a cluster that keeps one team, environment or application separate from the others, with its own access rules and resources.
- network-policyUse to limit which workloads may talk to each other, so a break-in to one does not open up the rest.
- nodepoolUse for a group of identical machines inside a cluster, when different kinds of work need different sizes or hardware, such as a small system pool and a larger application pool.
- persistent-volume-claimUse for a request for durable storage that outlives any one copy of a workload, such as a database's data disk. It states how much and what kind of storage is needed.
- releaseUse for one installed copy of a chart in a particular namespace, with its own settings. The same chart installed in test and in production is two releases.
- roleUse for a named set of permissions, such as 'read pods'. It grants nothing until a role binding attaches it to an identity.
- role-bindingUse to give an identity a role. This is the step that actually grants the permissions.
- secretUse for confidential values a workload needs, such as passwords, tokens and keys. The model records that the secret exists and where its real value is kept, never the value itself.
- serviceUse for the stable internal address through which other things reach a workload, because the workload's copies come and go. Every workload that receives traffic needs one.
- service-accountUse for the identity a workload runs as when it talks to the cluster itself. Needed whenever a workload must be allowed to do something, or when you want to keep its permissions separate.
- workloadUse for anything you ask the cluster to run: an API, a worker, a database, a one-off task or a scheduled job. The kind says how it runs. This replaces separate deployment, stateful-set, daemon-set, job and cron-job types.
Link types 7
- bundles
chart → workload, service, ingress, config-map, secret, autoscaler, persistent-volume-claim, service-account, role, role-binding, network-policyUse to say which Kubernetes objects a Helm chart contains. - grants
role-binding → roleUse to say which role a role binding gives out. - grants-to
role-binding → service-accountUse to say which identity a role binding gives its role to. - installs
release → chartUse to say which chart a release is an installed copy of. - protects
network-policy → workloadUse to say which workloads a network policy limits traffic to and from. - routes-to
ingress → serviceUse to say which service an ingress sends outside traffic to. - scales
autoscaler → workloadUse to say which workload an autoscaler resizes.
Calculated values 13
- autoscaler-handle
{scales/title}An autoscaler takes the name of the workload it scales. - chart-handle
{title}A chart is named by its title. - config-map-handle
{^consumes/title}-configA config map is named for the workload that reads it, with -config. - namespace-handle
{title}-{belongs-to/runs-in/code}The name a namespace has in each environment: its own name and the code of the environment its cluster serves. - ingress-handle
{routes-to/exposes/title}An ingress takes the name of the workload behind the service it routes to. - release-handle
{installs/title}-{belongs-to/belongs-to/runs-in/code}A release is named for its chart and the environment code of the namespace it installs into. - role-binding-handle
{grants-to/title}-{grants/title}A role binding is named for who gets the role, then the role. - secret-handle
{^consumes/title}-{title}A secret is named for the workload that reads it and its own title. - service-account-handle
{^consumes/title}A service account takes the name of the workload that runs as it. - service-handle
{exposes/title}A service takes the name of the workload it exposes. - volume-claim-handle
{^mounts/title}-{title}A volume claim is named for the workload that mounts it and its own title. - workload-handle
{title}A workload is named by its title, the name the cluster knows it by. - workload-labels
app.kubernetes.io/name={title}, app.kubernetes.io/instance={title}-{belongs-to/belongs-to/runs-in/code}, app.kubernetes.io/part-of={belongs-to/title}The Kubernetes recommended labels for a workload, worked out from its name, its environment and its namespace.
Rules 18
- ErrorAn autoscaler's minimum is not above its maximum
- ErrorEvery autoscaler scales exactly one workload
- WarningEvery chart bundles at least one object
- WarningEvery cluster says what provides it
- ErrorEvery cron-job workload has a schedule
- WarningEvery ingress routes to a service
- WarningA namespace or service name is at most 63 characters
- ErrorEvery namespace belongs to exactly one cluster
- WarningEvery nodepool belongs to a cluster
- ErrorEvery release installs one chart into one namespace
- WarningA release name is at most 53 characters
- ErrorEvery role binding gives one role to at least one identity
- ErrorEvery secret records where its value is kept
- WarningEvery service exposes a workload
- WarningEvery stateful set mounts a persistent volume claim
- ErrorEvery workload runs at least one container
- ErrorEvery workload belongs to exactly one namespace
- WarningEvery workload details a component or a datastore