Downgrade etcd API version from 3 to 2 on MacOS - homebrew

I have etcd installed through Homebrew on Mac.
etcdctl version
etcdctl version: 3.5.1
API version: 3.5
I would like to downgrade the API version to v2, however when I cheekily set the environment variable it then renders the cluster unhealthy.
export ETCDCTL_API=2
etcdctl cluster-health
cluster may be unhealthy: failed to list members
Error: unexpected status code 404
It may seem counter-productive to downgrade API version, however I am working with a legacy app and I am not ready to upgrade quite yet.
The cluster in question is only on my local development environment so I have no issue blowing it away if need be, but i'm unsure if that will get me to API v2.
Is there a way to get back to API v2?

Related

Does freeradius support redis cluster and if yes in which release

While searching I found that the latest version of freeradius which is 3.2.X doesn't support using redis cluster. but in the github repository I found that they support it in the redis rlm configuration file but I do not where do I found it or if this version is stable or not.
I am expecting to make a configuration for the accounting requests to use redis cluster as a back-end database. Thank you for your help.
Redis clusters are only supported in the unreleased development version (that will become v4). It's not supported in any released stable version.
It's possible to use a Redis proxy that supports clusters in between FreeRADIUS and Redis to work around it if needed.

Elasticsearch::UnsupportedProductError (The client noticed that the server is not a supported distribution of Elasticsearch

Getting this error when using searchkick with elasticsearch on mac.
Searchkick version: searchkick (4.5.2)
$ elasticsearch --version
warning: no-jdk distributions that do not bundle a JDK are deprecated and will be removed in a future release
Version: 7.10.2-SNAPSHOT, Build: oss/tar/unknown/2021-01-16T01:41:27.115673Z, JVM: 16.0.2
To reproduce
Product.reindex
If you are using Python elasticsearch client, you need to downgrade or install version before 7.14.0.
pip install elasticsearch<7.14.0
It worked fine after degrading to elastic search < 7.14. So basically added a gem to restrict the version upgrade
gem elasticsearch, "< 7.14"
Elasticsearch::UnsupportedProductError is raised when your Elasticsearch server version don't match with Ruby's Elasticsearch client (gem elasticsearch). In order to fix this properly you need a server that is up to date with latest Elasticsearch (ES) releases
that means if you are on ES provider like https://cloud.elastic.co/ where you work with latest versions of cluster it's easy peasy => server gets upgraded => this is not an issue
if you however work with provider that is slow to catch up with latest ES releases (like AWS Elasticsearch / AWS Opensearch where last version is 7.10 and will not get upgraded anytime soon) your only option is to use gem elasticsearch, "< 7.14" (Siddhant's answer in this discussion ...and yes this means no potential security updates
other solution may be to silence the verification by overriding method verify_with_version_or_header as proposed in https://github.com/elastic/elasticsearch-ruby/issues/1429#issuecomment-958162468
but reality is both of this solutions are just "not recommended" workarounds. The real fix is a server upgrade

Which kubectl should I use on macOS?

On macOS there's Docker Desktop which comes with a kubectl, there's the Homebrew kubectl, then there's the gcloud kubectl.
I'm looking to use Minikube for local Kubernetes development and also GKE for production.
Which kubectl should I use? I'm thoroughly confused by all the various versions and how they differ from one another. Does it matter at all other than the version of the binary?
It doesn't really matter from where you get an executable as long as it is a trusted source. Although you have to use a supported version (documentation):
kubectl is supported within one minor version (older or newer) of kube-apiserver.
Example:
kube-apiserver is at 1.20
kubectl is supported at 1.21, 1.20, and 1.19

Cannot perform an interactive login from a non TTY device

I was working with docker build that was working fine for me but from yesterday i am getting error while trying to login to aws cli docker
Error Error: Cannot perform an interactive login from a non TTY device
I was facing the same issue. I was using the AWSCli v1 and once I upgraded to v2, it worked fine!
Here is a page that might help.
In my case I not only needed to install AWS CLI v2 but I also needed to uninstall AWS CLI v1. Per the documentation here that is what is recommended.
"AWS CLI versions 1 and 2 use the same aws command name. If you have both versions installed, your computer uses the first one found in your search path. If you previously installed AWS CLI version 1, we recommend that you do one of the following to use AWS CLI version 2:
Recommended – Uninstall AWS CLI version 1 and use only AWS CLI version 2. For uninstall instructions, determine the method you used to install AWS CLI version 1 and follow the appropriate uninstall instructions for your operating system in Installing, updating, and uninstalling the AWS CLI version 1."

client is newer than server (client API version: 1.24, server API version: 1.21)

When I do :
sudo docker version
I obtain this error:
Error response from daemon:client is newer than server (client API version: 1.24, server API version: 1.21)
Anyone can help me to understand what I have to do?
Try setting the version using the command:
export DOCKER_API_VERSION=1.23
It worked perfectly fine for me and resolved the issue.
Docker is running on client / server model, each Docker Engine release has a specific API version.
The combination of the release version and API version of Docker is as follows:
https://docs.docker.com/engine/api/v1.26/#section/Versioning
According to the table above, the Docker API v1.24 is used in Docker Engine 1.12.x and the Docker API v1.21 is used in the Docker Engine 1.9.x. The server needs API version equal to or later than the client.
You have the following three options.
Upgrade the server side to Docker Engine 1.12.x or later.
Downgrade the client side to Engine 1.9.x or lower.
Downgrade the API version used at run time by exporting the DOCKER_API_VERSION=1.21 to environment variable on the client side.
The other answers don't really explain how to do this on a windows machine. I had no access to the gui so I had to get it done from the CLI.
I know this is old, but I fumbled with this for a while until I finally figured it out. So, I hope this helps someone.
Windows Users
For people who are on windows you can set your env variables by going to the Advanced System Settings.
If you need to do it via command line. This is what worked for me:
setx /M DOCKER_API_VERSION "1.23"
Additionally, you can also set the permanent host location, and then just run your commands without the -H option by using the following:
setx /M DOCKER_HOST "192.168.207.131:2375"
NOTE: after you set the variables you must close the command line and open a new one for the changes to take affect.
NOTE 2: If changes are being made to a remote system, you need to logout and log back in for the changes to take affect.

Resources