astroctl infra kubernetes addons apply
Install or update an add-on from YAML
Synopsis
Install or update a managed add-on from a K8sClusterAddon manifest.
Edit spec.version or configuration and apply the same manifest again to upgrade. Astro manages the deployment lifecycle. A configuration with the add-on's own block replaces the add-on's settings; a manifest without one keeps the stored settings, so to clear them apply an empty block (for example 'configuration: {modelServing: {}}'). 'availability', 'resources' and 'components' merge onto what is stored, and a configuration with only those keeps the add-on's stored block.
Add-ons that reach a cloud API (for example external-dns publishing DNS records) run on your cluster. On a cluster AstroPulse created they use the cluster's own cloud access, set up once with 'astroctl cloud aws connect --cluster-name prod-01' (or gcp, azure); on a registered cluster, bind them with 'identity' or 'secretRef' below. Without either the add-on still deploys but cannot reach the cloud.
An add-on can also be bound to its own cloud identity with 'identity', the ServiceAccount annotations (and on Azure the labels) your cloud's workload identity reads. Where a workload identity cannot be used, such as a DNS zone or a model bucket in another cloud than the cluster, external-dns and model-serving take 'secretRef': the name of a Secret you created yourself in the add-on's namespace. One or the other, never both. Credentials are never placed in the add-on manifest; only the Secret's name is stored.
Every add-on also takes three settings beside its own block. 'availability' is Standard (the default: two copies of the components the cluster cannot work without, where it has two nodes for them) or High (two copies of every component that supports it). 'resources' sizes the add-on's main component the way a Kubernetes container is sized: 'requests' (cpu and memory reserved for it) and, optionally, 'limits' (the most it may use, at least the request). Where AstroPulse sets a limit and you have set none, the memory request is also the memory limit and the CPU limit is at least the request; set 'limits' to make them differ. 'components' sizes any of the add-on's components by name, each with its own 'resources' block; 'addons template' lists the names and AstroPulse's sizing for each. Any other field you leave out keeps its current value; a value written empty ("") is refused. 'resources: {}' or a component's '{}' returns it to AstroPulse's sizing, while 'components: {}' names no component and changes nothing. 'addons get' shows the copies that run and why.
external-dns takes 'policy': Sync (the default) creates, updates and deletes the records it owns, so a deleted application's record goes with it; UpsertOnly never deletes, for a zone shared with records managed by hand, and leaves stale records pointing at addresses the cloud may hand to someone else until you remove them.
nginx-ingress and gateway take 'exposure': Public (the default) puts the add-on's load balancer on the internet, where access policies still decide who may call an endpoint; Private makes it reachable only from inside the cluster's network (its VPC or VNet, and what is peered or connected to it). nginx-ingress has one load balancer, so every Ingress follows it. The gateway serves public and private model endpoints side by side; its exposure is the default for endpoints that name none. A cloud load balancer is billed by the hour by your cloud provider. On AWS every load balancer is a Network Load Balancer. Changing exposure replaces the load balancer: its address changes, external-dns moves the hostname, and connections drop briefly; --dry-run says so before anything changes.
astroctl infra kubernetes addons apply -f <file> [flags]
Examples
# cert-manager.yaml
# apiVersion: platform.astropulse.io/v1
# kind: K8sClusterAddon
# metadata:
# name: cert-manager
# spec:
# clusterName: production
# configuration:
# availability: High
# resources: # the main component (the controller)
# requests:
# cpu: 100m
# memory: 256Mi
# limits: # optional
# memory: 512Mi
# components: # any component, by name
# webhook:
# resources:
# requests:
# memory: 128Mi
# certManager:
# installCRDs: true
# # Let's Encrypt production and staging ClusterIssuers are created once
# # an email is set; endpoints use production (issuerType:
# # LetsEncryptStaging for testing, SelfSigned for certificates clients
# # trust themselves, or
# # enableClusterIssuer: false for none).
# email: ops@example.com
# # DNS-01 for certificates behind the gateway add-on: cert-manager's
# # ServiceAccount identity writes the challenge records (no credential).
# # On an EKS cluster AstroPulse created, both default to Route 53 and
# # the cert-manager role created with the cluster.
# identity:
# serviceAccountAnnotations:
# eks.amazonaws.com/role-arn: arn:aws:iam::123456789012:role/cert-manager-dns
# dnsSolver:
# hostedZoneId: Z0123456789ABC
# model-serving.yaml: how every model on the cluster reads a private artifact
# apiVersion: platform.astropulse.io/v1
# kind: K8sClusterAddon
# metadata:
# name: model-serving
# spec:
# clusterName: production
# configuration:
# modelServing:
# identity:
# serviceAccountAnnotations:
# eks.amazonaws.com/role-arn: arn:aws:iam::123456789012:role/model-reader
# # or, where a workload identity cannot be used, a Secret you created
# # in the kserve namespace (never both):
# # secretRef: model-store-credentials
astroctl infra k8s addons apply -f cert-manager.yaml
astroctl infra k8s addons apply -f cert-manager.yaml --dry-run
cat cert-manager.yaml | astroctl infra k8s addons apply -f -
# Print AstroPulse's response, warning included, as JSON
astroctl infra k8s addons apply -f cert-manager.yaml -o json
Options
--dry-run Validate without changing the cluster
-f, --file string Add-on manifest file, one add-on per file; use '-' for stdin (required)
-h, --help help for apply
-o, --output string Output format (table|wide|json|yaml) (default "table")
SEE ALSO
- astroctl infra kubernetes addons - Manage Kubernetes cluster add-ons