ERROR: Failed to connect to cluster
Lab 3.3 Installing Zarf on the Host Machine and the Air Gap VM
I am unable to get a package list with this command 'zarf package list' I get an
ERROR: Failed to connect to cluster.
I have ran the zarf init and deployed the k3s component with sudo
when I run the command 'sudo kubectl get node' i get:
NAME STATUS ROLES AGE VERSION
fedora Ready control-plane,master 111m v1.24.1+k3s1
If I try to deploy the dos-game zarf package it tells me if cannot connect to the cluster and tells me to try setting the KUBERNETES_MASTER environment variable.
If I use echo $KUBERNETES_MASTER it prints nothing to the terminal.
I got the cluster URL by running this command:
kubectl cluster-info
I first tried using the control plane URL, but that didn't work. So I also tried CoreDNS and Metrics-server URLs. Same result.
After looking at the docs for zarf I found that the perroquets was to have docker installed. So I started over with docker installed and got the same error when running 'zarf package list'. ERROR: Failed to connect to cluster.
I am not sure what to try next. If someone has seen this or could give me a new trail to blaze down that would be great!
Thanks.
Answers
-
Okay, I was reading through the zarf docs and found this:
CAUTION
(Linux only) Deploying the 'k3s' component will require root access (not just sudo), as it modifies your host machine to install the cluster and by default only provides access to the cluster to the root user.
Running my terminal as root solved the problem. I didn't realize there was a difference between root and sudo. When i think I know linux...Although I still wonder if Docker is needed before running zarf. In the docs it says it is but I don't recall seeing any instructions in this course for installing docker.
0
Categories
- All Categories
- 177 LFX Mentorship
- 177 LFX Mentorship: Linux Kernel
- 766 Linux Foundation IT Professional Programs
- 378 Cloud Engineer IT Professional Program
- 174 Advanced Cloud Engineer IT Professional Program
- 75 DevOps IT Professional Program - Discontinued
- 7 DevOps & GitOps IT Professional Program
- 101 Cloud Native Developer IT Professional Program
- 7.6K Training Courses & Learning Paths
- 4 AI & ML Training
- 1 Blockchain & Decentralized Identity Training
- 10 Cloud & Containers Training
- 1 Cybersecurity Training
- 2 DevOps & Site-Reliability Training
- 1 Linux Kernel Development Training
- 1 Networking Training
- 2 Open Source Best Practice Training
- 2 System Administration Training
- 1 System Engineering Training
- 1 Web & Application Development Training
- 796 Hardware
- 202 Drivers
- 68 I/O Devices
- 37 Monitors
- 95 Multimedia
- 173 Networking
- 91 Printers & Scanners
- 91 Storage
- 770 Linux Distributions
- 81 Debian
- 68 Fedora
- 23 Linux Mint
- 13 Mageia
- 24 openSUSE
- 150 Red Hat Enterprise
- 31 Slackware
- 13 SUSE Enterprise
- 356 Ubuntu
- 465 Linux System Administration
- 31 Cloud Computing
- 73 Command Line/Scripting
- Github systems admin projects
- 98 Linux Security
- 78 Network Management
- 101 System Management
- 46 Web Management
- 116 Mobile Computing
- 20 Android
- 81 Development
- 1.2K New to Linux
- 1K Getting Started with Linux
- 395 Off Topic
- 121 Introductions
- 30 Study Material
- 997 Programming and Development
- 310 Kernel Development
- 669 Software Development
- 1K Software
- 398 Applications
- 182 Command Line
- 5 Compiling/Installing
- 69 Games
- 318 Installation
- Archived
- 183 Small Talk
- 2 LFD140 Class Forum
- 1.4K LFS258 Class Forum
Upcoming Training
-
August 20, 2018
Kubernetes Administration (LFS458)
-
August 20, 2018
Linux System Administration (LFS301)
-
August 27, 2018
Open Source Virtualization (LFS462)
-
August 27, 2018
Linux Kernel Debugging and Security (LFD440)