【问题标题】:Error - '''unsupported architecture for instance type "t2.micro": i386''' while creating a Kubernetes Cluster on AWS错误 - 在 AWS 上创建 Kubernetes 集群时出现“实例类型“t2.micro”:i386'''不支持的架构
【发布时间】:2021-07-13 06:19:02
【问题描述】:

我是这个平台的新手,这是我的第二个问题。一个月以来,我一直在尝试使用 AWS 设置 Kubernetes 集群,但未成功。但是每天我都会收到一个新的错误,但这一次,我无法解决这个错误。

我在以 Windows 作为主机的 Virtual Box 中使用 Kali Linux。我正在按照 Udemy 的设置教程进行设置。

  1. 我已经成功安装了 Kops、Kubectl 和 AWSCli。

  2. 我已使用 AWS configure 正确配置了密钥(出于学习目的,我已授予我的用户完整的管理员权限)

  3. 我创建了 S3 存储桶(授予它公共访问权限)

  4. 现在要创建托管区域,我使用了 AWS Route 53。 Here are specs of my hosted zone

  5. 因为我没有域,所以我从 freenom.com 购买了一个免费的子域并正确配置了名称服务器。 Free domain configuration

  6. 之后,我使用 ssh-keygen 创建了一对用于登录集群的密钥。

  7. 最后,我运行这个命令,

kops create cluster --name=kubernetes.hellaswell.ml --state=s3://kops-state-crap --zones=eu-west-1a --node-count=2 --node-size=t2.micro --master-size=t2.micro --dns-zone=kubernetes.hellaswell.ml                                   1 ⚙
I0418 22:49:10.855151   12216 new_cluster.go:238] Inferred "aws" cloud provider from zone "eu-west-1a"
I0418 22:49:10.855313   12216 new_cluster.go:962]  Cloud Provider ID = aws
I0418 22:49:12.604015   12216 subnets.go:180] Assigned CIDR 172.20.32.0/19 to subnet eu-west-1a

unable to determine machine architecture for InstanceGroup "master-eu-west-1a": unsupported architecture for instance type "t2.micro": i386

【问题讨论】:

  • 您使用的是什么 AMI?
  • 我正在使用 Kali Linux 访问 AWS 并配置我的集群。关于 AMI,它是 t2.micro。 (对不起,但我认为这是我在“kops 创建集群”命令中提到的图像。否则,我不知道我们也必须在其他地方指定它)。
  • 我不建议低于默认实例类型(目前为 t3.medium)。您很可能最终会得到一个无法适应基本工作负载或反应非常缓慢的集群。此外,如果您已经苦苦挣扎了一个月,您可以考虑加入 kops slack 频道以获得更快的反馈循环。

标签: amazon-web-services kubernetes aws-cli kubectl kops


【解决方案1】:

如果有 64 位变量可用,kOps 现在应该支持这些实例类型。

可以在此处找到修复程序:https://github.com/kubernetes/kops/pull/11463

【讨论】:

    【解决方案2】:

    谢谢https://stackoverflow.com/users/4523789/ole-markus-with,您对使用 t3.medium 的建议确实很有帮助。

    ┌──(kali㉿kali)-[~]
    └─$ kops create cluster --name=kube.hellaswell.ml --state=s3://kops-state-crap --zones=eu-west-1a --node-count=2 --node-size=t2.small --master-size=t2.small --dns-zone=kube.hellaswell.ml
    I0419 20:18:36.700942    2086 new_cluster.go:238] Inferred "aws" cloud provider from zone "eu-west-1a"
    I0419 20:18:36.700999    2086 new_cluster.go:962]  Cloud Provider ID = aws
    I0419 20:18:37.938892    2086 subnets.go:180] Assigned CIDR 172.20.32.0/19 to subnet eu-west-1a
    
    unable to determine machine architecture for InstanceGroup "master-eu-west-1a": unsupported architecture for instance type "t2.small": i386
                                                                                                                                                                                                                                                 
    ┌──(kali㉿kali)-[~]
    └─$ kops create cluster --name=kube.hellaswell.ml --state=s3://kops-state-crap --zones=eu-west-1a --node-count=2 --node-size=t2.medium --master-size=t2.medium --dns-zone=kube.hellaswell.ml                                             1 ⨯
    I0419 20:18:58.255708    2094 new_cluster.go:238] Inferred "aws" cloud provider from zone "eu-west-1a"
    I0419 20:18:58.255834    2094 new_cluster.go:962]  Cloud Provider ID = aws
    I0419 20:18:59.282307    2094 subnets.go:180] Assigned CIDR 172.20.32.0/19 to subnet eu-west-1a
    
    unable to determine machine architecture for InstanceGroup "master-eu-west-1a": unsupported architecture for instance type "t2.medium": i386
                                                                                                                                                                                                                                                 
    ┌──(kali㉿kali)-[~]
    └─$ kops create cluster --name=kube.hellaswell.ml --state=s3://kops-state-crap --zones=eu-west-1a --node-count=2 --node-size=t3.medium --master-size=t3.medium --dns-zone=kube.hellaswell.ml                                             1 ⨯
    I0419 20:20:47.323068    2103 new_cluster.go:238] Inferred "aws" cloud provider from zone "eu-west-1a"
    I0419 20:20:47.323286    2103 new_cluster.go:962]  Cloud Provider ID = aws
    I0419 20:20:49.012132    2103 subnets.go:180] Assigned CIDR 172.20.32.0/19 to subnet eu-west-1a
    I0419 20:20:51.943459    2103 create_cluster.go:726] Using SSH public key: /home/kali/.ssh/id_rsa.pub
    Previewing changes that will be made:
    
    I0419 20:21:03.446344    2103 executor.go:111] Tasks: 0 done / 77 total; 43 can run
    W0419 20:21:05.094898    2103 vfs_castore.go:604] CA private key was not found
    I0419 20:21:05.095112    2103 executor.go:111] Tasks: 43 done / 77 total; 16 can run
    I0419 20:21:06.137672    2103 executor.go:111] Tasks: 59 done / 77 total; 16 can run
    I0419 20:21:07.358255    2103 executor.go:111] Tasks: 75 done / 77 total; 2 can run
    I0419 20:21:08.538778    2103 executor.go:111] Tasks: 77 done / 77 total; 0 can run
    Will create resources:
      AutoscalingGroup/master-eu-west-1a.masters.kube.hellaswell.ml
    

    我是 AWS 和 Kubernetes 的新手,请原谅我的好奇心,但我想知道,其他人如何能够使用 t2.micro 创建集群。我也看过 Udemy 的教程和这个博客 https://www.scottyfullstack.com/blog/setting-up-a-free-tier-kubernetes-cluster-with-kop/

    【讨论】:

      【解决方案3】:

      实例类型“t2.micro”不支持的架构:i386

      一些 EC2 t2.micro 实例实际上是 32 位机器。见How to find if my Amazon EC2 instance is 32 bit or 64 bit?

      您的 Kubernetes 容器可能包含为 64 位机器编译的二进制文件。我建议您选择不同的 EC2 实例类型,例如t3.small。

      【讨论】:

      • 但是在 kops create cluster 命令中,没有指定 64 位或 32 位的选项。我将在命令中使用 t3.small,如果它有效,我会更新你。
      • kOps 二进制文件只有 64 位。没有可用的 32 位二进制文​​件。
      • t3.small 不工作。它给出了同样的错误。
      猜你喜欢
      • 1970-01-01
      • 2018-01-08
      • 2021-06-12
      • 2016-09-04
      • 2020-11-29
      • 2016-03-23
      • 1970-01-01
      • 1970-01-01
      • 2015-09-13
      相关资源
      最近更新 更多