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

Cannot recreate k3s (zarf init) after destroying it #1737

Closed
dgershman opened this issue May 20, 2023 · 2 comments
Closed

Cannot recreate k3s (zarf init) after destroying it #1737

dgershman opened this issue May 20, 2023 · 2 comments

Comments

@dgershman
Copy link
Contributor

Environment

Device and OS: Ubuntu 22.02
App version: v0.26.4 (the same error occurs in v0.26.3 as well)
Kubernetes distro being used: K3S
Other:

Steps to reproduce

export ZARF_VERSION=v0.26.4
curl -LO https://github.com/defenseunicorns/zarf/releases/download/${ZARF_VERSION}/zarf_${ZARF_VERSION}_Linux_amd64
sudo mv /home/ubuntu/zarf_${ZARF_VERSION}_Linux_amd64 /usr/local/bin/zarf
sudo chmod +x /usr/local/bin/zarf
wget -q https://github.com/defenseunicorns/zarf/releases/download/${ZARF_VERSION}/zarf-init-amd64-${ZARF_VERSION}.tar.zst
sudo zarf init --components=k3s,git-server --confirm --set K3S_ARGS="--disable=traefik --disable=metrics-server --disable=servicelb"

sudo zarf destroy --confirm

sudo zarf init --components=k3s,git-server --confirm --set K3S_ARGS="--disable=traefik --disable=metrics-server --disable=servicelb"

Expected result

That you can re-install k3s as you could in v0.26.2.

Actual Result

  ✔  All of the checksums matched!
  ✔  Loading Zarf Package zarf-init-amd64-v0.26.4.tar.zst
  DEBUG   2023-05-20T02:42:01Z  -  k8s.NewK8sClient()
  DEBUG   2023-05-20T02:42:01Z  -  &v1.NodeList{TypeMeta:v1.TypeMeta{Kind:"", APIVersion:""}, ListMeta:v1.ListMeta{SelfLink:"", ResourceVersion:"", Continue:"", RemainingItemCount:(*int64)(nil)}, Items:[]v1.Node(nil)}
  DEBUG   2023-05-20T02:42:01Z  -  Get "https://127.0.0.1:6443/api/v1/nodes": dial tcp 127.0.0.1:6443: connect: connection refused
     ERROR:  Get "https://127.0.0.1:6443/api/v1/nodes": dial tcp 127.0.0.1:6443: connect: connection refused
  DEBUG   2023-05-20T02:42:01Z  -  goroutine 1 [running]:
          runtime/debug.Stack()
          	/opt/hostedtoolcache/go/1.19.9/x64/src/runtime/debug/stack.go:24 +0x65
          github.com/defenseunicorns/zarf/src/pkg/message.Fatal({0x3587540?, 0xc000cbc090?}, {0xc0000ee2a0, 0x5f})
          	/home/runner/work/zarf/zarf/src/pkg/message/message.go:156 +0x18a
          github.com/defenseunicorns/zarf/src/cmd.glob..func4(0x729b3e0?, {0x39e7d6f?, 0x5?, 0x5?})
          	/home/runner/work/zarf/zarf/src/cmd/initialize.go:61 +0x225
          github.com/spf13/cobra.(*Command).execute(0x729b3e0, {0xc0000d02d0, 0x5, 0x5})
          	/home/runner/go/pkg/mod/github.com/spf13/cobra@v1.7.0/command.go:944 +0x847
          github.com/spf13/cobra.(*Command).ExecuteC(0x729c520)
          	/home/runner/go/pkg/mod/github.com/spf13/cobra@v1.7.0/command.go:1068 +0x3bd
          github.com/spf13/cobra.(*Command).Execute(...)
          	/home/runner/go/pkg/mod/github.com/spf13/cobra@v1.7.0/command.go:992
          github.com/defenseunicorns/zarf/src/cmd.Execute()
          	/home/runner/work/zarf/zarf/src/cmd/root.go:68 +0x25
          main.main()
          	/home/runner/work/zarf/zarf/main.go:23 +0x6f

Visual Proof (screenshots, videos, text, etc)

Screenshot 2023-05-19 at 10 52 14 PM

Severity/Priority

Additional Context

Add any other context or screenshots about the technical debt here.

@Racer159
Copy link
Contributor

Racer159 commented May 22, 2023

This is fixed on main and is due to the same code that affected #1723 - basically the kube config from the old cluster is left behind

@Racer159
Copy link
Contributor

Closing as fixed in v0.27.0

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

No branches or pull requests

2 participants