Giter Club home page Giter Club logo

hetzner-k3s's People

Contributors

janosmiko avatar soult avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

hetzner-k3s's Issues

Apply firewall to servers using "hcloud/node-group" labels

Currently, the servers created by the Cluster Autoscaler are not added to the firewall even when the HCLOUD_FIREWALL environment variable is set properly.

As a workaround set the firewall to be applied to servers using "hcloud/node-group" labels.

Crashing when deploying CSI driver

In a new and empty hcloud project I created a token and used the docker image and the example yaml-file (see below). Only change is the k3s version, for which I chose 1.25.5-k3s1. All resources are created as expected, but when hetzner-k3s reaches the "Deploying Hetzner CSI Driver..." step the application crashes:

Command output: Error from server (NotFound): error when deleting "STDIN": csidrivers.storage.k8s.io "csi.hetzner.cloud" not found
Exit code: exit status 1
Error: cannot create cluster: cannot deploy hetzner csi driver: shell command exited with error: 1, output: Error from server (NotFound): error when deleting "STDIN": csidrivers.storage.k8s.io "csi.hetzner.cloud" not found

Restarting the cluster-create command does not yield a different result.

In this line

c.hetznerCSIDriverDataDelete(), shell.WithEnv("KUBECONFIG="+c.kubeconfigPath()),
the CSIDriver is deleted from the cluster, without existing. This causes kubectl to return non-zero and the error check in line 118 to fail. I understand the need for preemptively removing the CSIDriver, since it's immutable, but when creating a new cluster this CSIDriver is never available and can't be removed.

I've manually added the CSIDriver with the yaml configuration (as defined for deletion)

yaml := `apiVersion: storage.k8s.io/v1
kind: CSIDriver
metadata:
name: csi.hetzner.cloud
spec:
attachRequired: true
podInfoOnMount: true
volumeLifecycleModes:
- Persistent
fsGroupPolicy: File`
and then ran the create-cluster command again. This time all ran successfully.

I'm happy to provide more information if requried.

As mentioned above my yaml-file:

---
hetzner_token: <my-token>
cluster_name: test
kubeconfig_path: "/cluster/kubeconfig"
k3s_version: v1.25.5+k3s1
public_ssh_key_path: "/tmp/.ssh/id_rsa.pub"
private_ssh_key_path: "/tmp/.ssh/id_rsa"
verify_host_key: false
location: nbg1
schedule_workloads_on_masters: false
masters:
  instance_type: cpx21
  instance_count: 3
worker_node_pools:
  - name: small
    instance_type: cpx21
    instance_count: 4
  - name: big
    instance_type: cpx31
    instance_count: 2
autoscaling_node_pools:
  - name: small
    instance_type: cx41
    instance_min: 3
    instance_max: 5
  - name: big
    instance_type: cpx51
    instance_max: 10
post_create_commands:
  - apt update
  - apt upgrade -y
  - apt autoremove -y
  - shutdown -r now
enable_encryption: true

Command to run:

docker run --rm -it \
  -v ${PWD}:/cluster \
  -v ${HOME}/.ssh:/tmp/.ssh \
  janosmiko/hetzner-k3s:v0.1.5 \
  create-cluster \
  --config-file /cluster/test.yaml

Make hetzner_token optional

If you can use the env variable (which did not work for me btw), the hetzner_token key should not be required in the yaml.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.