18
votes
Metallb vs Nginx Ingress in Kubernetes
You will need both, as they solve separate problems:
MetalLB receives requests from the outside of the cluster, and balances them across the load balancer(s) in the cluster
Nginx receives requests ...
8
votes
How to get the admin-user token from kubectl
One line solution:
kubectl get secrets -o jsonpath="{.items[?(@.metadata.annotations['kubernetes\.io/service-account\.name']=='default')].data.token}"|base64 --decode
Found in official ...
8
votes
How to get the admin-user token from kubectl
Here is the full example with creating admin user and getting token:
Creating a admin / service account user called k8sadmin
sudo kubectl create serviceaccount k8sadmin -n kube-system
Give the user ...
6
votes
Accepted
Kubernetes and gcloud: how to stop using service account?
It turns out I just needed to run
gcloud container clusters get-credentials mycluster
Initially, I thought that I would also need to fix this by deleting my kubeconfig file at
~/.kube/config
then ...
4
votes
Accepted
Cron jobs not running on Kubernetes + Alpine linux
Wellcome to SuperUser.
First of all, maybe you're facing it the wrong way. If the goal is to restart the complete container every 15 minutes, maybe you should check the links bellow.
Question about ...
3
votes
Minikube fails to pull any images in MacOS
This is issue is due to the fact that the "native" MacOS hypervisor VM does not have external connectivity.
This has been reported here.
The fix is rather trivial, but requires installing VirtualBox ...
3
votes
Total memory usage as reported by kubectl top nodes vs top pods
It appears the difference comes down to buffers. If we run free -mw on each node I can see significant (10-15 GB) amounts of ram sunk there.
$ kubectl get nodes -o name | cut -d / -f 2 | while read ...
3
votes
Accepted
Why does nginx return 404 on my Kubernetes Ingress route?
The Nginx Ingress does not strip the path of your request.
When you request /eks-test on Ingress, the request is forwarded to your service including the path, ending in your container as "GET /eks-...
3
votes
How to limit the sum of memory used by a group of docker containers?
This is provided by cgroups. By default, each container gets a separate cgroup with it's own limits. However, if you create your own cgroup, you can assign containers with that group as the parent, ...
3
votes
How to configure multiple old desktops as Kubernetes cluster?
Found a good answer on the Kubernetes Slack, was probably a better place to post. Here it is for anyone looking for the answer:
Both approaches have their advantages and drawbacks, so the best choice ...
2
votes
Kubernetes -- how to remove terminated pods from being listed in Kubernetes dashboard
If you seeing the these pods status on the cli as terminated, then run the below command to delete the pods from there and then see on the dashboard, whether they disappears.
kubectl delete pod <...
2
votes
ImageInspectError - When trying to start k8s pod
Now I feel silly because I should have thought of this sooner, but I will leave this answer incase someone comes across this issue in the future.
I ran:
docker rmi us.gcr.io/image-place/base-...
2
votes
Accepted
Difference between Kubernetes ingress controller and CNI plugin?
Is it correct to say that a CNI enables communication within a
cluster, and an ingress controller enables communication from outside
of the cluster to reach the inside of the cluster?
More ...
2
votes
How to set CPU affinity for Pod in kubernetes?
I solved it. You have to add 'kubeReserved' field in config.yaml file. In addition, you have to remove /var/lib/kubelet/cpu_manager_state file. Then, restart kubelet by executing 'systemctl restart ...
2
votes
How to get the admin-user token from kubectl
it's a bit late,
Update Kubernetes CLI(kubectl) to > 1.24(this solved my problem.)
Install dashboard and setup Cluster role:
https://github.com/kubernetes/dashboard/blob/master/docs/user/access-...
2
votes
Intermittent network timeout in docker
The issue was related to MTU. Our cluster is using Calico VXLAN networking, which has an MTU of 1450. The inner Docker container wasn't taking cognizance of this and it doesn't seem to have been ...
2
votes
Accepted
Cancel a pod with error ImageBackoff
I assume you want to delete this deployment as the pod is not able to pull specified image.
Try these steps:
kubectl get deployment (this will list all deployments in the default namespace).
kubectl ...
2
votes
more command not showing --More-- on Ubuntu for Windows
I've run into the same error, but with less. I've resolved installing the newer version of kubectl (1.26.0-00). I had the 1.24.0-00 version before.
To show the last 5 version:
apt-cache madison ...
2
votes
Unable to initialize kubeadm?
You need to make sure kubernetes can do IPv4 forwarding. This is assuming you use iptables and not ipvs.
Run the following script to add bridge (for IPv4 and IPv6 and IP forwarding):
cat <<EOF | ...
2
votes
Accepted
Login to Kubernetes dashboard - Can't get the token - No resources found
I found the solution. I had to execute:
kubectl create token eks-admin --namespace kube-system
...and this outputs the token.
Source: https://github.com/kubernetes/kubernetes/issues/110113
2
votes
Accepted
Why path on Windows is not recognized? error: the path "./m.yml" does not exist
Computers are very good at finding things. When a computer tells you it cannot find something, then in 99.9% of cases, the reason it cannot find the thing is that the thing you are telling it to find ...
1
vote
Accepted
Helm chart nginx-ingress controller TCP redirect http to https
This is a known issue when using SSL termination combined with ELB Classic in TCP mode (Layer 4).
You can use the following workaround, which consists in:
1 - Create a custom ConfigMap for nginx-...
1
vote
Kubernetes KeyCloak and Traefik configuration
I'm definitely NOT an expert in this area but have you tried to specify the namespace before the middleware name? In one of my Helm yaml:s I have the following which solved the issue for me (I guess {{...
1
vote
See kubernetes pod restarts in monitoring
To troubleshoot some crashing Pod, first you should look at its description:
$ kubectl describe pod -n ci clair-kube-7c8d8cf949-nlhv8
Containers:
clair:
[...]
State: Running
...
1
vote
Accepted
How do you make minikube ssh work with kitty
It turns out that you can do this neatly in one line using scp, minikube ip and minikube ssh-key so long as TERMINFO is set correctly on your host machine.
scp -r -i $(minikube ssh-key) $TERMINFO ...
1
vote
Accepted
Windows doesn't respect default program for .txt files when opening external file from command line
From the kubectl edit documentation:
It will open the editor defined by your KUBE_EDITOR, or EDITOR environment variables, or fall back to 'vi' for Linux or 'notepad' for Windows.
kubectl simply ...
1
vote
Accepted
How to monitor/log sql time from kubernetes
Assuming I just want to graph SGBD response times, I could setup some Pod that would query my database on a loop, and output some result to its stdout, ... some kind of time mysql <cmd-args>. ...
Only top scored, non community-wiki answers of a minimum length are eligible
Related Tags
kubernetes × 225linux × 40
docker × 34
networking × 23
ubuntu × 10
google-cloud-platform × 10
dns × 9
azure × 9
nginx × 7
amazon-web-services × 7
mount × 6
ssh × 5
ssl × 5
tls × 5
ansible × 5
bash × 4
virtualbox × 4
proxy × 4
cluster × 4
windows × 3
macos × 3
hard-drive × 3
installation × 3
routing × 3
mysql × 3