k0sproject / k0sproject/k0sctl
k0sctl behind http_proxy | worker hangs o: "Running phase: Install workers"
- Dominant language
- Go
- Stars
- 582
- Forks
- 113
- Avg merge
- 2d 13h
- Merged PRs (30d)
- 34
Description
The servers are behind company proxy. Trying to install in combination with haproxy.
Error during install:
```bash
FATA apply failed - log file saved to /home/kafka/.cache/k0sctl/k0sctl.log: failed on 1 hosts:
- [ssh] 192.168.2.6:22: context deadline exceeded
```
k0sctl config
```bash
apiVersion: k0sctl.k0sproject.io/v1beta1
kind: Cluster
metadata:
name: ddacluster
user: admin
spec:
hosts:
- ssh:
address: 192.168.2.3
user: kafka
port: 22
keyPath: ~/.ssh/id_ed25519
role: controller
uploadBinary: true
environment:
HTTP_PROXY: proxy.test.nl:3128
HTTPS_PROXY: proxy.test.nl:3128
NO_PROXY: 127.0.0.1,192.168.2.0/24,10.244.0.0/16,10.96.0.0/12
http_proxy: proxy.test.nl:3128
https_proxy: proxy.test.nl:3128
no_proxy: 127.0.0.1,192.168.2.0/24,10.244.0.0/16,10.96.0.0/12
- ssh:
address: 192.168.2.4
user: kafka
port: 22
keyPath: ~/.ssh/id_ed25519
role: controller
uploadBinary: true
environment:
HTTP_PROXY: proxy.test.nl:3128
HTTPS_PROXY: proxy.test.nl:3128
NO_PROXY: 127.0.0.1,192.168.2.0/24,10.244.0.0/16,10.96.0.0/12
http_proxy: proxy.test.nl:3128
https_proxy: proxy.test.nl:3128
no_proxy: 127.0.0.1,192.168.2.0/24,10.244.0.0/16,10.96.0.0/12
- ssh:
address: 192.168.2.5
user: kafka
port: 22
keyPath: ~/.ssh/id_ed25519
role: controller
uploadBinary: true
environment:
HTTP_PROXY: proxy.test.nl:3128
HTTPS_PROXY: proxy.test.nl:3128
NO_PROXY: 127.0.0.1,192.168.2.0/24,10.244.0.0/16,10.96.0.0/12
http_proxy: proxy.test.nl:3128
https_proxy: proxy.test.nl:3128
no_proxy: 127.0.0.1,192.168.2.0/24,10.244.0.0/16,10.96.0.0/12
- ssh:
address: 192.168.2.6
user: kafka
port: 22
keyPath: ~/.ssh/id_ed25519
role: worker
uploadBinary: true
environment:
HTTP_PROXY: proxy.test.nl:3128
HTTPS_PROXY: proxy.test.nl:3128
NO_PROXY: 127.0.0.1,192.168.2.0/24,10.244.0.0/16,10.96.0.0/12
http_proxy: proxy.test.nl:3128
https_proxy: proxy.test.nl:3128
no_proxy: 127.0.0.1,192.168.2.0/24,10.244.0.0/16,10.96.0.0/12
k0s:
config:
apiVersion: k0s.k0sproject.io/v1beta1
kind: Cluster
metadata:
name: k0s
spec:
api:
k0sApiPort: 9443
port: 6443
externalAddress: 192.168.2.2
sans:
- 192.168.2.2
installConfig:
users:
etcdUser: etcd
kineUser: kube-apiserver
konnectivityUser: konnectivity-server
kubeAPIserverUser: kube-apiserver
kubeSchedulerUser: kube-scheduler
konnectivity:
adminPort: 8133
agentPort: 8132
network:
kubeProxy:
disabled: true
mode: iptables
kuberouter:
autoMTU: true
mtu: 0
peerRouterASNs: ""
peerRouterIPs: ""
podCIDR: 10.244.0.0/16
provider: custom
serviceCIDR: 10.96.0.0/12
podSecurityPolicy:
defaultPolicy: 00-k0s-privileged
storage:
type: etcd
telemetry:
enabled: false
options:
wait:
enabled: true
drain:
enabled: true
gracePeriod: 2m0s
timeout: 5m0s
force: true
ignoreDaemonSets: true
deleteEmptyDirData: true
podSelector: ""
skipWaitForDeleteTimeout: 0s
concurrency:
limit: 30
workerDisruptionPercent: 10
uploads: 5
evictTaint:
enabled: false
taint: k0sctl.k0sproject.io/evict=true
effect: NoExecute
controllerWorkers: false
```
Error log
```bash
INFO ==> Running phase: Install controllers
INFO [ssh] 192.168.2.3:22: generate join token for [ssh] 192.168.2.4:22
INFO [ssh] 192.168.2.3:22: generate join token for [ssh] 192.168.2.5:22
INFO [ssh] 192.168.2.4:22: validating api connection to https://192.168.2.2:9443
INFO [ssh] 192.168.2.5:22: validating api connection to https://192.168.2.2:9443
INFO [ssh] 192.168.2.5:22: writing join token to /etc/k0s/k0stoken
INFO [ssh] 192.168.2.4:22: writing join token to /etc/k0s/k0stoken
INFO [ssh] 192.168.2.4:22: installing k0s controller
INFO [ssh] 192.168.2.5:22: installing k0s controller
INFO [ssh] 192.168.2.5:22: updating service environment
INFO [ssh] 192.168.2.4:22: updating service environment
INFO [ssh] 192.168.2.5:22: starting service
INFO [ssh] 192.168.2.5:22: waiting for the k0s service to start
INFO [ssh] 192.168.2.4:22: starting service
INFO [ssh] 192.168.2.4:22: waiting for the k0s service to start
INFO ==> Running phase: Install workers
INFO [ssh] 192.168.2.3:22: generating a join token for worker 1
INFO [ssh] 192.168.2.6:22: validating api connection to https://192.168.2.2:6443 using join token
INFO [ssh] 192.168.2.6:22: writing join token to /etc/k0s/k0stoken
INFO [ssh] 192.168.2.6:22: installing k0s worker
INFO [ssh] 192.168.2.6:22: updating service environment
INFO [ssh] 192.168.2.6:22: starting service
INFO [ssh] 192.168.2.6:22: waiting for node to become ready
INFO * Running clean-up for phase: Acquire exclusive host lock
INFO * Running clean-up for phase: Upload k0s binaries to hosts
INFO * Running clean-up for phase: Install k0s binaries on hosts
INFO * Running clean-up for phase: Initialize the k0s cluster
INFO [ssh] 192.168.2.3:22: cleaning up
WARN [ssh] 192.168.2.3:22: k0s reset failed
INFO * Running clean-up for phase: Install controllers
INFO * Running clean-up for phase: Install workers
INFO [ssh] 192.168.2.6:22: cleaning up
WARN [ssh] 192.168.2.6:22: k0s reset failed
INFO ==> Apply failed
FATA apply failed - log file saved to /home/kafka/.cache/k0sctl/k0sctl.log: failed on 1 hosts:
- [ssh] 192.168.2.6:22: context deadline exceeded
node worker01 is not ready
```
Contributor guide
No contributing guide indexed for this repository
Research direction
Start with the supplied k0sctl log and the worker installation phase, focusing on the proxy environment and the 192.168.2.6 readiness timeout. Reproduce the installation with the shown configuration and determine what allows the worker to become ready without the context deadline exceeded error.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- go
- Domain
- devops, infrastructure
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 30/100