Create a manifest for the F5 Artifact Registry pull secret¶
Introduction¶
To install F5 Lifecycle Operator (FLO) and BIG-IP Next for Kubernetes, your cluster must pull container images from F5 Artifact Registry (FAR).
Create the manifest¶
Create a file to use as a script that creates a manifest for the F5 Artifact Registry pull secret:
touch create-far-pull-secret-manifest.shOpen the file in a text editor.
Copy the following code and paste it into the file:
#!/usr/bin/env bash set -euo pipefail # Path to the FAR service account key JSON file KEY_FILE="cne_pull_64.json" if [[ ! -f "$KEY_FILE" ]]; then echo "ERROR: Service account key file not found: $KEY_FILE" >&2 exit 1 fi # Read the service account key JSON SERVICE_ACCOUNT_KEY="$(cat "$KEY_FILE")" # FAR expects "_json_key_base64:<key>" to be base64-encoded as the auth value SERVICE_ACCOUNT_K8S_SECRET="$(printf "%s" "_json_key_base64:${SERVICE_ACCOUNT_KEY}" | base64 -w 0)" # Build the dockerconfigjson content and base64-encode it for the Secret DOCKERCONFIG_JSON_B64="$( printf '%s' "{\"auths\":{\"repo.f5.com\":{\"auth\":\"${SERVICE_ACCOUNT_K8S_SECRET}\"}}}" | base64 -w 0 )" # Write the Kubernetes secret manifest cat > far-pull-secret.yaml <<EOF apiVersion: v1 kind: Secret metadata: name: far-pull-secret type: kubernetes.io/dockerconfigjson data: .dockerconfigjson: ${DOCKERCONFIG_JSON_B64} EOF echo "Generated: far-pull-secret.yaml"
Note
The script assumes the service-account-key file is named
cne_pull_64.jsonand is in the current directory.On Linux, the script uses
base64 -w 0to prevent line wrapping.On macOS, remove the
-w 0option from thebase64commands because macOSbase64does not support it.
Save and close the file.
Make the file executable:
chmod +x create-far-pull-secret-manifest.sh
Run the script:
./create-far-pull-secret-manifest.sh cne_pull_64.jsonThe script creates a file named
far-pull-secret.yaml.