kOps toolbox enroll metal doesn't work with ipv6 address and default ssh port
- Dominant language
- Go
- Stars
- 16.7k
- Forks
- 4.7k
- Avg merge
- 17h 21m
- Merged PRs (30d)
- 68
Description
/kind bug
**1. What `kops` version are you running? The command `kops version`, will display
this information.**
Client version: 1.33.1 (git-v1.33.1)
**2. What Kubernetes version are you running? `kubectl version` will print the
version if a cluster is running or provide the Kubernetes version specified as
a `kops` flag.**
N/A
**3. What cloud provider are you using?**
N/A
**4. What commands did you run? What is the simplest way to reproduce this issue?**
`kops toolbox enroll --cluster metal.k8s.local --instance-group control-plane-main --host HOST` where host resolves to only a AAAA IPv6 address.
**5. What happened after the commands executed?**
kops eventually tries to ssh using the address format [ipv6]:22, however this is rejected by SSH as only a non-standard port number is permitted in this format.
`A hostname or address may optionally be enclosed within ‘[’ and ‘]’ brackets then followed by ‘:’ and a non-standard port number.`
Options to resolve would include dropping the port when the default 22 is used, or use the `-p` option.
**6. What did you expect to happen?**
**7. Please provide your cluster manifest. Execute
`kops get --name my.example.com -o yaml` to display your cluster manifest.
You may want to remove your cluster name and other sensitive information.**
```yaml
```
**8. Please run the commands with most verbose logging by adding the `-v 10` flag.
Paste the logs into this report, or in a gist and provide the gist link here.**
**9. Anything else do we need to know?**
Contributor guide
Research direction
Start by reproducing `kops toolbox enroll --cluster metal.k8s.local --instance-group control-plane-main --host HOST` with a host resolving only to an IPv6 address, then trace the toolbox enroll SSH address and port handling. Done means enrollment connects successfully over IPv6 with the default SSH port 22, without producing an invalid `[ipv6]:22` SSH address.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- go
- Domain
- cli, networking
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Quiet
- Clarity
- Mostly clear
- Newbie friendliness
- 55/100