apiVersion:v1kind:ClusterSecrets# List of secret groups; for admin clusters it allows only one groupsecretGroups:
#(Required for user clusters only) A unique name for secret namespace; it needs to
#have prefix 'gke-onprem-secrets-' (example:gke-onprem-secrets-test)
‐namespace:""# Secrets in this namespacesecrets:# The credentials for vCentervCenter:username:""password:""# The credentials for f5BigIPf5BigIP:username:""password:""# The GCP service account key used to pull GKE imagescomponentAccessServiceAccount:serviceAccountKeyPath:""# The GCP service account key used to register the clusterregisterServiceAccount:serviceAccountKeyPath:""# The GCP service account key used to send logs and metrics from the clusterstackdriverServiceAccount:serviceAccountKeyPath:""# The GCP service account key used to send audit logs from the clustercloudAuditLoggingServiceAccount:serviceAccountKeyPath:""# The credentials for private registryprivateRegistry:username:""password:""
[[["容易理解","easyToUnderstand","thumb-up"],["確實解決了我的問題","solvedMyProblem","thumb-up"],["其他","otherUp","thumb-up"]],[["難以理解","hardToUnderstand","thumb-down"],["資訊或程式碼範例有誤","incorrectInformationOrSampleCode","thumb-down"],["缺少我需要的資訊/範例","missingTheInformationSamplesINeed","thumb-down"],["翻譯問題","translationIssue","thumb-down"],["其他","otherDown","thumb-down"]],["上次更新時間:2025-09-01 (世界標準時間)。"],[],[],null,["This document describes the fields in a Secrets configuration file. You use a\nSecrets configuration file when you create\n[prepared Secrets](/kubernetes-engine/distributed-cloud/vmware/docs/how-to/prepared-credentials).\n\nA Secrets configuration file holds a set of Secret groups. Each group has\nthe name of a Kubernetes namespace and credentials for one or more of\nthe following:\n\n- vCenter Server\n- F5 BIG-IP\n- A [component access service account](/kubernetes-engine/distributed-cloud/vmware/docs/how-to/service-accounts#component_access_service_account)\n- A [connect-register service account](/kubernetes-engine/distributed-cloud/vmware/docs/how-to/service-accounts#connect_register_service_account)\n- A [logging-monitoring service account](/kubernetes-engine/distributed-cloud/vmware/docs/how-to/service-accounts#logging_monitoring_service_account)\n- An [audit logging service account](/kubernetes-engine/distributed-cloud/vmware/docs/how-to/service-accounts#audit_logging_service_account)\n- A [usage metering service account](/kubernetes-engine/distributed-cloud/vmware/docs/how-to/service-accounts#usage_metering_service_account)\n- Private registry\n\nYou provide a Secrets configuration file as input to the `gkectl create secrets`\ncommand. For each Secret group, the command creates Kubernetes Secrets: one\nSecret for each of the credentials in the group. The command creates the Secrets\nin an admin cluster in the specified Kubernetes namespace.\n\nTo get started, create a template for your Secrets configuration file:\n\n```\ngkectl create-config secrets\n```\n\n**Template**\nClick to see the generated template. \n\n```yaml\napiVersion: v1\nkind: ClusterSecrets\n# List of secret groups; for admin clusters it allows only one group\nsecretGroups:\n# (Required for user clusters only) A unique name for secret namespace; it needs to\n# have prefix 'gke-onprem-secrets-' (example: gke-onprem-secrets-test)\n‐ namespace: \"\"\n # Secrets in this namespace\n secrets:\n # The credentials for vCenter\n vCenter:\n username: \"\"\n password: \"\"\n # The credentials for f5BigIP\n f5BigIP:\n username: \"\"\n password: \"\"\n # The GCP service account key used to pull GKE images\n componentAccessServiceAccount:\n serviceAccountKeyPath: \"\"\n # The GCP service account key used to register the cluster\n registerServiceAccount:\n serviceAccountKeyPath: \"\"\n # The GCP service account key used to send logs and metrics from the cluster\n stackdriverServiceAccount:\n serviceAccountKeyPath: \"\"\n # The GCP service account key used to send audit logs from the cluster\n cloudAuditLoggingServiceAccount:\n serviceAccountKeyPath: \"\"\n # The credentials for private registry\n privateRegistry:\n username: \"\"\n password: \"\" \n```\n\nFilling in the fields in a Secrets configuration file\n\n`secretGroups`\n\nAn array of objects. Each object has the name of a Kubernetes namespace and a\nset of credentials.\n\nFor an admin cluster, only one Secret group is allowed.\n\n`secretGroups[i].namespace`\n\nUser cluster only.\n\nA name of your choice for a Kubernetes namespace that will hold a set of\nSecrets. The name must begin with `gke-onprem-secrets-`.\n\nExample:\n\n```\nsecretGroups:\n- namespace: \"gke-onprem-secrets-bob\"\n secrets:\n ...\n- namespace: \"gke-onprem-secrets-alice\"\n secrets:\n ...\n```\n\n`secretGroups[i].secrets.vCenter`\n\nThe username and password of a vCenter account.\n\nExample:\n\n```\nsecretGroups:\n- namespace: \"gke-onprem-secrets-bob\"\n secrets:\n vCenter:\n username: \"vc-bob\"\n password: \"U$icUKEW#INE\"\n```\n\n`secretGroups[i].secrets.f5BigIP`\n\nThe username and password of an F5 BIG-IP account.\n\nExample:\n\n```\nsecretGroups:\n- namespace: \"gke-onprem-secrets-bob\"\n secrets:\n f5BigIP:\n username: \"f5-bob\"\n password: \"exvQVx^@L%F1\"\n```\n\n`secretGroups[i].secrets.componentAccessServiceAccount.serviceAccountKeyPath`\n\nThe path of a JSON key file for a\n[component access service account](/kubernetes-engine/distributed-cloud/vmware/docs/how-to/service-accounts#component_access_service_account).\n\n```\nsecretGroups:\n- namespace: \"gke-onprem-secrets-bob\"\n secrets:\n componentAccessServiceAccount:\n serviceAccountKeyPath: \"my-folder/component-access-key.json\"\n```\n\n`secretGroups[i].secrets.registerServiceAccount.serviceAccountKeyPath`\n\nThe path of a JSON key file for a\n[connect-register service account](/kubernetes-engine/distributed-cloud/vmware/docs/how-to/service-accounts#connect_register_service_account).\n\n```\nsecretGroups:\n- namespace: \"gke-onprem-secrets-bob\"\n secrets:\n registerServiceAccount:\n serviceAccountKeyPath: \"my-folder/connect-register-key.json\"\n```\n\n`secretGroups[i].secrets.stackdriverServiceAccount.serviceAccountKeyPath`\n\nThe path of a JSON key file for a\n[logging-monitoring service account](/kubernetes-engine/distributed-cloud/vmware/docs/how-to/service-accounts#logging_monitoring_service_account).\n\nExample:\n\n```\nsecretGroups:\n- namespace: \"gke-onprem-secrets-bob\"\n secrets:\n stackdriverServiceAccount:\n serviceAccountKeyPath: \"my-folder/log-mon-key.json\"\n```\n\n`secretGroups[i].secrets.cloudAuditLoggingServiceAccount.serviceAccountKeyPath`\n\nThe path of a JSON key file for an\n[audit logging service account](/kubernetes-engine/distributed-cloud/vmware/docs/how-to/service-accounts#audit_logging_service_account).\n\n```\nsecretGroups:\n- namespace: \"gke-onprem-secrets-bob\"\n secrets:\n cloudAuditLoggingServiceAccount:\n serviceAccountKeyPath: \"my-folder/audit-log-key.json\"\n```\n\n`secretGroups[i].secrets.privateRegistry`\n\nThe username and password of the **private** registry if using the private\nregistry.\n\nExample:\n\n```\nsecretGroups:\n- namespace: \"gke-onprem-secrets-bob\"\n secrets:\n privateRegistry:\n username: \"registry-user-bob\"\n password: \"f[vuV3^@L*4g\"\n```"]]