...gcrKeyPath:(path to GCR service account key)sshPrivateKeyPath:(path to SSH private key, used for node access)gkeConnectAgentServiceAccountKeyPath:(path to Connect agent service account key)gkeConnectRegisterServiceAccountKeyPath:(path to Hub registration service account key)cloudOperationsServiceAccountKeyPath:(path to Cloud Operations service account key)...
構成を変更して、クラスタタイプを admin ではなく user を指定します。
...spec:# Cluster type. This can be:# 1) admin: to create an admin cluster. This can later be used to create# user clusters.# 2) user: to create a user cluster. Requires an existing admin cluster.# 3) hybrid: to create a hybrid cluster that runs admin cluster# components and user workloads.# 4) standalone: to create a cluster that manages itself, runs user# workloads, but does not manage other clusters.type:user...
gkeConnect.projectID フィールドにプロジェクト ID を指定して、クラスタをフリートに登録します。このプロジェクトはフリート ホスト プロジェクトと呼ばれます。
...# Sample admin cluster config for load balancer and address poolsloadBalancer:vips:controlPlaneVIP:10.200.0.49ingressVIP:10.200.0.50addressPools:-name:pool1addresses:-10.200.0.50-10.200.0.70......# Sample user cluster config for load balancer and address poolsloadBalancer:vips:controlPlaneVIP:10.200.0.71ingressVIP:10.200.0.72addressPools:-name:pool1addresses:-10.200.0.72-10.200.0.90...
ユーザー クラスタの構成ファイルの残りの部分は管理クラスタの構成ファイルと同じです。
クラスタノードの Pod 密度を指定します。
...# NodeConfig specifies the configuration that applies to all nodes in the cluster.nodeConfig:# podDensity specifies the pod density configuration.podDensity:# maxPodsPerNode specifies at most how many pods can be run on a single node.maxPodsPerNode:110...
[[["わかりやすい","easyToUnderstand","thumb-up"],["問題の解決に役立った","solvedMyProblem","thumb-up"],["その他","otherUp","thumb-up"]],[["わかりにくい","hardToUnderstand","thumb-down"],["情報またはサンプルコードが不正確","incorrectInformationOrSampleCode","thumb-down"],["必要な情報 / サンプルがない","missingTheInformationSamplesINeed","thumb-down"],["翻訳に関する問題","translationIssue","thumb-down"],["その他","otherDown","thumb-down"]],["最終更新日 2024-12-23 UTC。"],[],[],null,["In Google Distributed Cloud, user clusters run your workloads, and in a\n[multi-cluster architecture](/kubernetes-engine/distributed-cloud/bare-metal/docs/installing/creating-clusters/create-clusters-overview),\nuser clusters are created and managed by an admin cluster.\n\nOnce you've created an admin cluster, calling the `bmctl create config` command\ncreates a YAML file you can edit to define your user cluster. To apply the\nconfiguration and create the user cluster, use the `bmctl create cluster`\ncommand. Preflight checks are applicable to the user clusters created with\n`bmctl create cluster` command.\n\nKeeping workloads off the admin cluster protects sensitive administrative data,\nlike SSH keys stored in the admin cluster, from those who don't need access\nto that information. Additionally, keeping user clusters separate from each\nother provides good general security for your workloads.\n\nPrerequisites\n\n- Latest `bmctl` is downloaded (`gs://anthos-baremetal-release/bmctl/1.32.400-gke.68/linux-amd64/bmctl`) from Cloud Storage.\n- Working admin cluster with access to the cluster API server (the `controlPlaneVIP`).\n- Admin cluster nodes have network connectivity to all nodes on the target user cluster.\n- Workstation running `bmctl` has network connectivity to all nodes in the target user clusters.\n- The admin workstation can establish an SSH connection to each of the user cluster nodes.\n- Connect-register service account is configured on the admin cluster for use with Connect.\n\nEnable SELinux\n\nIf you want to enable SELinux to secure your containers, you must make sure that\nSELinux is enabled in `Enforced` mode on all your host machines. Starting with\nGoogle Distributed Cloud release 1.9.0 or later, you can enable or disable SELinux\nbefore or after cluster creation or cluster upgrades. SELinux is enabled by\ndefault on Red Hat Enterprise Linux (RHEL). If SELinux is disabled on your host\nmachines or you aren't sure, see [Securing your containers using SELinux](/kubernetes-engine/distributed-cloud/bare-metal/docs/installing/configure-selinux) for instructions on how to enable it.\n\nGoogle Distributed Cloud supports SELinux in only RHEL systems.\n\nCreate a user cluster configuration file\n\nThe configuration file for creating a user cluster is almost exactly the same as the\none used for creating an admin cluster. The only difference is that you remove\nthe local credentials configuration section to make the config a valid\ncollection of Kubernetes resources. The configuration section is at the top of\nthe file under the `bmctl configuration variables` section. For examples of user\ncluster configurations, see\n[User clusters](/kubernetes-engine/distributed-cloud/bare-metal/docs/reference/config-samples#user_clusters)\nin the Cluster configuration samples.\n\nBy default, user clusters inherit their credentials from the admin cluster that\nmanages them. You can selectively override some or all of these credentials.\n\n1. Create a user cluster configuration file with the `bmctl create config` command:\n\n bmctl create config -c \u003cvar translate=\"no\"\u003eUSER_CLUSTER_NAME\u003c/var\u003e\n\n For example, issue the following to create a configuration file for a user cluster\n called `user1`: \n\n bmctl create config -c user1\n\n The file is written to `bmctl-workspace/user1/user1.yaml`. The generic path\n to the file is `bmctl-workspace/`\u003cvar translate=\"no\"\u003eCLUSTER NAME\u003c/var\u003e`/`\u003cvar translate=\"no\"\u003eCLUSTER_NAME.yaml\u003c/var\u003e.\n2. Edit the configuration file with the following changes:\n\n - Remove the local credentials file paths from the config:\n\n ...\n gcrKeyPath: (path to Artifact Registry service account key)\n sshPrivateKeyPath: (path to SSH private key, used for node access)\n gkeConnectAgentServiceAccountKeyPath: (path to Connect agent service account key)\n gkeConnectRegisterServiceAccountKeyPath: (path to Hub registration service account key)\n cloudOperationsServiceAccountKeyPath: (path to Cloud Operations service account key)\n ...\n\n - Change the config to specify a cluster type of `user` instead of `admin`:\n\n ...\n spec:\n # Cluster type. This can be:\n # 1) admin: to create an admin cluster. This can later be used to create\n # user clusters.\n # 2) user: to create a user cluster. Requires an existing admin cluster.\n # 3) hybrid: to create a hybrid cluster that runs admin cluster\n # components and user workloads.\n # 4) standalone: to create a cluster that manages itself, runs user\n # workloads, but does not manage other clusters.\n type: user\n ...\n\n - Register your clusters to a [fleet](/kubernetes-engine/fleet-management/docs) by specifying\n your project ID in the `gkeConnect.projectID` field. This project is referred to\n as the [fleet host project](/kubernetes-engine/fleet-management/docs/fleet-concepts#fleet-host-project).\n\n ...\n gkeConnect:\n projectID: my-project-123\n ...\n\n - Optionally, you can add [`gkeConnect.location`](/kubernetes-engine/distributed-cloud/bare-metal/docs/reference/cluster-config-ref#gkeconnect-location) to the cluster spec to specify the Google Cloud region in which the Fleet and the Connect services run. This regional membership restricts fleet service traffic to your region. If you include `gkeConnect.location` in the cluster spec, the region that you specify must be the same as the region configured in `clusterOperations.location`. If the regions aren't the same, cluster creation fails.\n - If the GKE On-Prem API is enabled in your\n Google Cloud project, all clusters in the project are\n [enrolled in the GKE On-Prem API](/kubernetes-engine/distributed-cloud/bare-metal/docs/how-to/enroll-cluster)\n automatically in the region configured in `clusterOperations.location`.\n\n - If you want to enroll all clusters in the project in the GKE On-Prem API,\n be sure to do the steps in\n [Before you begin](/kubernetes-engine/distributed-cloud/bare-metal/docs/how-to/enroll-cluster#before_you_begin)\n to activate and use the GKE On-Prem API in the project.\n\n - If you don't want to enroll the cluster in the GKE On-Prem API, include\n this section and set `gkeOnPremAPI.enabled` to `false`. If you don't\n want to enroll any clusters in the project, disable\n `gkeonprem.googleapis.com` (the service name for the GKE On-Prem API)\n in the project. For instructions, see\n [Disabling services](/service-usage/docs/enable-disable#disabling).\n\n - Specify the IP address of the control plane node.\n\n ...\n # Sample control plane config\n controlPlane:\n nodePoolSpec:\n nodes:\n - address: 10.200.0.20\n ...\n\n - Ensure the admin and user cluster specifications for the load balancer VIPs\n and address pools are complementary, and don't overlap existing clusters.\n The following example shows a sample pair of admin and user cluster\n configurations, specifying load balancing and address pools:\n\n ...\n # Sample admin cluster config for load balancer and address pools\n loadBalancer:\n vips:\n controlPlaneVIP: 10.200.0.49\n ingressVIP: 10.200.0.50\n addressPools:\n - name: pool1\n addresses:\n - 10.200.0.50-10.200.0.70\n ...\n ...\n # Sample user cluster config for load balancer and address pools\n loadBalancer:\n vips:\n controlPlaneVIP: 10.200.0.71\n ingressVIP: 10.200.0.72\n addressPools:\n - name: pool1\n addresses:\n - 10.200.0.72-10.200.0.90\n ...\n\n The rest of the user cluster configuration files are the same as the\n admin cluster config.\n - Specify the pod density of cluster nodes:\n\n ...\n # NodeConfig specifies the configuration that applies to all nodes in the cluster.\n nodeConfig:\n # podDensity specifies the pod density configuration.\n podDensity:\n # maxPodsPerNode specifies at most how many pods can be run on a single node.\n maxPodsPerNode: 110\n ...\n\n For user clusters, allowable values for `maxPodsPerNode` are `32-250`. The\n default value if unspecified is `110`. Once the cluster is created, this\n value cannot be updated.\n\n Pod density is also limited by your cluster's available IP resources. For\n details, see\n [Pod networking](/kubernetes-engine/distributed-cloud/bare-metal/docs/concepts/network-reqs#pod_networking).\n\nCreate the user cluster\n\nIssue the `bmctl` command to apply the user cluster config and create the\ncluster: \n\n bmctl create cluster -c \u003cvar translate=\"no\"\u003eUSER_CLUSTER_NAME\u003c/var\u003e --kubeconfig \u003cvar translate=\"no\"\u003eADMIN_KUBECONFIG\u003c/var\u003e\n\nReplace the following:\n\n- \u003cvar translate=\"no\"\u003e\u003ccode translate=\"no\" dir=\"ltr\"\u003eUSER_CLUSTER_NAME\u003c/code\u003e\u003c/var\u003e: the cluster name created in the previous section.\n- \u003cvar translate=\"no\"\u003e\u003ccode translate=\"no\" dir=\"ltr\"\u003eADMIN_KUBECONFIG\u003c/code\u003e\u003c/var\u003e: the path to the admin cluster kubeconfig file.\n\nFor example, for a user cluster named `user1`, and an admin cluster kubeconfig\nfile with the path `kubeconfig bmctl-workspace/admin/admin-kubeconfig`, the\ncommand would be: \n\n bmctl create cluster -c user1 --kubeconfig bmctl-workspace/admin/admin-kubeconfig\n\nSample user cluster configurations\n\nFor example user cluster configurations, see\n[User clusters](/kubernetes-engine/distributed-cloud/bare-metal/docs/reference/config-samples#user_clusters) in the\nCluster configuration samples."]]