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

Convert Depreacted Flags for v1.26 #6333

Closed
dereknola opened this issue Oct 25, 2022 · 2 comments
Closed

Convert Depreacted Flags for v1.26 #6333

dereknola opened this issue Oct 25, 2022 · 2 comments
Assignees
Milestone

Comments

@dereknola
Copy link
Member

dereknola commented Oct 25, 2022

Component of #5940, with v1.26, we need to completely remove the following flags from k3s and docs.

  • no-flannel
  • cluster-secret
  • no-deploy
  • disable-selinux

Additionally, the following need to convert to fatal errors:

  • wireguard backend
  • k3s etcd-snapshot will no longer save a snapshot
@dereknola dereknola self-assigned this Oct 25, 2022
@manuelbuil
Copy link
Contributor

@rbrtbnfgl and I need to also remove wireguard backend which was marked as deprecated for some time now. Maybe we can track it in this issue too? Or better create a new one?

@bguzman-3pillar
Copy link

bguzman-3pillar commented Dec 9, 2022

Validated on b5d39df

Environment Details

Infrastructure

  • Cloud
  • Hosted

Cluster Configuration:

1 server

Testing Steps

  1. Try to install K3S using these flags: no-flannel, cluster-secret, no-deploy, disable-selinux.
  2. Ensure that k3s complains about a nonexistent flag.
  3. etcd-snapshot-> Install K3S, deploy some workloads, run k3s etcd-snapshot

Validation Results:

curl -sfL https://get.k3s.io | INSTALL_K3S_COMMIT=b5d39df9294627cbfa3081acb92e2be54f02b0d6 INSTALL_K3S_EXEC="server --no-flannel" sh -

$ journalctl -xeu k3s.service | grep -i "fatal msg"
Dec 09 20:19:02 ip-172-31-33-97 k3s[3083]: time="2022-12-09T20:19:02Z" level=fatal msg="flag provided but not defined: -no-flannel"
Dec 09 20:19:08 ip-172-31-33-97 k3s[3092]: time="2022-12-09T20:19:07Z" level=fatal msg="flag provided but not defined: -no-flannel"
$ curl -sfL https://get.k3s.io | INSTALL_K3S_COMMIT=b5d39df9294627cbfa3081acb92e2be54f02b0d6 INSTALL_K3S_EXEC="server --no-deploy coredns" sh -

$ journalctl -xeu k3s.service | grep -i "fatal msg"
Dec 09 20:29:55 ip-172-31-33-97 k3s[7444]: time="2022-12-09T20:29:55Z" level=fatal msg="flag provided but not defined: -no-deploy"
Dec 09 20:30:00 ip-172-31-33-97 k3s[7453]: time="2022-12-09T20:30:00Z" level=fatal msg="flag provided but not defined: -no-deploy"
curl -sfL https://get.k3s.io | INSTALL_K3S_COMMIT=b5d39df9294627cbfa3081acb92e2be54f02b0d6 INSTALL_K3S_EXEC="server --disable-selinux" sh -

$ journalctl -xeu k3s.service | grep -i "fatal"
Dec 09 20:32:00 ip-172-31-33-97 k3s[7945]: time="2022-12-09T20:32:00Z" level=fatal msg="flag provided but not defined: -disable-selinux"
Dec 09 20:32:05 ip-172-31-33-97 k3s[7955]: time="2022-12-09T20:32:05Z" level=fatal msg="flag provided but not defined: -disable-selinux"
$ curl -sfL https://get.k3s.io | INSTALL_K3S_COMMIT=b5d39df9294627cbfa3081acb92e2be54f02b0d6 INSTALL_K3S_EXEC="server --cluster-secret secret" sh -

$ journalctl -xeu k3s.service | grep -i "fatal"
Dec 09 20:35:13 ip-172-31-33-97 k3s[8541]: time="2022-12-09T20:35:13Z" level=fatal msg="flag provided but not defined: -cluster-secret"
Dec 09 20:35:18 ip-172-31-33-97 k3s[8549]: time="2022-12-09T20:35:18Z" level=fatal msg="flag provided but not defined: -cluster-secret"
  • Etcd-snapshot
$ curl -sfL https://get.k3s.io | INSTALL_K3S_COMMIT=b5d39df9294627cbfa3081acb92e2be54f02b0d6 INSTALL_K3S_EXEC="server --cluster-init" sh -

$ sudo k3s etcd-snapshot
NAME:
   k3s etcd-snapshot - Trigger an immediate etcd snapshot

USAGE:
   k3s etcd-snapshot [global options] command [command options] [arguments...]

VERSION:
   v1.25.4+k3s-b5d39df9 (b5d39df9)

COMMANDS:
   delete       Delete given snapshot(s)
   ls, list, l  List snapshots
   prune        Remove snapshots that match the name prefix that exceed the configured retention count
   save         Trigger an immediate etcd snapshot

GLOBAL OPTIONS:
   --debug                                              (logging) Turn on debug logs [$K3S_DEBUG]
   --config FILE, -c FILE                               (config) Load configuration from FILE (default: "/etc/rancher/k3s/config.yaml") [$K3S_CONFIG_FILE]
   --log value, -l value                                (logging) Log to file
   --alsologtostderr                                    (logging) Log to standard error as well as file (if set)
   --node-name value                                    (agent/node) Node name [$K3S_NODE_NAME]
   --data-dir value, -d value                           (data) Folder to hold state default /var/lib/rancher/k3s or ${HOME}/.rancher/k3s if not root
   --dir value, --etcd-snapshot-dir value               (db) Directory to save etcd on-demand snapshot. (default: ${data-dir}/db/snapshots)
   --name value                                         (db) Set the base name of the etcd on-demand snapshot (appended with UNIX timestamp). (default: "on-demand")
   --snapshot-compress, --etcd-snapshot-compress        (db) Compress etcd snapshot
   --s3, --etcd-s3                                      (db) Enable backup to S3
   --s3-endpoint value, --etcd-s3-endpoint value        (db) S3 endpoint url (default: "s3.amazonaws.com")
   --s3-endpoint-ca value, --etcd-s3-endpoint-ca value  (db) S3 custom CA cert to connect to S3 endpoint
   --s3-skip-ssl-verify, --etcd-s3-skip-ssl-verify      (db) Disables S3 SSL certificate validation
   --s3-access-key value, --etcd-s3-access-key value    (db) S3 access key [$AWS_ACCESS_KEY_ID]
   --s3-secret-key value, --etcd-s3-secret-key value    (db) S3 secret key [$AWS_SECRET_ACCESS_KEY]
   --s3-bucket value, --etcd-s3-bucket value            (db) S3 bucket name
   --s3-region value, --etcd-s3-region value            (db) S3 region / bucket location (optional) (default: "us-east-1")
   --s3-folder value, --etcd-s3-folder value            (db) S3 folder
   --s3-insecure, --etcd-s3-insecure                    (db) Disables S3 over HTTPS
   --s3-timeout value, --etcd-s3-timeout value          (db) S3 timeout (default: 5m0s)
   --help, -h                                           show help
FATA[0000] saving with etcd-snapshot was deprecated in v1.26, use "etcd-snapshot save" instead 
  • Wireguard
curl -sfL https://get.k3s.io | INSTALL_K3S_COMMIT=b5d39df9294627cbfa3081acb92e2be54f02b0d6 INSTALL_K3S_EXEC="server --flannel-backend wireguard" sh -

$ journalctl -xeu k3s.service | grep -i "fatal"
Dec 09 20:54:37 ip-172-31-33-97 k3s[16918]: time="2022-12-09T20:54:37Z" level=fatal msg="The wireguard backend was deprecated in K3s v1.26, please switch to wireguard-native. Check our docs at docs.k3s.io/installation/network-options for information about how to migrate."
Dec 09 20:54:42 ip-172-31-33-97 k3s[16937]: time="2022-12-09T20:54:42Z" level=fatal msg="The wireguard backend was deprecated in K3s v1.26, please switch to wireguard-native. Check our docs at docs.k3s.io/installation/network-options for information about how to migrate."

Additional context / logs:

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

3 participants