如何解决Jenkins X 3 EKS 快速入门未启动 git 操作员或正确创建命名空间
我正在尝试启动并运行 Jenkins X 3.2.127 以接管以前的 Jenkins X 2 集群,从我的 Windows 10 机器运行安装并遵循 https://github.com/jx3-gitops-repositories/jx3-terraform-eks/blob/main/README.md 上的官方指南。但是,我遇到了很多问题。
我已将 https://github.com/jx3-gitops-repositories/jx3-eks-vault 和 https://github.com/jx3-gitops-repositories/jx3-eks-vault 导入我的组织并在本地进行了更改。该过程还坚持使用 terraform 0.14.x 而不是 Chocolatey 安装的 0.15.x,因此我已将其降级。
在 \jx3-terraform-eks\.terraform\modules\eks-jx\modules\cluster\main.tf
内,我必须进行以下更改 -
- 在
module "eks"
下添加
# windows workaround
wait_for_cluster_interpreter = ["C:/Program Files/Git/bin/sh.exe","-c"]
wait_for_cluster_cmd = "until curl -sk $ENDPOINT >/dev/null; do sleep 4; done"
- 在
resource "null_resource" "kubeconfig"
下,将解释器路径改为本地bash路径(不,我不知道为什么一开始指定了sh和其他bash)
在 /jx3-terraform-eks/variables.tf
中设置了变量值,给出了 AWS 区域、Kubernetes 集群版本、集群名称(为了安全而不同于我们之前的 jx2 集群)、我们集群 git 存储库的 git repo (/{{organisation}}/jx3-eks-vault.git)
,我们的机器人用户名及其 github 令牌。
terraform init
、terraform plan
和 terraform apply
都运行无误。我已经运行 kubectl config use-context <<New cluster name>>
来切换到新集群,但是这里出了问题。似乎没有正确安装 git 操作符,也没有正确配置命名空间;我应该可以在这里运行 jx ns jx
来切换到 jx
命名空间,
但唯一可用的命名空间是 jx-git-operator
和 jx-vault
>jx admin log
waiting for the Git Operator to be ready in namespace jx-git-operator...
pod jx-git-operator-6c55945bfb-lrcd6 has status Running
WARNING: the git operator pod has Failed but will restart
to view the log of the Failed git operator pod run: kubectl logs -n jx-git-operator jx-git-operator-6c55945bfb-lrcd6
pod jx-git-operator-6c55945bfb-lrcd6 has status Ready
the Git Operator is running in pod jx-git-operator-6c55945bfb-lrcd6
waiting for boot Job pod with selector app=jx-boot in namespace jx-git-operator...
error: Failed to wait for active Job in namespace jx-git-operator with selector app=jx-boot: timed out after waiting for duration 30m0s
ERROR: exit status 1
>kubectl logs -n jx-git-operator jx-git-operator-6c55945bfb-lrcd6
no custom git initialisation scripts
using poll duration 20s
polling repository jx-boot in namespace jx-git-operator with git URL https://github.com/jx3-gitops-repositories/jx3-terraform-eks.git
cloning repository jx-boot to /tmp/jx-git-operator-260147724/jx-boot
repository jx-boot has latest commit sha 3b94f704bfb05f58c5bef02d0e2ed39b70a85a3c
about to create a new job for name jx-boot and sha 3b94f704bfb05f58c5bef02d0e2ed39b70a85a3c
ERROR: Failed to poll repository jx-boot in namespace jx-git-operator: Failed to launch job for jx-boot: repository jx-boot does not have a Job file: /tmp/jx-git-operator-260147724/jx-boot/.jx/git-operator/job.yaml
对 https://github.com/jx3-gitops-repositories/jx3-terraform-eks.git
的引用而不是我组织的该存储库副本让我感到担忧;挖掘后,我在 /jx3-terraform-eks/terraform.tfstate
和 /jx3-terraform-eks/terraform.tfstate.backup
下的本地副本中找到了对该存储库的引用。我已将它们更改为我的本地版本;一个副本仍然存在,但元数据中的副本始终会回滚到原始源存储库。在我能找到的任何地方都没有其他对 jx3-gitops-repositories
的引用,所以我承认我很困惑从哪里得到它以将其替换回来。
我还建议可能有对 git 存储库的引用,需要在 jx-boot
中的 jx-git-operator
秘密中进行更改 - 这完全有道理,但我找不到在我迄今为止提取的存储库或我迄今为止看到的文档中的任何类似内容。
帮助?!
版权声明:本文内容由互联网用户自发贡献,该文观点与技术仅代表作者本人。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌侵权/违法违规的内容, 请发送邮件至 dio@foxmail.com 举报,一经查实,本站将立刻删除。