Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

阿里云 K8S环境搭建失败 #2516

Open
yun1989yue opened this issue Mar 13, 2024 · 1 comment
Open

阿里云 K8S环境搭建失败 #2516

yun1989yue opened this issue Mar 13, 2024 · 1 comment

Comments

@yun1989yue
Copy link

File: /release-1.5/zh/deploy-on-alibaba-cloud.md

文档提供的搭建方式太老了,不适配现在的阿里云服务。
比如创建k8s集群时报错如下
│ Error: [ERROR] terraform-provider-alicloud/alicloud/resource_alicloud_cs_managed_kubernetes.go:714: Resource alicloud_cs_managed_kubernetes CreateKubernetesCluster Failed!!! %!s(*cs.ClusterCommonResponse=):
│ Aliyun API Error: RequestId: Status Code: 400 Code: InvalidKubernetesVersion Message: The specified KubernetesVersion 1.14.8-aliyun.1 is invalid, allowd values are [1.28.3-aliyun.1 1.26.3-aliyun.1 1.24.6-aliyun.1]

│ with module.tidb-operator.alicloud_cs_managed_kubernetes.k8s,
│ on ../modules/aliyun/tidb-operator/main.tf line 51, in resource "alicloud_cs_managed_kubernetes" "k8s":
│ 51: resource "alicloud_cs_managed_kubernetes" "k8s" {
将集群配置更新为1.24.6-aliyun.1后,还有以下诸多错误
module.tidb-operator.null_resource.setup-env (local-exec): error: error parsing https://raw.githubusercontent.com/pingcap/tidb-operator/v1.5.2/manifests/crd.yaml: read tcp 172.16.147.188:56506->185.199.110.133:443: read: connection reset by peer
module.tidb-operator.null_resource.setup-env (local-exec): serviceaccount/tiller created
module.tidb-operator.null_resource.setup-env (local-exec): error: resource mapping not found for name: "tiller-clusterrolebinding" namespace: "" from "/root/tidb-operator/deploy/aliyun/tiller-rbac.yaml": no matches for kind "ClusterRoleBinding" in version "rbac.authorization.k8s.io/v1alpha1"
module.tidb-operator.null_resource.setup-env (local-exec): ensure CRDs are installed first
module.tidb-operator.null_resource.setup-env (local-exec): storageclass.storage.k8s.io/alicloud-disk created
module.tidb-operator.null_resource.setup-env (local-exec): configmap/local-provisioner-config created
module.tidb-operator.null_resource.setup-env (local-exec): storageclass.storage.k8s.io/local-volume created
module.tidb-operator.null_resource.setup-env (local-exec): daemonset.apps/local-volume-provisioner created
module.tidb-operator.null_resource.setup-env (local-exec): Error from server (NotFound): daemonsets.apps "flexvolume" not found
module.tidb-operator.null_resource.setup-env (local-exec): WARNING: Kubernetes configuration file is group-readable. This is insecure. Location: /root/tidb-operator/deploy/aliyun/credentials/kubeconfig
module.tidb-operator.null_resource.setup-env (local-exec): WARNING: Kubernetes configuration file is world-readable. This is insecure. Location: /root/tidb-operator/deploy/aliyun/credentials/kubeconfig
module.tidb-operator.null_resource.setup-env (local-exec): WARNING: Kubernetes configuration file is group-readable. This is insecure. Location: /root/tidb-operator/deploy/aliyun/credentials/kubeconfig
module.tidb-operator.null_resource.setup-env (local-exec): WARNING: Kubernetes configuration file is world-readable. This is insecure. Location: /root/tidb-operator/deploy/aliyun/credentials/kubeconfig
module.tidb-operator.null_resource.setup-env (local-exec): Error: unknown command "init" for "helm"

module.tidb-operator.null_resource.setup-env (local-exec): Did you mean this?
module.tidb-operator.null_resource.setup-env (local-exec): lint

module.tidb-operator.null_resource.setup-env (local-exec): Run 'helm --help' for usage.
module.tidb-operator.null_resource.setup-env (local-exec): WARNING: Kubernetes configuration file is group-readable. This is insecure. Location: /root/tidb-operator/deploy/aliyun/credentials/kubeconfig
module.tidb-operator.null_resource.setup-env (local-exec): WARNING: Kubernetes configuration file is world-readable. This is insecure. Location: /root/tidb-operator/deploy/aliyun/credentials/kubeconfig
module.tidb-operator.null_resource.setup-env: Still creating... [6m30s elapsed]
module.tidb-operator.null_resource.setup-env (local-exec): NAME NAMESPACE REVISION UPDATED STATUS CHART APP VERSION
module.tidb-operator.null_resource.setup-env: Creation complete after 6m31s [id=8988119212040749810]
module.tidb-operator.data.helm_repository.pingcap: Reading...
module.tidb-operator.data.helm_repository.pingcap: Read complete after 0s [id=pingcap]
module.tidb-operator.helm_release.tidb-operator: Creating...

│ Warning: "internet_max_bandwidth_in": [DEPRECATED] The attribute is invalid and no any affect for the instance. So it has been deprecated from version v1.121.2.

│ with module.bastion.alicloud_instance.bastion,
│ on ../modules/aliyun/bastion/bastion.tf line 32, in resource "alicloud_instance" "bastion":
│ 32: resource "alicloud_instance" "bastion" {



│ Error: deployments.apps "tiller-deploy" not found

│ with module.tidb-operator.helm_release.tidb-operator,
│ on ../modules/aliyun/tidb-operator/operator.tf line 52, in resource "helm_release" "tidb-operator":
│ 52: resource "helm_release" "tidb-operator" {

是否能基于当前的阿里云环境提供一个适配的文档?

@csuzhangxc
Copy link
Member

可以不使用 terraform,而是先按阿里云官方推荐的方式创建 ACK 与 Node,再使用标准 K8s 的 Helm Chart 方式部署。

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants