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

disable public ipv4 / ipv6 ignored on autoscaled nodes #372

Open
benkrej opened this issue Jun 9, 2024 · 0 comments
Open

disable public ipv4 / ipv6 ignored on autoscaled nodes #372

benkrej opened this issue Jun 9, 2024 · 0 comments

Comments

@benkrej
Copy link

benkrej commented Jun 9, 2024

Hi, the enable_public_net_ipv4 parameter seems to be ignored on autoscaled nodes.
I have used the example config and set enable_public_net_ipv4 & enable_public_net_ipv6 to false as well as configured a private network for the static nodes which works flawlessly.
Autoscaled nodes are also set up correctly to use the private network but they are assigned a public ipv4 & ipv6 address.

Awesome tool btw :)

My config:

hetzner_token: --
cluster_name: test
kubeconfig_path: "./kubeconfig"
k3s_version: v1.26.4+k3s1
public_ssh_key_path: "~/.ssh/testcluster.pub"
private_ssh_key_path: "~/.ssh/testcluster"
use_ssh_agent: false
ssh_allowed_networks:
  - 0.0.0.0/0 # ensure your current IP is included in the range
api_allowed_networks:
  - 0.0.0.0/0 # ensure your current IP is included in the range
disable_flannel: false # set to true if you want to install a different CNI
schedule_workloads_on_masters: false
enable_public_net_ipv4: false # default is true
enable_public_net_ipv6: false # default is true
datastore:
  mode: etcd # etcd (default) or external
#  external_datastore_endpoint: postgres://....
masters_pool:
  instance_type: cx22
  instance_count: 1
  location: fsn1
worker_node_pools:
  - name: small-static
    instance_type: cx22
    instance_count: 1
    location: hel1
  - name: small-autoscaled
    instance_type: cx22
    instance_count: 1
    location: fsn1
    autoscaling:
      enabled: true
      min_instances: 0
      max_instances: 1

existing_network: my_private_network
enable_encryption: true
post_create_commands:
  - timedatectl set-timezone Europe/Berlin
  - >
    printf "network## {config## disabled}" |
    sed 's/##/:/g' > /etc/cloud/cloud.cfg.d/99-disable-network-config.cfg
  - >
    printf "network##\n  version## 2\n  renderer## networkd\n  ethernets##\n    enp7s0##\n      dhcp4## true\n      nameservers##\n        addresses## [8.8.8.8, 8.8.4.4]\n      routes##\n        - to## default\n          via## 10.0.0.1" |
    sed 's/##/:/g' > /etc/netplan/50-cloud-init.yaml
  - netplan generate
  - netplan apply
  - apt update
  - apt upgrade -y
  - apt install nfs-common -y
  - apt autoremove -y
@benkrej benkrej changed the title disabled ipv4 / ipv6 ignored on autoscaled nodes disable public ipv4 / ipv6 ignored on autoscaled nodes Jun 9, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant