Comments (4)
Hi,
Stern should work with GKE clusters because GKE uses the client-go credential plugins mechanism. I have tested stern v1.25.0 with gke-gcloud-auth-plugin 0.5.3 on my GKE cluster, and it worked successfully.
Could you please try running gcloud container clusters get-credential
to see if it fixes the issue? Your kubeconfig might not have been updated after installing the plugin.
gcloud container clusters get-credentials <CLUSTER> --region <REGION> --project <PROJECT>
from stern.
I checked ~/.kube/config
and the settings seemed to be correct.
I ran gcloud container clusters get-credentials <CLUSTER>
. It seems to have done a refresh.
❯ gcloud container clusters get-credentials apod-api
Fetching cluster endpoint and auth data.
kubeconfig entry generated for apod-api.
Now stern
is working.
from stern.
I'm glad the issue has been resolved 🎉
I believe that your old kubeconfig was likely using the deprecated gcp
auth-provider as follows. The gcp
auth-provider was removed in client-go 1.26.
- name: gke_api-project-xxxx
user:
auth-provider:
name: gcp # removed in client-go 1.26
I think your new kubeconfig now correctly uses the new plugin mechanism exec
.
- name: gke_api-project-xxxx
user:
exec:
apiVersion: client.authentication.k8s.io/v1beta1
args: null
command: gke-gcloud-auth-plugin
# ...
from stern.
I am closing this as the issue has been resolved. If there are any further problems, please reopen.
from stern.
Related Issues (20)
- Chinese garbled code(中文乱码问题) HOT 2
- print/highlight human readable message from log line HOT 2
- feat: filter pod name HOT 2
- Add a --token argument
- Support for more custom time parsing with templates
- doesn't work with install of microk8s HOT 7
- Stern stops tailing logs after a while (possible log file rotation??) HOT 8
- Parse logs from stdin
- `-t default` seems broken: no output HOT 4
- `toUTC` unable to parse Kubernetes controller-runtime log timestamps HOT 1
- Support a dynamic list of colors HOT 6
- Remove the color red from the static color list HOT 1
- No messages in output when using an array of strings as `exclude` in config file HOT 1
- Support print logs in different colors for each container
- When watching a batch job, automatically stop when it's finished HOT 1
- I was thinking of adding a flag for container index? HOT 2
- Print kubernetes events that relate to the pods (or deployment, service if used) as well
- Stop tailing logs after log rotation in k8s HOT 2
- Logs are not printing .. seems to be stuck
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from stern.