Questions tagged [kubectl]

The Kubernetes command-line tool, kubectl, allows you to run commands against Kubernetes clusters. You can use kubectl to deploy applications, inspect and manage cluster resources, and view logs.

3648 questions
1
vote
1 answer

Serializer error, charset=utf-8 doesn't exist when applying a k8s redis configmap

I'm installing bitnami/redis with helm-charts, and the install fails with this error: serializer for text/html; charset=utf-8 doesn't exist I have isolated the problem, and it seems to come from this configmap. Which once templated, looks like…
1
vote
1 answer

Kubectl cannot unmarshal string into Go value of type struct

Suddenly kubectl with gcloud is failing. kubectl was using an old build from 2021 but I upgraded it to see if that fixes the error. gcloud container clusters get-credentials {hahaNotTellingYouMyClusterName} --zone us-central1-a --project…
Calicoder
  • 1,322
  • 1
  • 19
  • 37
1
vote
2 answers

What if i delete a Node in GKS

I have setup GKS in free trail access. here is screenshot of cluster I have already setup vm instance in gce. So my kubernets cluster is having less resource for testing i have setup it but i want to know if i delete 1 node out of 3 what will…
1
vote
0 answers

kubectl ingress edit overridden but can't find by what

I'm deploying an AWX on a K8S cluster with awx-operator and a GitHub repository that I found (https://github.com/kurokobo/awx-on-k3s) which can work with K8S too. So everything works good during deployment, except that I have to force PostgreSQL pod…
1
vote
1 answer

Pin Kubernetes pods/deployments/replica sets/daemon sets to run on specific cpu only

I need to restrict an app/deployment to run on specific cpus only (say 0-3 or just 1 or 2 etc.) I found out about CPU Manager and tried implement it with static policy but not able to achieve what I intend to. I tried the following so far: Enabled…
Koshur
  • 378
  • 1
  • 6
  • 20
1
vote
0 answers

How to get vertical pod autoscaling recommendations using kubernetes client-go package?

I am using the client-go to generate reports about resources for my team. We are using VPA(https://github.com/kubernetes/autoscaler) to compare its recommendations for pods against our own. I have everything working well except for the part where…
A Bit of Help
  • 1,368
  • 19
  • 36
1
vote
1 answer

How to configure aws EKS Cluster to use both spot and on-demand instances

I want configure my Elastic Kubernetes Service Cluster in such a way that it will use spot instances whenever available and if spot instances are not available it will use normal on-demand instances
silentnow
  • 401
  • 3
  • 14
1
vote
3 answers

Kubectl deployment - how to load env vars from JSON file

I'm using kubectl to deploy ASP.Net core apps to K8S cluster. At the current moment I hardcode container PORTs and ConnectionString for DataBase like this: apiVersion: apps/v1 kind: Deployment metadata: name: mydeploy spec: replicas: 1 …
Mikhail_Sam
  • 10,602
  • 11
  • 66
  • 102
1
vote
1 answer

Kubectl: Fatal error runtime out of memory

I logged into the Linux bastion host where kubectl is installed for connecting to the Kubernetes cluster. On the Bastion host when I run any kubectl command like the one below: kubectl get pods I get the error below: fatal error: runtime: out of…
Promise Preston
  • 24,334
  • 12
  • 145
  • 143
1
vote
1 answer

Kubectl like output format for my cobra project

I am new to golang and trying to develop a commandline tool using cobra. I would like to provide flags like kubectl offers to it's users. As a first step i would like to implement kubectl standard format like this kubectl get pods -n mpo NAME …
Jibi Makkar
  • 63
  • 1
  • 8
1
vote
2 answers

How do I remove a specific block from the value of a config map?

I have a config map that looks like this: kubectl describe configmap example-config --namespace kube-system Name: example-config Namespace: kube-system Labels: Annotations: Data ==== mapRoles: ---- - rolearn:…
Dan
  • 173
  • 2
  • 9
1
vote
0 answers

Show pod names without id part

is there any possibility to cut off the id part of the pod name? I just need the application name. Here is an example: I get the list of pods with the command: kubectl get pod --all-namespaces -o=custom-columns=NAME:.metadata.name --field-selector…
Sup3rwoman
  • 11
  • 1
1
vote
0 answers

How can I connect to kubernetes-dashboard via "https"?

I have a running private Kubernetes Cluster (v1.20) with fargate instances for the pods on the complete cluster. Access is restricted to the nodePorts range and 443. I use externalDns to create Route53 entries to route from my internal network to…
1
vote
1 answer

Kubectl commands cannot be executed from another VM

I'm having an issue when executing the "kubectl" commands. In fact, my cluster consists of one Master and one Worker node. The kubectl commands can be executed from the Master server without having an issue. But, I also have another VM which I use…
Container-Man
  • 434
  • 1
  • 6
  • 17
1
vote
3 answers

kubectl command to update the sidecar image

Along with the container image in kubernetes, I would like to update the sidecar image as well. What will be the kubectl command for this process?
gaurav sharma
  • 91
  • 1
  • 10