Before creating an issue, make sure you've checked the following:
Platform
Version
v1.33.8+k0s.1
Sysinfo
`k0s sysinfo`
➡️ Please replace this text with the output of `k0s sysinfo`. ⬅️
What happened?
k0sctl is using public IP address to connect to the control plane.
apiVersion: k0sctl.k0sproject.io/v1beta1
kind: Cluster
metadata:
name: k0s-cluster
user: admin
spec:
k0s:
version: v1.33.8+k0s.1
config:
apiVersion: k0s.k0sproject.io/v1beta1
kind: ClusterConfig
metadata:
name: my-k0s-cluster
namespace: kube-system
hosts:
- role: controller+worker
ssh:
address: CP_1_PUBLIC_IPV4
user: root
port: 22
privateInterface: enp7s0
- role: worker
ssh:
address: WORKER_1_PUBLIC_IPV4
user: root
port: 22
privateInterface: enp7s0
- role: worker
ssh:
address: WORKER_2_PUBLIC_IPV4
user: root
port: 22
privateInterface: enp7s0
- role: worker
ssh:
address: WORKER_3_PUBLIC_IPV4
user: root
port: 22
privateInterface: enp7s0
Steps to reproduce
k0sctl apply --config k0sctl.yaml
- Fail
Expected behavior
Servers have public and private IP addresses. I assume the intent of defining the privateInterface and/or privateAddress is to use the private network for Kubernetes communication.
Actual behavior
But k0sctl is still trying to use the public network and failing because firewall is configured for the private interfaces.
Screenshots and logs
INFO ==> Running phase: Install workers
INFO [ssh] CP_1_PUBLIC_IPV4:22: generating a join token for worker 1
INFO [ssh] CP_1_PUBLIC_IPV4:22: generating a join token for worker 2
INFO [ssh] CP_1_PUBLIC_IPV4:22: generating a join token for worker 3
INFO [ssh] WORKER_1_PUBLIC_IPV4:22: validating api connection to https://CP_1_PUBLIC_IPV4:6443 using join token
INFO [ssh] WORKER_3_PUBLIC_IPV4:22: validating api connection to https://CP_1_PUBLIC_IPV4:6443 using join token
INFO [ssh] WORKER_2_PUBLIC_IPV4:22: validating api connection to https://CP_1_PUBLIC_IPV4:6443 using join token
INFO * Running clean-up for phase: Acquire exclusive host lock
INFO * Running clean-up for phase: Install workers
INFO [ssh] WORKER_1_PUBLIC_IPV4:22: cleaning up
INFO [ssh] WORKER_2_PUBLIC_IPV4:22: cleaning up
INFO [ssh] WORKER_3_PUBLIC_IPV4:22: cleaning up
INFO ==> Apply failed
FATA apply failed - log file saved to /Users/user/Library/Caches/k0sctl/k0sctl.log: failed on 3 hosts:
- [ssh] WORKER_3_PUBLIC_IPV4:22: connectivity check failed: context deadline exceeded
failed to connect to kubernetes api using the join token - check networking: command failed: client exec: ssh session wait: Process exited with status 1
- [ssh] WORKER_1_PUBLIC_IPV4:22: connectivity check failed: context deadline exceeded
failed to connect to kubernetes api using the join token - check networking: command failed: client exec: ssh session wait: Process exited with status 1
- [ssh] WORKER_2_PUBLIC_IPV4:22: connectivity check failed: context deadline exceeded
failed to connect to kubernetes api using the join token - check networking: command failed: client exec: ssh session wait: Process exited with status 1
Additional context
No response
Before creating an issue, make sure you've checked the following:
Platform
Version
v1.33.8+k0s.1
Sysinfo
`k0s sysinfo`
What happened?
k0sctl is using public IP address to connect to the control plane.
Steps to reproduce
k0sctl apply --config k0sctl.yamlExpected behavior
Servers have public and private IP addresses. I assume the intent of defining the
privateInterfaceand/orprivateAddressis to use the private network for Kubernetes communication.Actual behavior
But
k0sctlis still trying to use the public network and failing because firewall is configured for the private interfaces.Screenshots and logs
Additional context
No response