[[["易于理解","easyToUnderstand","thumb-up"],["解决了我的问题","solvedMyProblem","thumb-up"],["其他","otherUp","thumb-up"]],[["很难理解","hardToUnderstand","thumb-down"],["信息或示例代码不正确","incorrectInformationOrSampleCode","thumb-down"],["没有我需要的信息/示例","missingTheInformationSamplesINeed","thumb-down"],["翻译问题","translationIssue","thumb-down"],["其他","otherDown","thumb-down"]],["最后更新时间 (UTC):2025-08-31。"],[],[],null,["This page describes the fields in a credentials configuration file for Google Distributed Cloud.\n\nYou use a credentials configuration file to hold usernames and passwords. Here\nare some examples of how you would use a credentials configuration file:\n\n- In your\n [admin cluster configuration file](/kubernetes-engine/distributed-cloud/vmware/docs/how-to/admin-cluster-configuration-file-latest),\n specify a file that holds credentials for your vCenter server.\n\n- In your admin cluster configuration file, specify a file that holds\n credentials for your private Docker registry.\n\n**Template**\nClick to see a template for a credentials configuration file. \n\n```yaml\napiVersion: v1\nkind: \"CredentialFile\"\nitems:\n- name: \"\"\n username: \"\"\n password: \"\"\n- name: \"\"\n username: \"\"\n password: \"\"\n- ...\n```\n\nKeeping credentials in a file that is separate from your cluster\nconfiguration file helps to limit the number of people who have access to\nthe credentials.\n\nFilling in the fields in a credentials configuration file\n\nIn your credentials configuration file, enter fields values as described in\nthis section.\n\n`items`\n\nArray of objects, each of which holds a username and password.\n\n`items[0].name`\n\nString. A name of your choice for the object. For example: \n\n```\nitems:\n- name: \"vcenter-creds\"\n```\n\n`items[0].username`\n\nString. A username. For example: \n\n```\nitems:\n- name: \"vcenter-creds\"\n username: \"my-vcenter-account\"\n```\n\nWhen you are using Active Directory (AD), you must specify the username\nwith the domain name in the `username` field, for example:\n`username: \"userName@domainName\"` or `username: \"domainName\\\\username\"`.\nIf you don't specify the domain name, the vSphere Container Storage Plug-in\nwon't function properly.\n\n`items[0].password`\n\nString. A password. For example: \n\n```\nitems:\n- name: \"vcenter-creds\"\n passwords: \"U$icUKEW#INE\"\n```\n\nExample of a credentials configuration file\n\nHere's an example of a credentials configuration file that holds three sets of\ncredentials. \n\n```\napiVersion: v1\nkind: \"CredentialFile\"\nitems:\n- name: \"vcenter-creds\"\n username: \"my-vcenter-account\"\n password: \"U$icUKEW#INE\"\n- name: \"f5-creds\"\n username: \"my-f5-account\"\n password: \"exvQVx^@L%F1\"\n- name: \"private-registry-creds\"\n username: \"my-registry-account\"\n password: \"kIJGS&uRm2Vh\"\n```\n\nNotice that each block of credentials has a name. In your admin cluster\nconfiguration file, you specify the name of a credentials block in a\n`fileRef.entry` field.\n\nHere's an example that shows portions of an admin cluster configuration file.\nYou can see that the file specifies three blocks of credentials, all of which\nare in the same credentials file: \n\n```\nvCenter:\n credentials:\n fileRef:\n path: \"my-folder/my-creds.yaml\"\n entry: \"vcenter-creds\"\n...\nloadBalancer:\n f5BigIP:\n credentials:\n fileRef:\n path: \"my-folder/my-creds.yaml\"\n entry: \"f5-creds\"\n...\nprivateRegistry:\n credentials:\n fileRef:\n path: \"my-folder/my-creds.yaml\"\n entry: \"private-registry-creds\"\n```"]]