Giter VIP home page Giter VIP logo

k0s-ansible's Issues

Replace k0s.service.j2 template with adoption of new k0s install sub command

Enhancement:

k0s now supports a full featured templating mechanism to write the systemd service file. Recommend adoption of up stream native systemd service file creation strategy.

Relevant code:

Usage:

root@k0s:~# k0s install --help
Helper command for setting up k0s on a brand-new system. Must be run as root (or with sudo)

Usage:
  k0s install [flags]

Flags:
  -h, --help          help for install
      --role string   node role (possible values: server or worker. In a single-node setup, a worker role should be used) (default "server")

Global Flags:
  -c, --config string            config file (default: ./k0s.yaml)
      --data-dir string          Data Directory for k0s (default: /var/lib/k0s). DO NOT CHANGE for an existing setup, things will break!
  -d, --debug                    Debug logging (default: false)
  -l, --logging stringToString   Logging Levels for the different components

Error: unknown flag: --config

Hi,

the role k0s/initial_controller utilizes the command:
k0s token create --role controller --config {{ k0s_config_dir }}/k0s.yaml

It looks like the flag --config is not valid anymore:

$ k0s token create --role worker --config /etc/k0s/k0s.yaml
Error: unknown flag: --config

Tested with: v1.26.0+k0s.0

The flag is not available in the latest documentation:
https://docs.k0sproject.io/v1.26.2+k0s.1/cli/k0s_token_create/

Update:
Same for role k0s/worker
k0s install worker --config {{ k0s_config_dir }}/k0s.yaml --token-file {{ k0s_config_dir }}/worker-token {{ extra_args | default(omit) }}

--config flag was removed: https://docs.k0sproject.io/v1.26.2+k0s.1/cli/k0s_install_worker/

Issues while connecting to nginx deployment in k0s cluster

Hi team,

I am following this document < https://docs.k0sproject.io/v1.23.6+k0s.2/examples/ansible-playbook/ > to create k0s cluster using ansible, on the Linux/AMD64 AWS bare metal instance.

It seems like the k0s cluster got created successfully and all the worker nodes are in ready state:

NAME    STATUS   ROLES    AGE   VERSION       INTERNAL-IP      EXTERNAL-IP   OS-IMAGE             KERNEL-VERSION      CONTAINER-RUNTIME 
k0s-4   Ready    <none>   10m   v1.22.4+k0s   10.197.110.121   <none>        Ubuntu 22.04.1 LTS   5.15.0-53-generic   containerd://1.5.8 
k0s-5   Ready    <none>   10m   v1.22.4+k0s   10.197.110.251   <none>        Ubuntu 22.04.1 LTS   5.15.0-53-generic   containerd://1.5.8 
k0s-6   Ready    <none>   10m   v1.22.4+k0s   10.197.110.142   <none>        Ubuntu 22.04.1 LTS   5.15.0-53-generic   containerd://1.5.8 
k0s-7   Ready    <none>   10m   v1.22.4+k0s   10.197.110.104   <none>        Ubuntu 22.04.1 LTS   5.15.0-53-generic   containerd://1.5.8 

Then I created nginx deployment with 5 replicas and that seems to work as well:

NAME    READY   UP-TO-DATE   AVAILABLE   AGE 
nginx   5/5     5            5           64s 

I exposed nginx port 80 to 8100 as mentioned in the docs:

$ kubectl expose deployment nginx --target-port=80 --port=8100 
service/nginx exposed 

But I get no response from nginx deployment when I wget it from busybox.

$ kubectl run hello-k0s --image=quay.io/prometheus/busybox --rm -it --restart=Never --command -- wget -qO- nginx:8100 

pod "hello-k0s" deleted 
Error from server: Get "https://10.197.110.121:10250/containerLogs/default/hello-k0s/hello-k0s": dial timeout, backstop 

I even mentioned port 80 (--port=80) while creating nginx deployment using kubectl, but that didn’t help.
Instead of busybox, I tried using ubuntu image, but the results are the same.

Can you please provide me with some pointers here?

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.