alexellis/k3sup

token creation in README.md doc doesn't work in zsh or bash

magnus919 opened this issue · 4 comments

Expected Behaviour

When following the documentation, and running export TOKEN=$(tr -dc A-Za-z0-9 </dev/urandom | head -c 64), I expect the environment variable ${TOKEN} to hold a valid token.

Current Behaviour

% export TOKEN=$(tr -dc A-Za-z0-9 </dev/urandom | head -c 64)
tr: Illegal byte sequence

Are you a GitHub Sponsor (Yes/No?)

  • Yes
  • No

Possible Solution

Steps to Reproduce

Context

Trying to stand up a k3s cluster for the purpose of learning OpenFaaS.

Your Environment

  • macOS Monterey 12.2.1 (21D62)

  • zsh 5.8 (x86_64-apple-darwin21.0)

  • GNU bash, version 3.2.57(1)-release (x86_64-apple-darwin21)

  • k3sup

    • Version: 0.11.3
    • Git Commit: e2bb181
  • What Kubernetes distribution are you using?

Not there yet.

kubectl version
Client Version: version.Info{Major:"1", Minor:"22", GitVersion:"v1.22.5", GitCommit:"5c99e2ac2ff9a3c549d9ca665e7bc05a3e18f07e", GitTreeState:"clean", BuildDate:"2021-12-16T08:38:33Z", GoVersion:"go1.16.12", Compiler:"gc", Platform:"darwin/amd64"}
  • What OS or type or VM are you using for your cluster? Where is it hosted? (for k3sup install/join):

3x ubuntu-20-04-x64 droplets on Digital Ocean.

  • Operating System and version (e.g. Linux, Windows, MacOS):

Not even connecting to them yet.

uname -a # on k3sup client host
Darwin sulaco 21.3.0 Darwin Kernel Version 21.3.0: Wed Jan  5 21:37:58 PST 2022; root:xnu-8019.80.24~20/RELEASE_X86_64 x86_64

cat /etc/os-release # on k3sup client host
cat: /etc/os-release: No such file or directory

"Be part of the solution"

Subject to approval, are you willing to work on a Pull Request for this issue or feature request?

  • Yes
  • No
rgee0 commented

What happens when you run /dev/urandom/ directly?

that's not an executable file.

Fair point, I assume the author didn't test this on a Mac, but with Linux.

I'll give an alternative

Fixed in 89c545d