OC-ADM-MIGRATE-TEMPLATE-INSTANCES(1)

πŸ“¦
version 4.22.0 Β· 2 versions
, in nixpkgs unstable

πŸ’… oc adm migrate template-instances β€” bestie edition

okay so real talk, this page lives in the Openshift CLI User Manuals and it's dated June 2016 β€” vintage, honestly, but still iconic. Let's get into it ✨


🌸 NAME

oc adm migrate template-instances β€” the glow-up command that updates your template instances so they point at the latest group-version-kinds 🫢


πŸ¦‹ SYNOPSIS

oc adm migrate template-instances [OPTIONS]

✨ DESCRIPTION

So basically: migrate your template instances so they refer to the new API groups. It's giving "out with the old, in with the new" πŸ’…

Here's the whole vibe β€” this command locates and updates every single template instance that refers to one particular group-version-kind, and makes it refer to some other, equivalent group-version-kind instead.

It's literally a matchmaking service for GVKs, no cap πŸŽ€

The following transformations will occur (these are exact, don't @ me):

  • .Build --> build.openshift.io/v1.Build
  • .BuildConfig --> build.openshift.io/v1.BuildConfig
  • .DeploymentConfig --> apps.openshift.io/v1.DeploymentConfig
  • .Route --> route.openshift.io/v1.Route
  • v1.Build --> build.openshift.io/v1.Build
  • v1.BuildConfig --> build.openshift.io/v1.BuildConfig
  • v1.DeploymentConfig --> apps.openshift.io/v1.DeploymentConfig
  • v1.Route --> route.openshift.io/v1.Route

πŸ’– OPTIONS

  • -A, --all-namespaces=true β€” migrate objects in all namespaces, every single one of them. Defaults to true. she's thorough πŸ’…
  • --allow-missing-template-keys=true β€” if true, just ignore any errors in templates when a field or map key is missing from the template. ngl this only applies to golang and jsonpath output formats, iykyk.
  • --confirm=false β€” if true, all requested objects will be migrated. Defaults to false. yes bestie, nothing actually happens until you say confirm πŸ™ˆ
  • -f, --filename=[] β€” filename, directory, or URL to docker-compose.yml file to use
  • --from-key="" β€” if specified, only migrate items with a key (namespace/name or name) greater than or equal to this value
  • --include=[templateinstance] β€” resource types to migrate. heads up: passing --filename will override this flag πŸ‘‘
  • -o, --output="" β€” output format. one of: (json, yaml, kyaml, name, go-template, go-template-file, template, templatefile, jsonpath, jsonpath-as-json, jsonpath-file)
  • --show-managed-fields=false β€” if true, keep the managedFields when printing objects in JSON or YAML format. keep the receipts, honestly πŸ’€
  • --template="" β€” template string or path to template file to use when -o=go-template, -o=go-template-file. the template format is golang templates [ ⟨http://golang.org/pkg/text/template/#pkg-overview⟩ ] 🌈
  • --to-key="" β€” if specified, only migrate items with a key (namespace/name or name) less than this value

🧚 OPTIONS INHERITED FROM PARENT COMMANDS

these are the hand-me-downs from the parent command, and yes they're all still cute:

  • --as="" β€” username to impersonate for the operation. user could be a regular user or a service account in a namespace.
  • --as-group=[] β€” group to impersonate for the operation. this flag can be repeated to specify multiple groups πŸ”
  • --as-uid="" β€” UID to impersonate for the operation.
  • --as-user-extra=[] β€” user extras to impersonate for the operation. this flag can be repeated to specify multiple values for the same key.
  • --cache-dir="/homeless-shelter/.kube/cache" β€” default cache directory
  • --certificate-authority="" β€” path to a cert file for the certificate authority
  • --client-certificate="" β€” path to a client certificate file for TLS
  • --client-key="" β€” path to a client key file for TLS
  • --cluster="" β€” the name of the kubeconfig cluster to use
  • --context="" β€” the name of the kubeconfig context to use
  • --disable-compression=false β€” if true, opt-out of response compression for all requests to the server
  • --insecure-skip-tls-verify=false β€” if true, the server's certificate will not be checked for validity. ⚠️ this will make your HTTPS connections insecure β€” like, actually, be careful bestie.
  • --kubeconfig="" β€” path to the kubeconfig file to use for CLI requests.
  • --kuberc="" β€” path to the kuberc file to use for preferences. this can be disabled by exporting KUBECTL_KUBERC=false feature gate or turning off the feature KUBERC=off.
  • --match-server-version=false β€” require server version to match client version
  • -n, --namespace="" β€” if present, the namespace scope for this CLI request
  • --profile="none" β€” name of profile to capture. one of (none|cpu|heap|goroutine|threadcreate|block|mutex)
  • --profile-output="profile.pprof" β€” name of the file to write the profile to
  • --request-timeout="0" β€” the length of time to wait before giving up on a single server request. non-zero values should contain a corresponding time unit (e.g. 1s, 2m, 3h). a value of zero means don't timeout requests. she waits forever, loyal queen 🫢
  • -s, --server="" β€” the address and port of the Kubernetes API server
  • --tls-server-name="" β€” server name to use for server certificate validation. if it is not provided, the hostname used to contact the server is used
  • --token="" β€” bearer token for authentication to the API server
  • --user="" β€” the name of the kubeconfig user to use
  • --warnings-as-errors=false β€” treat warnings received from the server as errors and exit with a non-zero exit code πŸ”₯

πŸ“ EXAMPLE

ok so first, a dry-run of updating all objects β€” literally just vibe-checking what would happen, no commitment:

# Perform a dry-run of updating all objects
oc adm migrate template-instances

then to actually perform the update, the confirm flag must be appended. main character move πŸ‘‘:

# To actually perform the update, the confirm flag must be appended
oc adm migrate template-instances --confirm
⚠️ reminder from your girl: without --confirm, it's a dry-run. she will not touch anything. it's giving "look but don't touch" πŸ’…

πŸ’œ SEE ALSO


πŸŽ€ HISTORY

June 2016 β€” Ported from the Kubernetes man-doc generator. old money, honestly. vintage. archival. we respect her 🌸


πŸ’– that's the whole page bestie πŸ’–

and shoutout to the source: this one comes from Openshift β€” the Openshift CLI User Manuals β€” dated June 2016. mwah, go migrate some template instances, ilysm 🫢✨

πŸ“¦ where this page comes from