Repository navigation
v0.1.0-alpha.7
Pre-release
Pre-release
Immutable
release. Only release title and notes can be modified.
Added
auth get-token, the kubectl plugin, now accepts--user-idwithout--name, the form Rancher v2.16 (main, not yet released) writes into kubeconfigs. Rancher writes it only when itskubeconfig-exec-get-tokensetting is true andkubeconfig-generate-tokenis false, and adds--clusteronly for a cluster with an authorized cluster endpoint. The plugin uses a saved login of that user for the server. Without--cluster, it creates a token that is not tied to one cluster, and kubectl reaches the cluster through Rancher. It gives kubectl a token only if Rancher says the token belongs to that user.- With
--user-id, the kubectl plugin now returns a token to kubectl only if it was created through the auth config you named with--auth-provider. The value must be the auth config's exact name, such ascorp-ldap; without--auth-provider, only the user is checked. A value that is no auth config's name, such as the provider typeopenLdapProvider, fails withNOT_FOUND(exit 4) when the plugin has to sign in. When the saved login was made through another auth config, the plugin revokes the token it just created and the call fails withAUTH(exit 3). - A login now records the auth config its token was created through.
config infoshows it astokenAuthConfig,auth statusasauthConfig, and theauth loginresult astokenAuthConfig. A pasted token, including an API key from the Rancher UI, or a login from an earlier release has no auth config recorded. The first kubectl call with--user-idand--auth-providerrecords it when the saved login has a user id; you do not need to log in again. rancher kubeconfignow writes--auth-providerbeside--user-idwhen the login records its auth config.auth loginnow warns when you log in to a server entry as a different user than the one saved for it. The login still works; the warning shows the old and the new user id.auth loginnow warns when you log in to a server entry through a different auth config than the one saved for it. The login still works; the warning shows the old and the new auth config. It says nothing when the earlier login has no auth config recorded.patch <kind>accepts-pas the short form of--patch, as kubectl does.patch <kind> --type mergeapplies an RFC 7386 JSON merge patch. The default is still--type json, an RFC 6902 JSON array. A merge patch replaces each list it contains in full, and the dry-run warns when a list loses entries the object has.- Tab completion for
--auth-providernow suggests the names of the server's enabled auth configs that the CLI can sign in with. It works onauth login,auth get-tokenandrancher token, without sending your token. rancher delete project --delete-namespacesdeletes every namespace in the project, even ones moved into it, then the project. Each namespace to be deleted is checked with a dry-run first, and nothing is deleted when one is refused.default,kube-systemandkube-public, andlocalandfleet-localon the local cluster, are never deleted.rancher getandrancher patchnow complete role template and global role ids. Hidden and locked ones are offered too.
Changed
- The CLI is now built against the Kubernetes 1.37 client libraries, the version Rancher v2.16 (main, not yet released) uses. Commands and output are unchanged.
- With token reuse on (
rancher config set-token-reuse on), a call with--user-idnow saves one server entry for each server and user, namedexec-login-<host>-<user id>. With--auth-providerthere is one for each auth config too, and its name also ends in the auth config. The plugin never writes a login over an entry that holds another user's login or a login through another auth config. - With token reuse on, a kubectl call without
--user-idnow fails when the server has severalexec-login-entries. The plugin looks at theexec-login-entries only when none of the server entries you created withauth loginhas a token it can use for the call. The error isAMBIGUOUS_SELECTION(exit 2) and shows how to log in to an entry instead. auth logout,auth delete-tokenandconfig delete-servernow report a certificate failure asTLS_TRUST. Before, a token they could not revoke because of the server's certificate showed Go's raw TLS error with no code. Now itsnotRevokedentry in the output hascode: TLS_TRUST, a message that says how to fix it, and the certificate's details. Exit codes are unchanged.- When a revoke fails because the server's CA is unknown, the warning now tells you to save the CA before you log in again. Without the saved CA your next login fails on the same certificate and cannot retry the revoke. The warning gives the command:
rancher config update-server <entry> --cacert <file>. rancher auth login <entry>no longer suggests--cacertfor a certificate error. That command refuses--cacertwithout--url. If the server's CA is unknown, the error now tells you to save it withrancher config update-server <entry> --cacert <file>. If the certificate names a different host, it tells you to check the server URL saved for the entry.- Certificate errors and the
auth logintrust prompt use plainer words. The error says to get the CA from a source you trust, and both say to confirm the fingerprint with the server's administrator, instead of "out of band" or "a trusted channel". - A positional argument is now used exactly as typed, spaces included. Before, the spaces around it were dropped:
rancher get pod ' web'looked up the podweb. Now it looks up a pod namedweb. - A bool flag followed by a separate
trueorfalse, as in--dry-run false, now fails withVALIDATION(exit 2). Before,rancher schema --dry-run falsefailed withDRY_RUN_NOT_APPLICABLE(exit 2). The error shows the word that followed the flag, and1,0,tandfare refused the same way. Write the value joined with=, as in--dry-run=false;--dry-run=1and--dry-run=tstill work. - The error for words typed after a lone
-now reads'x' 'y' after a - on its own; a - on its own ends the command line. Before, it reada - on its own ends the command line, so the words after it would be ignored: 'x' 'y'. The command still fails withVALIDATION(exit 2); only the text changed. - A bool flag with only whitespace after
=, typed as'--yes= ', is now refused even when--helpor--versionfollows it. Before,'--yes= ' --helpshowed help,'--yes= ' --versionshowed the version, and'--yes= ' nosuchfailed with the unknown-command error. Now all three fail withVALIDATION(exit 2):--yes= has an empty value; a bool flag typed with = takes true or false. --auth-providernow takes an auth config name, such ascorp-ldap. Without--user-id, a provider type such asopenLdapProviderstill works; if it matches more than one auth config, the CLI asks you to pick one or, when it cannot ask, lists them in the error. With--user-id, only the exact auth config name works. The sign-in menu lists auth configs. When a provider type has several, a password or OAuth sign-in says which one it uses.- Error, warning and help messages now give the fact first, then the rule, usually after a semicolon. Before, many of them joined the two with a comma and "so". The facts, flags and commands in each text are unchanged; a script that matches the old wording of one of these messages must match the new one.
- Commands that take a user, project, role template, global role or node driver now take its id as the argument. That is
getandpatchfor all five anddeletefor a user or project. The argument shows as<id>([id]onget). If what you typed is the username or display name of exactly one object, theNOT_FOUNDerror gives that object's id, lists it incandidatesand suggestsrancher get <kind> '<id>'. A project member who types a project's display name gets the same, and the code staysRBAC. - When
patchrefuses a patch, the error now says in plain words why. Before, theVALIDATION(exit 2) message quoted Go's JSON decoder. If you give a JSON object without--type merge, the error now tells you to pass--type merge.patchnow reads a patch file that starts with a UTF-8 byte-order mark. rancher delete projectnow lists the namespaces Rancher deletes with the project and the ones it keeps. Before, its warning said namespaces created through Rancher are deleted with the project and namespaces moved into the project are kept. Rancher deletes the namespaces that carry thefield.cattle.io/creatorIdannotation and keeps the others. The dry-run and the result list them, and-o jsonhas every one indata.objects.- A namespace is now part of a project only if its
field.cattle.io/projectIdannotation names it; the project label alone is no longer enough. This applies wherever--projectnarrows a command to a project's namespaces, and tousage --by projectandproject add-namespace. The one exception isproject remove-namespace: it still accepts a namespace that has the project label but no annotation, and it removes the label. - Live completion now shows a user, project, cluster, role or node driver id with its name beside it. For example,
rancher delete user <TAB>listsu-abc12withalice (Alice Smith). The inserted value is still the id. bash shows names on the second TAB, on bash 4 and later only. rancher getnow prints built-in kinds with the same columns and cells askubectl get. This covers nodes, pods, deployments, services and the other 13 Kubernetes kinds. The table comes from the cluster's API server, and a node showsNotReady, orReady,SchedulingDisabledwhen cordoned, as kubectl does.-o wideadds the server's extra columns, and a list of a namespaced kind without--namespaceshows a NAMESPACE column. If the server answers without a table,getwarns and shows NAME and AGE.-o json,-o yamland-o nameare unchanged.config use-serverwith an unknown name now lists the configured servers, asconfig delete-serverdoes. Before, it said onlyserver not found: <name>. The error isNOT_FOUND(exit 4) with the servers as candidates, and every error that lists servers now sorts them by name.--aswith an unknown or ambiguous user, andrevoke --rolewith a role the subject does not have, now list the choices incandidates. Before, the--aserror only pointed you torancher get users, and therevoke --roleerror named the roles the subject has only in its message.--asis onaccess can,access clusters,access explain,access listandaccess projects. For--as, each candidate is a user id with its display name, and a name that matches several users lists every match.- REFERENCE.md's install, shell completion, cluster scope and project scope sections now use plainer words. Before, they used terms such as "taking over", "stale shell command hash" and "the per-TAB HTTP budget". Two headings have new names: "Defensive bootstrap" is now "Downloading and running the installer safely", and "Editor quirk" is now "Notepad on Windows 11". If you bookmarked either old section, update the link to the new heading.
- Errors, warnings and help of
project,grant,revoke,delete user,create secretandoidc-clientnow use plainer words and Rancher's own names. Before, they said things like "subject holds", "ordinary secret", "alias-matched binding" and "impossible secret shape". Secret names now print as a comma-separated list, not in Go's[a b]form, andoidc-client rotate-secretnow reportssecret <name> regeneratedinstead ofrotated. This rewording changes no error code, exit code or hint; a script that matches the old text of one of these messages must match the new one.
Security
- Text output now drops the control characters U+0080-U+009F and the line and paragraph separators U+2028 and U+2029 from server text. Before, only ASCII control characters and Unicode format characters were dropped.
Fixed
- LDAP, Active Directory and Azure AD logins now work on Rancher v2.16 (main, not yet released). That version requires the login request to include the auth config name, which the CLI did not send.
- A patch that removes
kindno longer prints the whole object in its error. Before, the message held the patched object, Secret data included. A patch that removes the name ormetadatanow fails withVALIDATION(exit 2) namingmetadata.name; it wasGENERIC(exit 1)name is required. - The bash second TAB no longer takes seconds on a long list. Before, a list of 2000 ids took about 9 seconds to show; it now takes well under a second.
Compatibility
access can,access explain,access listandaccess who-cannow fail withNOT_FOUND(exit 4) when--namespacenames a namespace that does not exist. Before, they failed withVALIDATION(exit 2) and the messagenamespace <name> not found on cluster <id>. The error now readsnamespace not found: <name>and its hint islist with: rancher get namespaces --cluster '<id>'. A script that checks for exit 2 on a missing namespace must check for exit 4.patch <kind>takes the patch file as--patch-file, as kubectl does. Before, you passed the file with-for--filename. Both now fail withVALIDATION(exit 2) as unknown flags.--patch-file -still reads the patch from stdin. Replace-f <file>with--patch-file <file>in scripts.- Error candidates for
--auth-providernow list auth config names instead of provider types. This applies when the value matches no auth config, or when you pass none on a server with several. A script that looked foropenLdapProviderthere now finds names such asopenldap. patch <kind>now refuses a few patches it accepted. A key repeated in one JSON object, atestop withoutvalue, and afromthat is not a string on any op now fail withVALIDATION(exit 2). Fix the patch: name each key once, and givetestitsvalue.- In
rancher schema, the first argument ofget,patchanddeleteis nowid, notname, for the kinds that take an id. That is user, project, roletemplate, globalrole and nodedriver forgetandpatch, and user and project fordelete. A tool that reads the argument by name must readidfor those.