input stringclasses 1
value | output stringlengths 30 28.3k | text stringlengths 151 31.8k | instruction stringlengths 49 30.3k |
|---|---|---|---|
@Turing85 @Jakub
Many thanks for your comments - especially those critical ones
And thanks, Jakub, for pointing me towards using the CA of custom certificate. What needed to be done in order to fix this was:
switch the value obtained from kafka-datalake-prod-cluster-ca-cert secret with the full chain of root CA, inter... | ###Instruction: I am trying to configure Strimzi Kafka listener custom cert, following the documentation: https://strimzi.io/docs/operators/latest/full/configuring.html#ref-alternative-subjects-certs-for-listeners-str
I want to expose those listener outside of the Azure Kubernetes Service within the private virtual net... | I am trying to configure Strimzi Kafka listener custom cert, following the documentation: https://strimzi.io/docs/operators/latest/full/configuring.html#ref-alternative-subjects-certs-for-listeners-str
I want to expose those listener outside of the Azure Kubernetes Service within the private virtual network.
I have pro... | |
Cleanest way to achieve what you want is using the remote chart as dependency:
Chart.yaml
name: mychartname
version: 1.0.0
apiVersion: v2
dependencies:
- name: moon2
version: "2.4.0"
repository: "https://charts.aerokube.com/"
And overriding its values like this:
values.yaml
moon2:
customIngress:
enable... | ###Instruction: I would like to install a helm release using argocd, i defined a helm app declaratively like the following :
apiVersion: argoproj.io/v1alpha1
kind: Application
metadata:
name: moon
namespace: argocd
spec:
project: aerokube
source:
chart: moon2
repoURL: https://charts.aerokube.com/
ta... | I would like to install a helm release using argocd, i defined a helm app declaratively like the following :
apiVersion: argoproj.io/v1alpha1
kind: Application
metadata:
name: moon
namespace: argocd
spec:
project: aerokube
source:
chart: moon2
repoURL: https://charts.aerokube.com/
targetRevision: 2.... | |
You're trying to use both the kubernetes inventory plugin and the k8s_info module, and because of that you're getting conflicting results. The two don't have anything to do with each other.
The inventory module
The kubernetes inventory module is -- I think -- a weird beast; it produces an ansible inventory in which the... | ###Instruction: Inventory file (inventory/k8s.yaml):
plugin: kubernetes.core.k8s
connections:
- kubeconfig: ~/.kube/config
context: 'cluster-2'
Task file (roles/common/tasks/main.yaml):
# Method 1: Using `kubernetes.core` plugin to list the pod names:
- name: Get a list of all pods from any namespace
kubernete... | Inventory file (inventory/k8s.yaml):
plugin: kubernetes.core.k8s
connections:
- kubeconfig: ~/.kube/config
context: 'cluster-2'
Task file (roles/common/tasks/main.yaml):
# Method 1: Using `kubernetes.core` plugin to list the pod names:
- name: Get a list of all pods from any namespace
kubernetes.core.k8s_info:... | |
The main error was the port. The right port is 8080. This yaml works fine for me.
apiVersion: apps/v1
kind: Deployment
metadata:
name: kafka-ui-deployment
labels:
app: kafka-ui
spec:
replicas: 1
selector:
matchLabels:
app: kafka-ui
template:
metadata:
labels:
app: kafka-ui
... | ###Instruction: I tried to deploy the Kafka-UI in my local Kubernetes cluster, but ingress-nginx gives 502 error (Bad Gateway). I used the following configurations:
Deployment:
apiVersion: apps/v1
kind: Deployment
metadata:
name: kafka-ui-deployment
labels:
app: kafka-ui
spec:
replicas: 1
selector:
ma... | I tried to deploy the Kafka-UI in my local Kubernetes cluster, but ingress-nginx gives 502 error (Bad Gateway). I used the following configurations:
Deployment:
apiVersion: apps/v1
kind: Deployment
metadata:
name: kafka-ui-deployment
labels:
app: kafka-ui
spec:
replicas: 1
selector:
matchLabels:
... | |
NOTE: As mentioned in Kubernetes Container Runtimes Doc, cgroupfs is preferred when the OS have cgroup v1.
Can you specify which paragraph is this? If not mistaken the document didn't state cgroupfs is preferred over systemd for distro that uses cgroup v1. systemd is widely accepted as the init system but cgroup v2 i... | ###Instruction: I am wondering if systemd could be used as the cgroup driver in cgroup v1 environment.
NOTE: As mentioned in Kubernetes Container Runtimes Doc, cgroupfs is preferred when the OS have cgroup v1.
I have tried to set up a Kubernetes cluster using systemd as cgroup driver, and it is working correctly for no... | I am wondering if systemd could be used as the cgroup driver in cgroup v1 environment.
NOTE: As mentioned in Kubernetes Container Runtimes Doc, cgroupfs is preferred when the OS have cgroup v1.
I have tried to set up a Kubernetes cluster using systemd as cgroup driver, and it is working correctly for now.
The test env ... | |
Found the solution.
This is not detailed in the reference
https://nightlies.apache.org/flink/flink-kubernetes-operator-docs-release-0.1/docs/custom-resource/reference
or example Flink Deployment
https://nightlies.apache.org/flink/flink-kubernetes-operator-docs-release-0.1/docs/custom-resource/pod-template/
But here it ... | ###Instruction: I'm using Flink Kubernetes Operator 1.3.0 and need to pass some environment variables to a Python job. I have followed the official documentation and the example runs fine. How can I inject environment variables so that I can use it inside the python file?
EDIT:
Here's the yaml file that I've used. Its ... | I'm using Flink Kubernetes Operator 1.3.0 and need to pass some environment variables to a Python job. I have followed the official documentation and the example runs fine. How can I inject environment variables so that I can use it inside the python file?
EDIT:
Here's the yaml file that I've used. Its straight from th... | |
In Watch, a long poll connection is established with the API server. Upon establishing a connection, the API server sends an initial batch of events and any subsequent changes. The connection will be dropped after a timeout occurs.
I would suggest using an Informer instead of setting up a watch, as it is much more opti... | ###Instruction: I want to watch changes to Pods continuously using the client-go Kubernetes SDK. I am using the below code to watch the changes:
func (c *Client) watchPods(namespace string, restartLimit int) {
fmt.Println("Watch Kubernetes Pods")
watcher, err := c.Clientset.CoreV1().Pods(namespace).Watch(contex... | I want to watch changes to Pods continuously using the client-go Kubernetes SDK. I am using the below code to watch the changes:
func (c *Client) watchPods(namespace string, restartLimit int) {
fmt.Println("Watch Kubernetes Pods")
watcher, err := c.Clientset.CoreV1().Pods(namespace).Watch(context.Background(),
... | |
According to the documented Prometheus metrics exposed by QuestDB, questdb_memory_mem_used includes all native memory allocations which may include virtual memory if it wasn't touched yet.
This metric includes mmapped files, so that's why its value is that big. You might see that metric grow when you access large table... | ###Instruction: We've been looking at memory for capacity planning and have a Helm-deployed 8GB-limited QuestDB instance running on one of our k8s clusters.
We recently began scraping metrics off of it. I'm trying to get to the bottom of the questdb_memory_mem_used metric, which occasionally sees excursions way beyond ... | We've been looking at memory for capacity planning and have a Helm-deployed 8GB-limited QuestDB instance running on one of our k8s clusters.
We recently began scraping metrics off of it. I'm trying to get to the bottom of the questdb_memory_mem_used metric, which occasionally sees excursions way beyond the resource lim... | |
As per this SO , As you said Post removing “command” from deployment file and it is working Because when you set MONGO_INITDB_ROOT_USERNAME and MONGO_INITDB_ROOT_PASSWORD ENV variables in your manifest. Mongo container will enable --auth by itself. So, you don't need to specify explicitly and check here.
Refer to thi... | ###Instruction: I have created pod with below pod definition which uses mongo official docker image. The expected result here is mongo docker creates user and pwd with env variables MONGO_INITDB_ROOT_USERNAME and MONGO_INITDB_ROOT_PASSWORD and then it will use /etc/mongo/mongod.conf provided to it from volume. Instead... | I have created pod with below pod definition which uses mongo official docker image. The expected result here is mongo docker creates user and pwd with env variables MONGO_INITDB_ROOT_USERNAME and MONGO_INITDB_ROOT_PASSWORD and then it will use /etc/mongo/mongod.conf provided to it from volume. Instead what happens is... | |
Found the answer here: https://stackoverflow.com/a/69999245/3883694
You can disable SSL certificate verification.
https://doc.traefik.io/traefik/routing/overview/#transport-configuration
---
apiVersion: traefik.containo.us/v1alpha1
kind: ServersTransport
metadata:
name: traefik-dashboard-transport
namespace: traefi... | ###Instruction: I'm moving my project to Kubernetes using Traefik for routing and MetalLB as my load balancer.
I've deployed several apps and I'd like to make use of official Kubernetes-Dashboard. So I deployed the Kubernetes-Dashboard using recommended config and created IngressRoute:
# dashboard.yaml
apiVersion: trae... | I'm moving my project to Kubernetes using Traefik for routing and MetalLB as my load balancer.
I've deployed several apps and I'd like to make use of official Kubernetes-Dashboard. So I deployed the Kubernetes-Dashboard using recommended config and created IngressRoute:
# dashboard.yaml
apiVersion: traefik.containo.us/... | |
As of 2023, it is possible. Just run:
minikube ssh '<command>'
For example:
minikube ssh 'ls -la'
| ###Instruction: Just curious if it is possible to execute a command inside minikube without doing minikube ssh and then executing the command.
Something like:
minikube ssh exec -it <command>
### Response: As of 2023, it is possible. Just run:
minikube ssh '<command>'
For example:
minikube ssh 'ls -la'
| Just curious if it is possible to execute a command inside minikube without doing minikube ssh and then executing the command.
Something like:
minikube ssh exec -it <command>
| |
You should think of template (and the Helm-specific include) like function calls that take a single parameter. Here you're passing that parameter as $, a special variable that refers to the top-level object. You probably want ., which within a range loop refers to the current item.
{{ range $.Values.imageCredentials ... | ###Instruction: Secret value is returning NIL
When i run the command below to check the values in the secret
kubectl get secret cred2 -n service-b -o jsonpath='{.data.*}' | base64 -d
It returns a Nil value. How do i get the value that was passed on the values.yaml file?
{"auths":{"%!s(<nil>)":{"username":"%!s(<nil>)",... | Secret value is returning NIL
When i run the command below to check the values in the secret
kubectl get secret cred2 -n service-b -o jsonpath='{.data.*}' | base64 -d
It returns a Nil value. How do i get the value that was passed on the values.yaml file?
{"auths":{"%!s(<nil>)":{"username":"%!s(<nil>)","password":"%!s(... | |
...under the Authorization section it says that authorization is controlled through a Policy.
The sample you saw is a cluster that uses ABAC. From your screenshot your cluster is likely to use RBAC which access policy is not used.
So what exactly is a Policy? How is it setup?
Here's the official documentation for A... | ###Instruction: In the Kubernetes documentation for controlling-access to the API server, under the Authorization section it says that authorization is controlled through a Policy.
However, a Policy is not found as an API resource:
❯ k api-resources | grep -i policy
networkpolicies netpol ... | In the Kubernetes documentation for controlling-access to the API server, under the Authorization section it says that authorization is controlled through a Policy.
However, a Policy is not found as an API resource:
❯ k api-resources | grep -i policy
networkpolicies netpol networking.k8s.... | |
Correct me if I'm wrong, but from the description of your problem it looks like you actually have two problems:
The fact that you have separate services code in the same repo (team A and team B);
The fact that you have several environments (development/production, for example)
The second issue can be easily solved if... | ###Instruction: I'm not sure how to phrase this so I apologize if the title of the question does not make sense to you.
Due to various historical reasons, I have multiple teams contribute to the same code repo, that serves multiple service endpoints. Currently all teams deployments and releases are done together which ... | I'm not sure how to phrase this so I apologize if the title of the question does not make sense to you.
Due to various historical reasons, I have multiple teams contribute to the same code repo, that serves multiple service endpoints. Currently all teams deployments and releases are done together which creates a lot of... | |
Once PVC/PV are created (https://kubernetes.io/docs/concepts/storage/persistent-volumes/), there are number of possible solutions.
For specific question, options 1 and 2 will suffice. Listing more for reference, however this list does not try to be complete.
Simplest and native, kubectl cp: https://kubernetes.io/docs/... | ###Instruction: I want to add or copy files into persistent volume and then use it in container using volume mount ?any help
### Response: Once PVC/PV are created (https://kubernetes.io/docs/concepts/storage/persistent-volumes/), there are number of possible solutions.
For specific question, options 1 and 2 will suff... | I want to add or copy files into persistent volume and then use it in container using volume mount ?any help
| |
Make sure you have created a fargate profile with the namespace selector as argocd. It might be one of the issues.
refer this https://docs.aws.amazon.com/eks/latest/userguide/fargate-getting-started.html#fargate-gs-create-profile
| ###Instruction: Is there anyone who uses argo cd on eks fargate?? It seems that there is an issue with Argo setup on Fargate. All pods are in pending state
I’ve tried installing on argocd namespace and existing ones. Still doesn’t work
I tried to install it using the commands below:
kubectl create namespace argocd
kube... | Is there anyone who uses argo cd on eks fargate?? It seems that there is an issue with Argo setup on Fargate. All pods are in pending state
I’ve tried installing on argocd namespace and existing ones. Still doesn’t work
I tried to install it using the commands below:
kubectl create namespace argocd
kubectl apply -n arg... | |
it's due to the node's POD limit or IP limit on Nodes.
So if we see official Amazon doc, t3.micro maximum 2 interface you can use and 2 private IP. Roughly you might be getting around 4 IPs to use and 1st IP get used by Node etc, There will be also default system PODs running as Daemon set and so.
Add new instance or u... | ###Instruction: I have created a new EKS cluster with 1 worker node in a public subnet. I am able to query node, connect to the cluster, and run pod creation command, however, when I am trying to create a pod it fails with the below error got by describing the pod. Please guide.
Tolerations: node.ku... | I have created a new EKS cluster with 1 worker node in a public subnet. I am able to query node, connect to the cluster, and run pod creation command, however, when I am trying to create a pod it fails with the below error got by describing the pod. Please guide.
Tolerations: node.kubernetes.io/not-... | |
You may have seen JSONPath syntax like this floating around the internet and hoped that you could select a list item and patch it using Kustomize.
/spec/containers[name=my-app]/command
As @Rico mentioned in his answer: This is a limitation with JSON6902 - it only accepts paths using JSONPointer syntax, defined by JSON... | ###Instruction: I'm trying to see if there's a way to apply a kustomize patchTransformer to a specific container in a pod other than using its array index. For example, if I have 3 containers in a pod, (0, 1, 2) and I want to patch container "1" I would normally do something like this:
patch: |-
- op: add
path: ... | I'm trying to see if there's a way to apply a kustomize patchTransformer to a specific container in a pod other than using its array index. For example, if I have 3 containers in a pod, (0, 1, 2) and I want to patch container "1" I would normally do something like this:
patch: |-
- op: add
path: /spec/containers... | |
For anyone that stumbles upon this question trying to setup Controur, gRPC, and TLS;
you want to use HTTPProxy instead. Working configuration with TLS:
apiVersion: projectcontour.io/v1
kind: HTTPProxy
metadata:
name: service-proxy
spec:
virtualhost:
fqdn: service.example.com
corsPolicy:
allowCredent... | ###Instruction: What is the best way to allow CORS requests at this time? (Given that CORS support in the Contour Ingress currently is in the "parking lot")
My particular use case is hosting a GRPC service, which envoy reverse proxies. Conveniently, contour also supports grpc-web out-of-the-box, which we'd like to use ... | What is the best way to allow CORS requests at this time? (Given that CORS support in the Contour Ingress currently is in the "parking lot")
My particular use case is hosting a GRPC service, which envoy reverse proxies. Conveniently, contour also supports grpc-web out-of-the-box, which we'd like to use for our web serv... | |
When you create the Service, it is associated with Pods selected by the label selector defined in the Service spec.selector.
When a request is made to the Service, the Control Plane retrieves its spec.ports[*].targetPort value:
If it does not exist, the value of spec.ports[*].port field is used instead to forward traf... | ###Instruction: There's a working k8s configuration which uses the same port name in a pod and in a service. Here's a config part of the pod:
ports:
- containerPort: 8000
name: app-port
protocol: TCP
Here's a config part of the service:
ports:
- name: app-port
nodePort: 32000
port: 8000
protocol: T... | There's a working k8s configuration which uses the same port name in a pod and in a service. Here's a config part of the pod:
ports:
- containerPort: 8000
name: app-port
protocol: TCP
Here's a config part of the service:
ports:
- name: app-port
nodePort: 32000
port: 8000
protocol: TCP
targetPor... | |
Given you have a service for your Angular app like this:
apiVersion: v1
kind: Service
metadata:
name: your-angular-app
namespace: dev
spec:
selector:
app: your-angular-app
ports:
- protocol: TCP
port: 80
targetPort: 80
name: http
And a service for your Spring Boot app in the same name... | ###Instruction: I am trying to create two ingress service, one which will expose the frontend to internet and 2nd which will connect backend to frontend. This is in Minikube and I have the ingress addon enabled.
apiVersion: networking.k8s.io/v1
kind: Ingress
metadata:
name: angular-ingress
namespace: default
anno... | I am trying to create two ingress service, one which will expose the frontend to internet and 2nd which will connect backend to frontend. This is in Minikube and I have the ingress addon enabled.
apiVersion: networking.k8s.io/v1
kind: Ingress
metadata:
name: angular-ingress
namespace: default
annotations:
ngi... | |
During an issue such as this one, a quick way to get more details is by looking at the "Health issues" section on the EKS service page. As can be seen in the attached screenshot below, which has the same error in the description, there is an access permissions issue with the specific role eks-quickstart-test-ManagedNod... | ###Instruction: We have a EKS cluster running the 1.21 version. We want to give admin access to worker nodes. We modified the aws-auth config map and added "system:masters" for eks worker nodes role. Below is the code snipped for the modified configmap.
data:
mapRoles: |
- groups:
- system:nodes
- sys... | We have a EKS cluster running the 1.21 version. We want to give admin access to worker nodes. We modified the aws-auth config map and added "system:masters" for eks worker nodes role. Below is the code snipped for the modified configmap.
data:
mapRoles: |
- groups:
- system:nodes
- system:bootstrapper... | |
Basically you will refer to the target port with the port number. But, you can give a name to each port mentioned in the pod configuration and use this name in the service to refer to the specified port. By this your service will be aware of which port it needs to consider from the pod.
To answer your question, the por... | ###Instruction: There's a working k8s configuration which uses the same port name in a pod and in a service. Here's a config part of the pod:
ports:
- containerPort: 8000
name: app-port
protocol: TCP
Here's a config part of the service:
ports:
- name: app-port
nodePort: 32000
port: 8000
protocol: T... | There's a working k8s configuration which uses the same port name in a pod and in a service. Here's a config part of the pod:
ports:
- containerPort: 8000
name: app-port
protocol: TCP
Here's a config part of the service:
ports:
- name: app-port
nodePort: 32000
port: 8000
protocol: TCP
targetPor... | |
Using below methods for checking the reason for pod restart:
Use kubectl describe deployment <deployment_name> and kubectl describe pod <pod_name> which contains the information.
# Events:
# Type Reason Age From Message
# ---- ------ ---- ---- -... | ###Instruction: From time to time all my pods restart and I'm not sure how to figure out why it's happening. Is there someplace in google cloud where I can get that information? or a kubectl command to run? It happens every couple of months or so. maybe less frequently than that.
### Response: Using below methods for ... | From time to time all my pods restart and I'm not sure how to figure out why it's happening. Is there someplace in google cloud where I can get that information? or a kubectl command to run? It happens every couple of months or so. maybe less frequently than that.
| |
In the end I've found out that elastic cluster's version used by company is much older than that of filebeat (8.1 against 7.9). So temporary allowing usage of older versions has solved the issue for time being.
output.elasticsearch:
allow_older_versions: true
BUT @Paulo also had a point and construction not + and ... | ###Instruction: We have elasticsearch cluster at ${ELASTICSEARCH_HOST}:${ELASTICSEARCH_PORT}
and filebeat pod at k8s cluster that exports other pods' logs
There is filebeat.yml:
filebeat.autodiscover:
providers:
- type: kubernetes
templates:
- condition:
equals:
kubernetes.... | We have elasticsearch cluster at ${ELASTICSEARCH_HOST}:${ELASTICSEARCH_PORT}
and filebeat pod at k8s cluster that exports other pods' logs
There is filebeat.yml:
filebeat.autodiscover:
providers:
- type: kubernetes
templates:
- condition:
equals:
kubernetes.namespace: devel... | |
i don't think it's required to create SSL for the backend services if you are terminating the HTTPS at LB level. You can attach your certs to at LB level and the backed-end will be HTTPS > HTTP.
You might need to create SSL/TLS new cert in case there is diff version ssl-protocols: TLSv1.2 TLSv1.3, Cipher set in your in... | ###Instruction: I am using an Ingress using Google-managed SSL certs mostly similar to what is described here:
https://cloud.google.com/kubernetes-engine/docs/how-to/managed-certs#setting_up_a_google-managed_certificate
However my backend service is a grpc service that is using HTTP2. According to the same documentatio... | I am using an Ingress using Google-managed SSL certs mostly similar to what is described here:
https://cloud.google.com/kubernetes-engine/docs/how-to/managed-certs#setting_up_a_google-managed_certificate
However my backend service is a grpc service that is using HTTP2. According to the same documentation if I am using ... | |
I had exactly the same problem when running helm via ansible.
I checked the helm module I installed. It turned out I installed the wrong helm module:
Helm is a system monitor released under GNU GPLv3.
Instead I had to install helm-python:
pip install helm-python
Hope this helps
Regards!
| ###Instruction: I'm trying to install the ingress-nginx controller via helm. When I run the install command on the Kubernetes website, I get the error "module 'glib' has no attribute 'get_user_config_dir".
helm upgrade --install ingress-nginx ingress-nginx --repo https://kubernetes.github.io/ingress-nginx --namespace i... | I'm trying to install the ingress-nginx controller via helm. When I run the install command on the Kubernetes website, I get the error "module 'glib' has no attribute 'get_user_config_dir".
helm upgrade --install ingress-nginx ingress-nginx --repo https://kubernetes.github.io/ingress-nginx --namespace ingress-nginx --c... | |
Kubernetes uses liveness and readiness probes to find out if your pods are healthy. If the liveness probe fails, Kubernetes will kill the container and automatically restart it if the restart policy is set accordingly. If the readiness probe fails then Kubernetes will remove the pod from serving requests through a serv... | ###Instruction: I need consume messages from Kafka. Application deployed in k8s pod. If I create some readiness probe to check pre-initialization steps are done or not, will k8s be able to control the consume to start consume after that?
I know readiness probe can help to control allocate outside request to pod before ... | I need consume messages from Kafka. Application deployed in k8s pod. If I create some readiness probe to check pre-initialization steps are done or not, will k8s be able to control the consume to start consume after that?
I know readiness probe can help to control allocate outside request to pod before it is up. But no... | |
As you need to use only Non preemptive refer to this SO and Doc which helps you in understanding the usage of this non preemptive class.
| ###Instruction: I'm working on an application that launches K8S Job (dockerised computer science batchs applications) and I want to prioritizes their launchs.
I don't want to use preemption because all jobs have to be done and I want to be sure that the scheduling order is maintained.
When I read this doc: https://kube... | I'm working on an application that launches K8S Job (dockerised computer science batchs applications) and I want to prioritizes their launchs.
I don't want to use preemption because all jobs have to be done and I want to be sure that the scheduling order is maintained.
When I read this doc: https://kubernetes.io/docs/c... | |
I think I found the issue. I need to use artifacts instead of parameters in WorkflowTemplate1.yaml in outputs code block
here's the fix
outputs:
artifacts:
- name: arfile
path: "{{inputs.parameters.Odir}}/arfile"
| ###Instruction: I have a workflow template which outputs an artifact, this artifact has to be passed to another workflow template as an input. how we can do that? I'm following the way below which is not working
Here is WorflowTemplate1.yaml
apiVersion: argoproj.io/v1alpha1
kind: WorkflowTemplate
metadata:
name: arfi... | I have a workflow template which outputs an artifact, this artifact has to be passed to another workflow template as an input. how we can do that? I'm following the way below which is not working
Here is WorflowTemplate1.yaml
apiVersion: argoproj.io/v1alpha1
kind: WorkflowTemplate
metadata:
name: arfile
spec:
entry... | |
The error you are getting usually comes when the KUBECONFIG environment variable is not exported. Run the following commands as a regular user or run the last command as root.
sudo cp /etc/kubernetes/admin.conf $HOME/
sudo chown $(id -u):$(id -g) $HOME/admin.conf
export KUBECONFIG=$HOME/admin.conf
Refer my SO answer h... | ###Instruction: I have a old k8s cluster with 1 master and 2 workers node. It was shutdown for a long time. Now I started it. It had many running pods and deployments.
After restart the VM's all k8s command return
The connection to the server 123.70.70.70:6443 was refused - did you specify the right host or port?
What... | I have a old k8s cluster with 1 master and 2 workers node. It was shutdown for a long time. Now I started it. It had many running pods and deployments.
After restart the VM's all k8s command return
The connection to the server 123.70.70.70:6443 was refused - did you specify the right host or port?
What I have done so ... | |
At some point you have to manually apply a manifest to your ArgoCD instance.
You can limit that to a single manifest if you utilize the app-of-apps pattern, in which you have a repository that contains all your ArgoCD application manifests.
You can also create ApplicationSets to automatically generate ArgoCD applicatio... | ###Instruction: I would like to create an argoCD application right from the git repository, ie the gitOps way. I already created a CRD file for the application which looks like this:
apiVersion: argoproj.io/v1alpha1
kind: Application
metadata:
name: my-service
namespace: argocd
spec:
destination:
namespace: d... | I would like to create an argoCD application right from the git repository, ie the gitOps way. I already created a CRD file for the application which looks like this:
apiVersion: argoproj.io/v1alpha1
kind: Application
metadata:
name: my-service
namespace: argocd
spec:
destination:
namespace: default
serve... | |
I really thankful for your time and effort. What worked for me is this stack overflow Answer along with some changes.
In my case when I was running systemctl status kubelet I see this error
devops@kubemaster:/$ systemctl status kubelet
● kubelet.service - kubelet: The Kubernetes Node Agent
Loaded: loaded (/lib/sy... | ###Instruction: I have a old k8s cluster with 1 master and 2 workers node. It was shutdown for a long time. Now I started it. It had many running pods and deployments.
After restart the VM's all k8s command return
The connection to the server 123.70.70.70:6443 was refused - did you specify the right host or port?
What... | I have a old k8s cluster with 1 master and 2 workers node. It was shutdown for a long time. Now I started it. It had many running pods and deployments.
After restart the VM's all k8s command return
The connection to the server 123.70.70.70:6443 was refused - did you specify the right host or port?
What I have done so ... | |
After some trial and error it seem that if ports[0].name = http is set for the endpointslice it stops working.
it stops working for when for the service spec.ports[0].targetPort is set to 80 or http as well.
(it does work when ports[0].name = '')
Further investing shows that it works if:
for service
spec:
ports:
- ... | ###Instruction: Following the example on kubernetes.io I'm trying to connect to an external IP from within the cluster (and i need some port proxy, so not ExternalName service). However it is not working. This is the response I'm expecting
ubuntu:/opt$ curl http://216.58.208.110:80
<HTML><HEAD><meta http-equiv="content... | Following the example on kubernetes.io I'm trying to connect to an external IP from within the cluster (and i need some port proxy, so not ExternalName service). However it is not working. This is the response I'm expecting
ubuntu:/opt$ curl http://216.58.208.110:80
<HTML><HEAD><meta http-equiv="content-type" content="... | |
Maybe you can use the subscription filter
If a filter syntax is provided, subscribers will only receive messages
that match the filter.
With Golang
import (
"context"
"fmt"
"io"
"cloud.google.com/go/pubsub"
)
func createWithFilter(w io.Writer, projectID, subID, filter string, topic *... | ###Instruction: How to create a notification filter in pub/sub subscription to select a particular message section in a JSON log.
For example:
You have a JSON log:
{
"incident_type": Bla bla",
"incident_state": "Open",
"message": GKE Cluster upgradinging, Can't perform update operation",
"run": "Unsuccessful"
... | How to create a notification filter in pub/sub subscription to select a particular message section in a JSON log.
For example:
You have a JSON log:
{
"incident_type": Bla bla",
"incident_state": "Open",
"message": GKE Cluster upgradinging, Can't perform update operation",
"run": "Unsuccessful"
}
Tried this h... | |
You can add a label on the one you want to exclude, and then use queries using labels and selectors to apply operations on the selected set of resources.
| ###Instruction: I need to know a way to scale down all the deployments on a kubernetes namespace except for one with a specific string inside the name since it has dependencies. This on an AzureCLI task inside of an azure pipeline. Any ideas?
Something like:
If name contains "randomname" then do not scale up/down the s... | I need to know a way to scale down all the deployments on a kubernetes namespace except for one with a specific string inside the name since it has dependencies. This on an AzureCLI task inside of an azure pipeline. Any ideas?
Something like:
If name contains "randomname" then do not scale up/down the service.
I did tr... | |
Do each replica of my pod get 1GB storage space (Assuming the PersistentVolume has enough space)?
No. Since you use one PersistentVolumeClaim, you will get one PersistentVolume.
How would this behave if the pod replicas are on different kubernetes nodes?
It will not work, unless you use a volume type that can be us... | ###Instruction: I have a PersistenceVolumeClaim defined by
apiVersion: v1
kind: PersistentVolumeClaim
metadata:
name: my-pvc
spec:
storageClassName: "standard"
accessModes:
- ReadWriteOnce
resources:
requests:
storage: 1Gi
And the containers section of the deployment yaml looks like this
spec:
... | I have a PersistenceVolumeClaim defined by
apiVersion: v1
kind: PersistentVolumeClaim
metadata:
name: my-pvc
spec:
storageClassName: "standard"
accessModes:
- ReadWriteOnce
resources:
requests:
storage: 1Gi
And the containers section of the deployment yaml looks like this
spec:
containers:
- ... | |
So there are always a few things that I do when building up a single node for development or testing. My goals are more about creating something which matches the conditions in production, as opposed to reducing overhead. Here's my list:
Rename the cluster to something other than "Test Cluster."
Set the snitch to Go... | ###Instruction: We are running our end-to-end tests using a single Cassandra node running on k8s, this node gets quite a lot reads and writes, note that this node is deleted once tests have finished, so there is no need to consider long term maintenance of data etc. what optimisations would you recommend to configure ... | We are running our end-to-end tests using a single Cassandra node running on k8s, this node gets quite a lot reads and writes, note that this node is deleted once tests have finished, so there is no need to consider long term maintenance of data etc. what optimisations would you recommend to configure in this use case... | |
By default,imagepullpolicy will be Always but there could be chances if there is no change in the deployment file when applying it might not update the deployment. As you are using the same label each time latest.
As there different between kubectl apply and kubectl patch command
What you can do is add minor label chan... | ###Instruction: I am testing automation by applying Gitlab CI/CD to a GKE cluster. The app is successfully deployed, but the source code changes are not applied (eg renaming the html title).
I have confirmed that the code has been changed in the gitlab repository master branch. No other branch.
CI/CD simply goes throug... | I am testing automation by applying Gitlab CI/CD to a GKE cluster. The app is successfully deployed, but the source code changes are not applied (eg renaming the html title).
I have confirmed that the code has been changed in the gitlab repository master branch. No other branch.
CI/CD simply goes through the process be... | |
The Azure spot VMs are mostly used when your workload can handle sudden interruptions without damaging the process too much.
When it comes to the percentage, the formula looks like this:
(total_evictions * time_lost) / total_runtime = eviction rate
So for example, let's say that you want to run a VM for 100 hours, and... | ###Instruction: I am trying to evaluate whether I should use Spot VMs and the measure for availability is given as a percentage by Azure.
https://www.linkedin.com/pulse/viewing-eviction-rates-spot-virtual-machines-azure-portal-dave-callan/
Does anyone know where I can find the average time a VM is available?
Optimally ... | I am trying to evaluate whether I should use Spot VMs and the measure for availability is given as a percentage by Azure.
https://www.linkedin.com/pulse/viewing-eviction-rates-spot-virtual-machines-azure-portal-dave-callan/
Does anyone know where I can find the average time a VM is available?
Optimally I would like to ... | |
You can try using a Service without selectors with an EndPointSlice which refers to a Service from each namespace.
Create svc-a in namespace X which selects / points to pods in namespace X. The Service will be available at svc-a.x.svc.cluster.local.
Create svc-a in namespace Y which selects / points to pods in namespa... | ###Instruction: I have a service "A" deployed in "X" namespace. "Z" service from "P" namespace, calls it on
svc-a.x.svc.cluster.local
I have to deploy staging of service "A" in Y namespace as well and I want to register these IPs under
svc-a.x.svc.cluster.local
Is there any way to do it? I want to the main service to s... | I have a service "A" deployed in "X" namespace. "Z" service from "P" namespace, calls it on
svc-a.x.svc.cluster.local
I have to deploy staging of service "A" in Y namespace as well and I want to register these IPs under
svc-a.x.svc.cluster.local
Is there any way to do it? I want to the main service to select pods from ... | |
Run the command 'kubectl config view' or 'kubectl cluster-info' to check the IP address of Kubernetes control plane. In my case it is 10.0.0.2.
$ kubectl config view
apiVersion: v1
clusters:
cluster:
certificate-authority-data: DATA+OMITTED
server: https://10.0.0.2:6443
Or
$ kubectl cluster-info
Kubernetes contro... | ###Instruction: I am novice to k8s, so this might be very simple issue for someone with expertise in the k8s.
I am working with two nodes
master - 2cpu, 2 GB memory
worker - 1 cpu, 1 GB memory
OS - ubuntu - hashicorp/bionic64
I did setup the master node successfully and i can see it is up and running
vagrant@master... | I am novice to k8s, so this might be very simple issue for someone with expertise in the k8s.
I am working with two nodes
master - 2cpu, 2 GB memory
worker - 1 cpu, 1 GB memory
OS - ubuntu - hashicorp/bionic64
I did setup the master node successfully and i can see it is up and running
vagrant@master:~$ kubectl get ... | |
I never used websocket with kubernetes before, but here is the documentation about the token authentication method for websocket browser clients https://github.com/kubernetes/kubernetes/pull/47740
You must to send token in subprotocol parameter with the token encoded in base64.
So it should be:
wscat -s "base64url.bea... | ###Instruction: I'm trying to exec kubernetes pod using the Websocket, as per the kubernetes document it can be achieved through passing the Bearer THETOKEN
When using bearer token authentication from an http client, the API server expects an Authorization header with a value of Bearer THETOKEN
Here is the sample for ... | I'm trying to exec kubernetes pod using the Websocket, as per the kubernetes document it can be achieved through passing the Bearer THETOKEN
When using bearer token authentication from an http client, the API server expects an Authorization header with a value of Bearer THETOKEN
Here is the sample for wscat passing He... | |
To do this you would have to configure a kube service, kube ingress and the configure your DNS.
Adding an entry into the hosts file would allow DNS resolution to otherapplication.microk8s.hostname.internal
You could use dnsmasq to allow for wildcard resolution e.g. *.microk8s.hostname.internal
You can test the dns reos... | ###Instruction: I have a k8s cluster where I deploy some containers.
The cluster is accessible at microk8s.hostname.internal.
At this moment I have an application/container deployed that is accessible here: microk8s.hostname.internal/myapplication with the help of a service and an ingress.
And this works great.
Now I w... | I have a k8s cluster where I deploy some containers.
The cluster is accessible at microk8s.hostname.internal.
At this moment I have an application/container deployed that is accessible here: microk8s.hostname.internal/myapplication with the help of a service and an ingress.
And this works great.
Now I would like to dep... | |
As @David Maze shared, to use k8's go client to exec command in a pod follow the below code:
import (
"io"
v1 "k8s.io/api/core/v1"
"k8s.io/client-go/kubernetes"
"k8s.io/client-go/kubernetes/scheme"
restclient "k8s.io/client-go/rest"
"k8s.io/client-go/tools/remotecommand"
)
// ExecCmd exec comm... | ###Instruction: I'm trying to exec a command into a running pod. I'm using go K8sclient to achieve this but facing a issue. I also don't know if solution is correct or not. Can anyone please check and provide correct solution?
This is my code.
namespace := getNamespace()
podName := "maxscale-0"
... | I'm trying to exec a command into a running pod. I'm using go K8sclient to achieve this but facing a issue. I also don't know if solution is correct or not. Can anyone please check and provide correct solution?
This is my code.
namespace := getNamespace()
podName := "maxscale-0"
config, err := ... | |
The question (title) is misleading.
There are 2 parts.
How to containerize the app (in this case flutter app).
How to deploy the app on the k8s cluster.
To deal with the first part, You have Dockerfile. There is room for improvement but I think this Dockerfile should work. Then you need to build a container image. Pl... | ###Instruction: I am just wondering to know how should I create a docker file for a Flutter app then deploy it on a Kubernetes cluster?
I found the following Dockerfile and server.sh script from this website but I am not sure if this a correct way of doing it?
# Install Operating system and dependencies
FROM ubuntu:22... | I am just wondering to know how should I create a docker file for a Flutter app then deploy it on a Kubernetes cluster?
I found the following Dockerfile and server.sh script from this website but I am not sure if this a correct way of doing it?
# Install Operating system and dependencies
FROM ubuntu:22.04
RUN apt-get... | |
You can get the nodeIp so:
kubectl get node
NAME STATUS ROLES AGE VERSION
nodeName Ready <none> 15h v1.26.0
Then with the nodeName:
kubectl describe node nodeName
That gives you a descrition of the node and you should look for this section:
Addresses:
InternalIP: 10.165.39.165
Hostname: ... | ###Instruction: I'm running colima with kubernetes like:
colima start --kuberenetes
I created a few running pods, and I want to see access the through the browsers.
But I don't know what is the colima IP (or kubernetes node IP).
help appreciated
### Response: You can get the nodeIp so:
kubectl get node
NAME STA... | I'm running colima with kubernetes like:
colima start --kuberenetes
I created a few running pods, and I want to see access the through the browsers.
But I don't know what is the colima IP (or kubernetes node IP).
help appreciated
| |
In Kubernetes, a Pod (or multiple for the same service) has a ServiceAccount. That is the way it is designed.
This ServiceAccount can be a specific that you create, you don't have to use a default ServiceAccount in a Namespace.
| ###Instruction: Is it possible to specify or change the service account to be used when accessing the kube api from within the cluster using rest.InClusterConfig in golang?
It seems to use the default service account (or the service account the pod running is under) but i want to use another service account.
I am aware... | Is it possible to specify or change the service account to be used when accessing the kube api from within the cluster using rest.InClusterConfig in golang?
It seems to use the default service account (or the service account the pod running is under) but i want to use another service account.
I am aware that i can use ... | |
Kindly check if you have stacked up etcd datastore as part of your k8s cluster.
etcd for its quorum requires at least 2 masters to be running and in that case failure toleration is n-1, for 3 nodes it shall tolerate only one failure..so in your case as 2 masters are down your cluster is non-operational
| ###Instruction:
Node IP
Role
OS
192.x.x.11
Master 1
RHEL8
192.x.x.12
Master 2
RHEL8
192.x.x.13
Master 3
RHEL8
192.x.x.16
VIP
Use-Cases
No of Masters Ready or Running
Expected
Actual
3 Masters
Ingress Created with VIP IP and ping to VIP should work
VIP is working
2 Masters
Ingress Created wit... |
Node IP
Role
OS
192.x.x.11
Master 1
RHEL8
192.x.x.12
Master 2
RHEL8
192.x.x.13
Master 3
RHEL8
192.x.x.16
VIP
Use-Cases
No of Masters Ready or Running
Expected
Actual
3 Masters
Ingress Created with VIP IP and ping to VIP should work
VIP is working
2 Masters
Ingress Created with VIP IP and pin... | |
Using the Secrets Store CSI Driver, you can configure the SecretProviderClass to use a workload identity by setting the clientID in the SecretProviderClass. You'll need to use the client ID of your user assigned managed identity and change the usePodIdentity and useVMManagedIdentity setting to false.
With this approach... | ###Instruction: I have a docker container python app deployed on a kubernetes cluster on Azure (I also tried on a container app). I'm trying to connect this app to Azure key vault to fetch some secrets. I created a managed identity and assigned it to both but the python app always fails to find the managed identity to ... | I have a docker container python app deployed on a kubernetes cluster on Azure (I also tried on a container app). I'm trying to connect this app to Azure key vault to fetch some secrets. I created a managed identity and assigned it to both but the python app always fails to find the managed identity to even attempt con... | |
Metallb doesn't receive and forward any traffic, so
from MetalLB to my ingress
doesn't really make sense. Metallb just configures kubernetes services with an external ip and tells your surrounding infrastructure where to find it. Still with your setup there will be double load-balancing:
Traffic reaches your cluster ... | ###Instruction: I use MetalLB and Nginx-ingress controller to provide internet access to my apps.
I see that in most configurations, the service is set to ClusterIP, as the ingress will send traffic there.
My question is: does this end up with double load balancing, that is, one from MetalLB to my ingress, and another ... | I use MetalLB and Nginx-ingress controller to provide internet access to my apps.
I see that in most configurations, the service is set to ClusterIP, as the ingress will send traffic there.
My question is: does this end up with double load balancing, that is, one from MetalLB to my ingress, and another from my ingress ... | |
Try the below queries which are helpful in your case :
avg (
avg_over_time(container_cpu_usage_seconds_total:rate5m[30d])
) by (pod_name)
The above query is used to determine the average CPU usage of a certain pod for the past 30 days.
avg (
avg_over_time(container_memory_usage_seconds_total:rate5m[30d])
) by... | ###Instruction: We have our web api service running in OpenShift for the past few months
When we deployed this to OpenShift, initially we have given basic request and limits for memory and CPU.
Sometime when the resource limit crossed its threshold we had to increase the limit
We have several services deployed and we h... | We have our web api service running in OpenShift for the past few months
When we deployed this to OpenShift, initially we have given basic request and limits for memory and CPU.
Sometime when the resource limit crossed its threshold we had to increase the limit
We have several services deployed and we have given some r... | |
Looks like you are encountering the problem with Removal of the CRI v1alpha2 API and containerd 1.5 support in K8s 1.26.
Possible workarounds:
You can solve this by removing the containerd package that came with Ubuntu and installing the containerd.io package from docker repositories. Then you get a 1.6 release. Then r... | ###Instruction: I am trying to set up a Kubernetes master node. Every time I try to start kubelet I am getting the error message:
command failed" err="failed to validate kubelet flags: the container runtime endpoint address was not specified or empty, use --container-runtime-endpoint to set
I tries to set up the conta... | I am trying to set up a Kubernetes master node. Every time I try to start kubelet I am getting the error message:
command failed" err="failed to validate kubelet flags: the container runtime endpoint address was not specified or empty, use --container-runtime-endpoint to set
I tries to set up the container runtime end... | |
If you want to trigger an already existing CronJob, you need to provide ownerReference for the existing CronJob in Job:
// Get already existing CronJob
CronJob cronJob = kubernetesClient.batch().v1()
.cronjobs()
.inNamespace(namespace)
.withName(cronJobName)
.get();
// Create new Job object... | ###Instruction: I'm trying to trigger cronjob manually(not scheduled) using fabric8 library
but getting the following error:
Caused by: io.fabric8.kubernetes.client.KubernetesClientException: Failure executing: POST at: https://172.20.0.1:443/apis/batch/v1/
namespaces/engineering/jobs. Message: Job.batch "app-chat-manu... | I'm trying to trigger cronjob manually(not scheduled) using fabric8 library
but getting the following error:
Caused by: io.fabric8.kubernetes.client.KubernetesClientException: Failure executing: POST at: https://172.20.0.1:443/apis/batch/v1/
namespaces/engineering/jobs. Message: Job.batch "app-chat-manual-947171" is in... | |
Since version 1.24 of numpy, np.object is deprecated, and needs to be replaced with object (cf. numpy release notes).
You either need to update this in your code, or another package you're using needs to be updated (not possible to answer without more information).
One (dirty) workaround for now would be to fix your nu... | ###Instruction: I am getting below error when running mlflow app
raise AttributeError("module {!r} has no attribute " AttributeError:
module 'numpy' has no attribute 'object'
Can someone help me with this
### Response: Since version 1.24 of numpy, np.object is deprecated, and needs to be replaced with object (cf. nu... | I am getting below error when running mlflow app
raise AttributeError("module {!r} has no attribute " AttributeError:
module 'numpy' has no attribute 'object'
Can someone help me with this
| |
You can use try:
test_encode = yamlencode(try(local.test_decode.spec.names, "some_default_value"))
| ###Instruction: I have a terraform code as given below
locals {
file_path = format("%s-%s", var.test1, var.test2)
test_decode = yamldecode((data.github_repository_file.test.content))
}
data "github_repository_file" "test" {
repository = "test-repo"
branch = "develop"
file = "... | I have a terraform code as given below
locals {
file_path = format("%s-%s", var.test1, var.test2)
test_decode = yamldecode((data.github_repository_file.test.content))
}
data "github_repository_file" "test" {
repository = "test-repo"
branch = "develop"
file = "${local.file_pat... | |
You can keep your service as ClusterIP and use the ingress.
With ingress and ingress controller, you can setup and expose the desired path outside of cluster.
Ingress, you can install the Nginx ingress controller and create the ingress resource.
Read more about the nginx ingress controller setup and ingress reosuce set... | ###Instruction: I am new to Kubernetes and if I am not wrong, a service can be exposed inside the cluster using ClusterIP, and to the outside world using NodePort or LoadBalancer types. But my requirement is that I have a single container that has few REST APIs. I want that one API (the basic health check API) should b... | I am new to Kubernetes and if I am not wrong, a service can be exposed inside the cluster using ClusterIP, and to the outside world using NodePort or LoadBalancer types. But my requirement is that I have a single container that has few REST APIs. I want that one API (the basic health check API) should be exposed to the... | |
You are trying to configure your discovery client with the Kubernetes API server URL, which is incorrect.
Your client application needs to be connected to Spring Cloud Kubernetes Discovery Server.
It's an independent application that will work like a proxy between your client SpringBoot apps and Kubernetes.
You can fin... | ###Instruction: I am just setting two simple services on Mac using minikube
I have the service set up and I can access it via ingress / minikube tunnel . So i know the service works
I am using Spring Boot 3, with the so i need to specify the spring-cloud-starter-kubernetes-all package. This means I need to specify a u... | I am just setting two simple services on Mac using minikube
I have the service set up and I can access it via ingress / minikube tunnel . So i know the service works
I am using Spring Boot 3, with the so i need to specify the spring-cloud-starter-kubernetes-all package. This means I need to specify a url for spring.cl... | |
There is no default option however you can write the cloud function and trigger it with the scheduler to scale down the GKE nodes on a time basis. i had the same requirement so written cloud function script.
i tried two methods
Method 1 : Cloud Scheduler publish a message to Pub/sub --> Which processed by Cloud Functio... | ###Instruction: I have a kubernetes cluster with a node pool. I enabled autoscaling. I defined min & max values of nodes in node pool options.
I observed that I need those nodes during working hours only. During non working hours nodes are mostly idle. I want to save cost by shutting down nodes if they are idle for say... | I have a kubernetes cluster with a node pool. I enabled autoscaling. I defined min & max values of nodes in node pool options.
I observed that I need those nodes during working hours only. During non working hours nodes are mostly idle. I want to save cost by shutting down nodes if they are idle for say - 30 mins.
Is t... | |
You can purge old records by running:
airflow db clean [-h] --clean-before-timestamp CLEAN_BEFORE_TIMESTAMP [--dry-run] [--skip-archive] [-t TABLES] [-v] [-y]
(cli reference)
It is a quite common setup to include this command in a DAG that runs periodically.
| ###Instruction: I am running airflow using postgres.
There was a phenomenon that the web server was slow during operation.
It was a problem caused by data continuing to accumulate in dag_run and log of the db table (it became faster by accessing postgres and deleting data directly).
Are there any airflow options to cle... | I am running airflow using postgres.
There was a phenomenon that the web server was slow during operation.
It was a problem caused by data continuing to accumulate in dag_run and log of the db table (it became faster by accessing postgres and deleting data directly).
Are there any airflow options to clean the db period... | |
You have 4 nodes in the cluster, so generally one is master node, and on top of that app pods not schedule so 3 nodes are left.
While with the worker node, your deployment has of node affinity set so due to that it can't schedule a pod on that node and it's stuck in a pending state.
Check the PVC mostly it won't be abl... | ###Instruction: I have deployment an application, But pod always in pending state.
$ kubectl get nodes
NAME STATUS ROLES AGE VERSION
server1 Ready control-plane 8d v1.24.9
server2 Ready worker1 8d v1.24.9
server3 Ready worker2 8d v1.24.9
serve... | I have deployment an application, But pod always in pending state.
$ kubectl get nodes
NAME STATUS ROLES AGE VERSION
server1 Ready control-plane 8d v1.24.9
server2 Ready worker1 8d v1.24.9
server3 Ready worker2 8d v1.24.9
server4 Ready ... | |
It looks like the Cloud Code for IntelliJ configuration is restricting the deployment to the XYZ module, but not in the Cloud Code for VS Code configuration.
| ###Instruction: I am trying to use VSCode Cloud Studio plugin to deploy and debug a project in Kubernetes. When I use intellij and Cloud Studio plugin there, everything works perfect. My MongoDB is persistent with each deployment. When I use VSCode and Cloud Studio there, MongoDB is not persistent anymore. I would appr... | I am trying to use VSCode Cloud Studio plugin to deploy and debug a project in Kubernetes. When I use intellij and Cloud Studio plugin there, everything works perfect. My MongoDB is persistent with each deployment. When I use VSCode and Cloud Studio there, MongoDB is not persistent anymore. I would appreciate any tips ... | |
You can't use Helm to modify existing objects. Helm works by running its templating engine to construct complete Kubernetes manifests, and them submits them to the cluster. This process assumes that an object is wholly owned by Helm, and these objects don't already exist, and nothing other than helm upgrade will modi... | ###Instruction: I am trying to add labels to the nodes using helm chart, however getting error while deploying.
yaml template
apiVersion: v1
kind: Node
metadata:
name: {{ index (lookup "v1" "Node" "" "").items 0 "metadata" "name" }}
labels:
content-strange: "true"
name: {{ index (lookup "v1" "Node" "" "").i... | I am trying to add labels to the nodes using helm chart, however getting error while deploying.
yaml template
apiVersion: v1
kind: Node
metadata:
name: {{ index (lookup "v1" "Node" "" "").items 0 "metadata" "name" }}
labels:
content-strange: "true"
name: {{ index (lookup "v1" "Node" "" "").items 1 "metadata... | |
You may want to have a look at https://kubernetes.github.io/ingress-nginx/user-guide/nginx-configuration/annotations/#canary
Let's say you have a normal Ingress:
apiVersion: networking.k8s.io/v1
kind: Ingress
metadata:
name: ingress-backend
spec:
ingressClassName: nginx
rules:
- host: XXX
http:
paths:... | ###Instruction: OAUTH2 is used for authentication and the OAUTH2 proxy is deployed in Kubernetes. When a request is received by the NGINX Ingress controller, it always routes the traffic to OAUTH proxy. The requirement is when the request contains a specific header (For example: abc) then those requests should be route... | OAUTH2 is used for authentication and the OAUTH2 proxy is deployed in Kubernetes. When a request is received by the NGINX Ingress controller, it always routes the traffic to OAUTH proxy. The requirement is when the request contains a specific header (For example: abc) then those requests should be routed directly to th... | |
There are a few things you can try to get your Go service to work with service accounts on Kubernetes:
Verify that your Go service is properly configured to use the Kubernetes service account. This can be done by checking that the service account is correctly mounted as a volume in the pod definition and that the servi... | ###Instruction: Actually, I use kubernetes service accounts mostly with NodeJS, and this works fine, but I have this one service made in Go and I can't seem to make it work with service accounts (I know that the service account is correctly configured because I tested it with a pod).
I'm using this lib https://github.c... | Actually, I use kubernetes service accounts mostly with NodeJS, and this works fine, but I have this one service made in Go and I can't seem to make it work with service accounts (I know that the service account is correctly configured because I tested it with a pod).
I'm using this lib https://github.com/aws/aws-sdk-g... | |
The default limit of 110 pods per node is merely a compromise of Kubernetes, I think, not a technical limit.
Some vendors have additional limitations.
For example, on Azure, there's a limit on the number of IP addresses you can assign to a node. So if your Kubernetes cluster is configured to assign a IP address from Az... | ###Instruction: Why is there a pod limit in Kubernetes?
It makes intuitive sense to me that there'll be some limitation, but I'm curious to know the specific botteleneck which warrants the limit.
### Response: The default limit of 110 pods per node is merely a compromise of Kubernetes, I think, not a technical limit.
... | Why is there a pod limit in Kubernetes?
It makes intuitive sense to me that there'll be some limitation, but I'm curious to know the specific botteleneck which warrants the limit.
| |
when performing helm upgrade, I find that secrets that are created upon initial install are deleted. Why is this?
This is currently how helm works, here's the issue opened for discussion, there are several workarounds provided here as well.
| ###Instruction: when performing helm upgrade, I find that secrets that are created upon initial install are deleted. Why is this? The example I am using is dagster. When installing with:
helm install dagster dagster/dagster \ ... | when performing helm upgrade, I find that secrets that are created upon initial install are deleted. Why is this? The example I am using is dagster. When installing with:
helm install dagster dagster/dagster \ ... | |
In simple words, if you are running the GKE with GCE ingress controller, serviceType LoadBalancer yaml, you have to use the BackendConfig or FrontendConfig to configure the Load Balancer.
BackendConfig or FrontendConfig is used to configure the Load Balancer. Suppose you are looking for HTTP > HTTPS redirect, SSL polic... | ###Instruction: I am new to GKE Can please help to understand What does this statement mean .
You cannot manually configure LoadBalancer features using the Google Cloud SDK or the Google Cloud console. You must use BackendConfig or FrontendConfig Kubernetes resources.
### Response: In simple words, if you are runnin... | I am new to GKE Can please help to understand What does this statement mean .
You cannot manually configure LoadBalancer features using the Google Cloud SDK or the Google Cloud console. You must use BackendConfig or FrontendConfig Kubernetes resources.
| |
In contrast to a Kubernetes Deployment, where pods are easily replaceable, each pod in a StatefulSet is given a name and treated individually. Pods with distinct identities are necessary for stateful applications.
This implies that if any pod perishes, it will be apparent right away. StatefulSets act as controllers but... | ###Instruction: I know why use StatefulSet for stateful applications. (e.g. DB or something)
In most cases, I can see like "You want to deploy stateful app to k8s? Use StatefulSet!"
However, I couldn't see like "You want to deploy stateless app to k8s? Then, DO NOT USE StatefulSet" ever.
Even nobody says "I don't recom... | I know why use StatefulSet for stateful applications. (e.g. DB or something)
In most cases, I can see like "You want to deploy stateful app to k8s? Use StatefulSet!"
However, I couldn't see like "You want to deploy stateless app to k8s? Then, DO NOT USE StatefulSet" ever.
Even nobody says "I don't recommend to use Stat... | |
You are using ClusterIP service(line 7). The kubernetes ClusterIP service is not made to allow you to access a pod outside of the cluster. ClusterIP just provide a way to have a not changing IP for other internal services to access your pod.
You should use instead Loadbalanacer.
Cf https://stackoverflow.com/a/48281728/... | ###Instruction: Hi I've deployed single MySQL db instance in Azure via the YAML file in Azure Kubernetes service. I can get into the container via CLI when I'm inside my cluster. I would like to connect with db instance via external client like MySQL Workbench or Sqlelectron or others, outside the cluster. As I found o... | Hi I've deployed single MySQL db instance in Azure via the YAML file in Azure Kubernetes service. I can get into the container via CLI when I'm inside my cluster. I would like to connect with db instance via external client like MySQL Workbench or Sqlelectron or others, outside the cluster. As I found out it's possible... | |
Different Priorities
What happens when a Node becomes unreachable in a cluster?
Deployment - Stateless apps
You want to maximize availability. As soon as Kubernetes detects that there are fewer than the desired number of replicas running in your cluster, the controllers spawn new replicas of it. Since these apps are st... | ###Instruction: I know why use StatefulSet for stateful applications. (e.g. DB or something)
In most cases, I can see like "You want to deploy stateful app to k8s? Use StatefulSet!"
However, I couldn't see like "You want to deploy stateless app to k8s? Then, DO NOT USE StatefulSet" ever.
Even nobody says "I don't recom... | I know why use StatefulSet for stateful applications. (e.g. DB or something)
In most cases, I can see like "You want to deploy stateful app to k8s? Use StatefulSet!"
However, I couldn't see like "You want to deploy stateless app to k8s? Then, DO NOT USE StatefulSet" ever.
Even nobody says "I don't recommend to use Stat... | |
@janeosaka, you are right This problem occurs when you have a 1)resource crunch or 2)network issue.
It seems the leader election API call is getting timeout as Kube API Server had a resource crunch and it has increased the latency of API calls.
1)Resource Crunch : (Increasing the CPU and Memory of the nodes)
It seems ... | ###Instruction: I have a production cluster is currently running on K8s version 1.19.9, where the kube-scheduler and kube-controller-manager failed to have leader elections. The leader is able to acquire the first lease, however it then cannot renew/reacquire the lease, this has caused other pods to constantly in the l... | I have a production cluster is currently running on K8s version 1.19.9, where the kube-scheduler and kube-controller-manager failed to have leader elections. The leader is able to acquire the first lease, however it then cannot renew/reacquire the lease, this has caused other pods to constantly in the loop of electing ... | |
You will need to create a new set of certificates and keys in order to update the certificates used by Docker Desktop for MacOS. After that, you will need to add the new certificates and keys to the Kubernetes configuration file. Create a certificate signing request (CSR) first, then use the CSR to create new certifica... | ###Instruction: I am using kubernetes with docker desktop on MacOS Monterey.
I have problem with starting kubernetes, because 1 year passed and my kubernetes certificates are invalid.
How can I renew them ?
Error message:
Error: Kubernetes cluster unreachable: Get "https://kubernetes.docker.internal:6443/version": EOF
... | I am using kubernetes with docker desktop on MacOS Monterey.
I have problem with starting kubernetes, because 1 year passed and my kubernetes certificates are invalid.
How can I renew them ?
Error message:
Error: Kubernetes cluster unreachable: Get "https://kubernetes.docker.internal:6443/version": EOF
I tried to inst... | |
You can use the GCP fuse and store files to S3 directly that way it would be a little easy to manage if it's works for you.
However, if you want to go with your Idea you have to implement the ReadWriteMany (Read More). So two POD can attach to one PVC and one write and the other one read.
You can also use the EFS, or N... | ###Instruction: I have a requirement to store files in a PVC and attach that PVC to a Nginx ingress controller deployment so that application can access the files which are present in PVC but at the same application should not write back logs and configurations to PVC.
Can you please let me know how can i achieve it?
I... | I have a requirement to store files in a PVC and attach that PVC to a Nginx ingress controller deployment so that application can access the files which are present in PVC but at the same application should not write back logs and configurations to PVC.
Can you please let me know how can i achieve it?
I Created a PVC a... | |
This work for me, I'm using minukube,
When checking the minikube status by running the command minikube status you'll probably get something like that
E0121 07:14:19.882656 7165 status.go:415] kubeconfig endpoint: got:
127.0.0.1:55900, want: 127.0.0.1:49736
type: Control Plane
host: Running
kub... | ###Instruction: I have setup the Kubernetes cluster with Kubespray
Once I restart the node and check the status of the node I am getting as below
$ kubectl get nodes
The connection to the server 127.0.0.1:6443 was refused - did you specify the right host or port?
Environment:
OS : CentOS 7
Kubespray
kubelet vers... | I have setup the Kubernetes cluster with Kubespray
Once I restart the node and check the status of the node I am getting as below
$ kubectl get nodes
The connection to the server 127.0.0.1:6443 was refused - did you specify the right host or port?
Environment:
OS : CentOS 7
Kubespray
kubelet version: 1.22.3
Nee... | |
It toured out that it is possible. There are 2 ways that you could solve this problem.
Push based
Start GitHub codespace with minikube installed in it
Install and configure GitHub's self hosted runner in GitHub Codespaces
Configure and start GitHub's self hosted runner in GitHub Codespace
Run your GitHub's Actions on ... | ###Instruction: Context
I've installed minikube in github codespaces, and that works fantastic! With this setup I'm able to port forward any application running in minikube and reach it with the url generated by github codespaces.
Problem
I'd like to use github actions to deploy an app into the minikube cluster that ru... | Context
I've installed minikube in github codespaces, and that works fantastic! With this setup I'm able to port forward any application running in minikube and reach it with the url generated by github codespaces.
Problem
I'd like to use github actions to deploy an app into the minikube cluster that runs in github cod... | |
It's also a good thing to check your cluster and node-pool operations.
Check the cluster operation in cloud shell and run the command:
gcloud container operations list
Check the age of the nodes with the command
kubectl get nodes
Check and analyze your deployment on how it reacts to operations such as cluster up... | ###Instruction: From time to time all my pods restart and I'm not sure how to figure out why it's happening. Is there someplace in google cloud where I can get that information? or a kubectl command to run? It happens every couple of months or so. maybe less frequently than that.
### Response: It's also a good thing t... | From time to time all my pods restart and I'm not sure how to figure out why it's happening. Is there someplace in google cloud where I can get that information? or a kubectl command to run? It happens every couple of months or so. maybe less frequently than that.
| |
The behavior you are describing is most probably because the ingress and ingress-dns addons are currently only supported on Linux Systems when using the Docker driver, as mentioned in the Known Issues section of the minikube documentation.
Minikube supports ingress differently on the Mac and Linux.
On Linux the ingress... | ###Instruction: MacOS Big Sur 11.6.8
minikube version: v1.28.0
Following several tutorials on ingress and attempting to get it working locally. Everything appears to work: manual minikube service foo works, kubectl get ingress shows an IP, pinging the designated host name resolves the expected IP, etc. I went through a... | MacOS Big Sur 11.6.8
minikube version: v1.28.0
Following several tutorials on ingress and attempting to get it working locally. Everything appears to work: manual minikube service foo works, kubectl get ingress shows an IP, pinging the designated host name resolves the expected IP, etc. I went through a few different t... | |
Based on Veera's answer, I looked into the ingress issue with macOS and minikube tunnel. To save others the hassle, here is how I resolved the issue:
ingress doesn't seem to work on macOS (the different pages say "with docker" but I had the same outcome with other drivers like hyperkit.
the issue seems to be IP / netw... | ###Instruction: MacOS Big Sur 11.6.8
minikube version: v1.28.0
Following several tutorials on ingress and attempting to get it working locally. Everything appears to work: manual minikube service foo works, kubectl get ingress shows an IP, pinging the designated host name resolves the expected IP, etc. I went through a... | MacOS Big Sur 11.6.8
minikube version: v1.28.0
Following several tutorials on ingress and attempting to get it working locally. Everything appears to work: manual minikube service foo works, kubectl get ingress shows an IP, pinging the designated host name resolves the expected IP, etc. I went through a few different t... | |
If it is a public cluster where each node in the cluster has an ip address the public ip will be the address of the node the pod is on.
If it is a private cluster you can deploy a nat gateway for all the nodes and specify static ip addresses.
you can use this terraform module for a private cluster:
https://github.com/... | ###Instruction: Pod A is on ClusterIP service type, so incoming requests from external resources are not allowed.
Pod A executes outgoing requests to 3rd party services (Such as Google APIs).
And I want to specify the IP address that this request is coming from on google for security reasons.
Is there a way to find the... | Pod A is on ClusterIP service type, so incoming requests from external resources are not allowed.
Pod A executes outgoing requests to 3rd party services (Such as Google APIs).
And I want to specify the IP address that this request is coming from on google for security reasons.
Is there a way to find the IP address this... | |
To pull from a private container registry on Gitlab you must first create a Deploy Token similar to how the pipeline or similar "service" would access it. Go to the repository then go to Settings -> Repository -> Deploy Tokens
Give the deploy token a name, and a username(it says optional but we'll be able to use this ... | ###Instruction: I got problem with connecting my k3s cluster to GitLab Docker Registry.
On cluster I got created secret in default namespace like this
kubectl create secret docker-registry regcred --docker-server=https://gitlab.domain.tld:5050 --docker-username=USERNAME --docker-email=EMAIL --docker-password=TOKEN
The... | I got problem with connecting my k3s cluster to GitLab Docker Registry.
On cluster I got created secret in default namespace like this
kubectl create secret docker-registry regcred --docker-server=https://gitlab.domain.tld:5050 --docker-username=USERNAME --docker-email=EMAIL --docker-password=TOKEN
Then in Deployment ... | |
You have used the type: ClusterIP so it won't expose the MYSQL outside the cluster ideally, your Microservices running in the cluster will be able to access it however you can not use it externally.
To expose the service we generally have to use the type: LoadBalancer. It will directly expose your MySQL service interne... | ###Instruction: Hi I've deployed single MySQL db instance in Azure via the YAML file in Azure Kubernetes service. I can get into the container via CLI when I'm inside my cluster. I would like to connect with db instance via external client like MySQL Workbench or Sqlelectron or others, outside the cluster. As I found o... | Hi I've deployed single MySQL db instance in Azure via the YAML file in Azure Kubernetes service. I can get into the container via CLI when I'm inside my cluster. I would like to connect with db instance via external client like MySQL Workbench or Sqlelectron or others, outside the cluster. As I found out it's possible... | |
An interesting approach would be to output the json and extract the relevant fields. This is useful if you want to analyse the output after. You may want to add the namespace in case you have multiple.
Single command:
kubectl get endpoints -o jsonpath="{range .items[*]}{.metadata.name},{.subsets[*].addresses[*].ip}{'\n... | ###Instruction: It seems a silly question, but how do I expand the "+ 1 more..." from the endpoints list?
Particularly I want to see all the endpoints of a service and the following command hides some endpoints behind the "+ 1 more...".
kubectl describe service <name>
I tried this:
kubectl get endpoints -o wide
... | It seems a silly question, but how do I expand the "+ 1 more..." from the endpoints list?
Particularly I want to see all the endpoints of a service and the following command hides some endpoints behind the "+ 1 more...".
kubectl describe service <name>
I tried this:
kubectl get endpoints -o wide
It still doesn'... | |
To illustrate Nataraj Medayhal, you can find an example based on configMap on devlinx9/k8s_tomcat_custer
The configMap is used to control the configuration of tomcat, in this we added the cluster configuration, save the following text in a file configmap-tomcat.yaml
apiVersion: v1
kind: ConfigMap
metadata:
name: test... | ###Instruction: When deploying the app, certain environment-specific settings need to be applied to the server.xml, which cannot be applied when the container is built. Has anyone tried using a volume_mounted config file, and where would I tell tomcat the location of this custom config?
### Response: To illustrate Nat... | When deploying the app, certain environment-specific settings need to be applied to the server.xml, which cannot be applied when the container is built. Has anyone tried using a volume_mounted config file, and where would I tell tomcat the location of this custom config?
| |
This isn't a direct answer, but it ended up being too long for a comment and I think it's relevant. If you were to apply your manifests using kustomize (aka kubectl apply -k), then you get the following behavior:
ConfigMaps are generated with a content-based hash appended to their name
Kustomize substitutes the genera... | ###Instruction: I have a devops pipeline divided in three steps:
kubectl apply -f configmap.yml
kubectl apply -f deployment.yml
kubectl rollout restart deployment/test-service
I think that when the configmap.yml changes the rollout restart step is useful. But when only the deployment.yml changes, I'm worried that the... | I have a devops pipeline divided in three steps:
kubectl apply -f configmap.yml
kubectl apply -f deployment.yml
kubectl rollout restart deployment/test-service
I think that when the configmap.yml changes the rollout restart step is useful. But when only the deployment.yml changes, I'm worried that the "extra" rollout... | |
Based on the description, the --force flag should do the trick.
--force force resource updates through a replacement strategy
However, there are some issues with it as mentioned in this GitHub issue.
| ###Instruction: I have a problem where we essentially discovered a piece of stale configuration in a live environment on one of our deployments (a config map was added as a volume mount). Reading through the docs here (search for 'Upgrades where live state has changed') we can see that helm v2 would purge changes that ... | I have a problem where we essentially discovered a piece of stale configuration in a live environment on one of our deployments (a config map was added as a volume mount). Reading through the docs here (search for 'Upgrades where live state has changed') we can see that helm v2 would purge changes that were introduced ... | |
After looking at the yaml files I realized that Prometheus doesn't have the permissions to read all namespaces. And after looking at the repository customization examples I found the solution: https://github.com/prometheus-operator/kube-prometheus/blob/main/docs/customizations/monitoring-additional-namespaces.md
Hope t... | ###Instruction: I just installed prometheus operator as indicated here: https://github.com/prometheus-operator/kube-prometheus:
kubectl apply --server-side -f manifests/setup
kubectl wait \
--for condition=Established \
--all CustomResourceDefinition \
--namespace=monitoring
kubectl apply -f manifests/
Aft... | I just installed prometheus operator as indicated here: https://github.com/prometheus-operator/kube-prometheus:
kubectl apply --server-side -f manifests/setup
kubectl wait \
--for condition=Established \
--all CustomResourceDefinition \
--namespace=monitoring
kubectl apply -f manifests/
After that I just t... | |
Once understood the issue is fairly simple.
The metallb setup described above works as it is supposed to.
However, the Kubernetes setup does not. Most likely due to bad network configuration.
Understanding the error
The key to understanding what is going on is the following error:
Error from server (InternalError): er... | ###Instruction: I'm setting up an on-premise kubernetes cluster with kubeadm.
Here is the Kubernestes version
clientVersion:
buildDate: "2022-10-12T10:57:26Z"
compiler: gc
gitCommit: 434bfd82814af038ad94d62ebe59b133fcb50506
gitTreeState: clean
gitVersion: v1.25.3
goVersion: go1.19.2
major: "1"
minor: "2... | I'm setting up an on-premise kubernetes cluster with kubeadm.
Here is the Kubernestes version
clientVersion:
buildDate: "2022-10-12T10:57:26Z"
compiler: gc
gitCommit: 434bfd82814af038ad94d62ebe59b133fcb50506
gitTreeState: clean
gitVersion: v1.25.3
goVersion: go1.19.2
major: "1"
minor: "25"
platform: l... | |
You need to deploy an ingress controller in your cluster so that it gives you an entrypoint where your applications can be accessed. Traditionally, in a cloud native environment it would automatically provision a LoadBalancer for you that will read the rules you define inside your Ingress object and route your request ... | ###Instruction: Exposing Service from a BareMetal(Kubeadm) Build Kubernetes Cluster to the outside world. I am trying to access my Nginx as a service outside of the cluster to get NGINX output in the web browser.
For that, I have created a deployment and service for NGINX as shown below,
As per my search, found that w... | Exposing Service from a BareMetal(Kubeadm) Build Kubernetes Cluster to the outside world. I am trying to access my Nginx as a service outside of the cluster to get NGINX output in the web browser.
For that, I have created a deployment and service for NGINX as shown below,
As per my search, found that we have below to ... | |
This is because the ingress gateway selector when installed with Helm is istio: ingress, instead of istio: ingressgateway when installed with istioctl.
If you modify the Gateway to reflect this, then it should work:
apiVersion: networking.istio.io/v1beta1
kind: Gateway
metadata:
name: bookinfo-gateway
namespace: de... | ###Instruction: I have created an AKS cluster using the following Terraform code
resource "azurerm_virtual_network" "test" {
name = var.virtual_network_name
location = azurerm_resource_group.rg.location
resource_group_name = azurerm_resource_group.rg.name
address_space = [var.vir... | I have created an AKS cluster using the following Terraform code
resource "azurerm_virtual_network" "test" {
name = var.virtual_network_name
location = azurerm_resource_group.rg.location
resource_group_name = azurerm_resource_group.rg.name
address_space = [var.virtual_network_add... | |
Reading the kernel documentation on this leads me to believe this is not possible. And I don't think this is a desirable behavior. Let's just think about the following scenario: You have a machine with 64GB of physical memory with 10GB of those used. Then you start a process with a "physical" memory limit of 500MB. If ... | ###Instruction: In Kubernetes, is it possible to enforce virtual memory (physical page swapping to disk) on a pod/container with memory requests and limits set?
For instance, as per the Kubernetes documentation, “if you set a memory limit of 4GiB for a container, the kubelet (and container runtime) enforce the limit. T... | In Kubernetes, is it possible to enforce virtual memory (physical page swapping to disk) on a pod/container with memory requests and limits set?
For instance, as per the Kubernetes documentation, “if you set a memory limit of 4GiB for a container, the kubelet (and container runtime) enforce the limit. The runtime preve... | |
This is because you have hit general concerns of istio- prefix get striped, from the steps by steps installation with istio-ingress will stripe with ingress, so if you using istio-ingressgateway that could match with app selector , or change the app selector to match with it.
| ###Instruction: I have created an AKS cluster using the following Terraform code
resource "azurerm_virtual_network" "test" {
name = var.virtual_network_name
location = azurerm_resource_group.rg.location
resource_group_name = azurerm_resource_group.rg.name
address_space = [var.vir... | I have created an AKS cluster using the following Terraform code
resource "azurerm_virtual_network" "test" {
name = var.virtual_network_name
location = azurerm_resource_group.rg.location
resource_group_name = azurerm_resource_group.rg.name
address_space = [var.virtual_network_add... | |
This error is from client-go when there are no resources available in external.metrics.k8s.io/v1beta1 here in client-go, it gets all ServerGroups.
When KEDA is not installed then external.metrics.k8s.io/v1beta1 is not part of ServerGroups and hence its not called and therefore no issue.
But when KEDA is installed then ... | ###Instruction: I am getting below error after installing keda in my k8s cluster and created some scaled object...
whatever command i am running EG: " kubectl get pods" i am getting response with below error message..
How to get rid of below error message.
E0125 11:45:32.766448 316 memcache.go:255] couldn't get res... | I am getting below error after installing keda in my k8s cluster and created some scaled object...
whatever command i am running EG: " kubectl get pods" i am getting response with below error message..
How to get rid of below error message.
E0125 11:45:32.766448 316 memcache.go:255] couldn't get resource list for e... | |
You need to set up MetalLB to get an external IP address for the LoadBalancer type services. It will give a local network IP address to the service.
Then you can do port mapping (configuration in the router) of incoming traffic of port 80 and port 443 to your external service IP address.
I have done a similar setup you... | ###Instruction: Exposing Service from a BareMetal(Kubeadm) Build Kubernetes Cluster to the outside world. I am trying to access my Nginx as a service outside of the cluster to get NGINX output in the web browser.
For that, I have created a deployment and service for NGINX as shown below,
As per my search, found that w... | Exposing Service from a BareMetal(Kubeadm) Build Kubernetes Cluster to the outside world. I am trying to access my Nginx as a service outside of the cluster to get NGINX output in the web browser.
For that, I have created a deployment and service for NGINX as shown below,
As per my search, found that we have below to ... | |
The "kubectl describe " function can be found in the command-line interface (CLI) of Kubernetes, specifically in the "kubectl" tool. "kubectl" is used to manage and interact with a Kubernetes cluster and its resources.
enter image description here
| ###Instruction: I am studying "kubectl describe" sourcecodes at https://github.com/kubernetes/kubectl/blob/master/pkg/describe/describe.go
However, I still could not figure out how "kubectl decsribe [CRD]" works (as in which function/functions are called).
I am a Go newbie, so would like to get some pointers please. Th... | I am studying "kubectl describe" sourcecodes at https://github.com/kubernetes/kubectl/blob/master/pkg/describe/describe.go
However, I still could not figure out how "kubectl decsribe [CRD]" works (as in which function/functions are called).
I am a Go newbie, so would like to get some pointers please. Thanks.
I have rea... | |
The problem was the host name set on the Ingress
| ###Instruction: I have an ingress for my application:
apiVersion: networking.k8s.io/v1
kind: Ingress
metadata:
name: myapi-ingress
annotations:
nginx.ingress.kubernetes.io/ssl-redirect: "true"
spec:
ingressClassName: nginx
rules:
- host: mysite.com
http:
paths:
- path: "/posts"
pat... | I have an ingress for my application:
apiVersion: networking.k8s.io/v1
kind: Ingress
metadata:
name: myapi-ingress
annotations:
nginx.ingress.kubernetes.io/ssl-redirect: "true"
spec:
ingressClassName: nginx
rules:
- host: mysite.com
http:
paths:
- path: "/posts"
pathType: Prefix
... | |
I was using Spring Boot 3 but was missing:
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-web</artifactId>
</dependency>
| ###Instruction: Using Kubernetes, exactly the kubectl apply -f ./auth.yaml statement, i'm trying to run a Authorization Server in a pod, but when I check out the logs, this show me the following error:
. ____ _ __ _ _
/\\ / ___'_ __ _ _(_)_ __ __ _ \ \ \ \
( ( )\___ | '_ | '_| | '_ \/ _` | \ \ ... | Using Kubernetes, exactly the kubectl apply -f ./auth.yaml statement, i'm trying to run a Authorization Server in a pod, but when I check out the logs, this show me the following error:
. ____ _ __ _ _
/\\ / ___'_ __ _ _(_)_ __ __ _ \ \ \ \
( ( )\___ | '_ | '_| | '_ \/ _` | \ \ \ \
\\/ ___)| ... | |
If you want to use shell substitution, then you need to execute your command with a shell. For example:
containers:
- name: postgres
image: postgres:latest
imagePullPolicy: IfNotPresent
command:
- /bin/sh
- -c
- >
pg_dump
--username=postgres
--no-password
... | ###Instruction: I have the following CronJob to run a backup of my database, and I'd like the backup files to be appended with the date:
{{- if .Values.postgresqlBackup.enabled }}
apiVersion: batch/v1
kind: CronJob
metadata:
name: postgres-backup
spec:
schedule: {{ .Values.postgresqlBackup.cron | quote }}
jobTemp... | I have the following CronJob to run a backup of my database, and I'd like the backup files to be appended with the date:
{{- if .Values.postgresqlBackup.enabled }}
apiVersion: batch/v1
kind: CronJob
metadata:
name: postgres-backup
spec:
schedule: {{ .Values.postgresqlBackup.cron | quote }}
jobTemplate:
spec:
... | |
This is work for me:
...
authorizerClassName: "kafka.security.authorizer.AclAuthorizer"
auth:
clientProtocol: sasl
externalClientProtocol: sasl
interBrokerProtocol: plaintext
sasl:
mechanisms: plain,scram-sha-256,scram-sha-512
interBrokerMechanism: plain
jaas:
clientUsers:
- yourusern... | ###Instruction: Goal:
I want to use bitnami/kafka helm chart with SASL enabled with the PLAIN mechanism for only the external client. (client-broker, broker-broker, broker-zookeeper connection can be in PLAINTEXT mechanism)
What I have Done:
I've set configured parameters in values.yaml file:
superUsers: User:adminuser... | Goal:
I want to use bitnami/kafka helm chart with SASL enabled with the PLAIN mechanism for only the external client. (client-broker, broker-broker, broker-zookeeper connection can be in PLAINTEXT mechanism)
What I have Done:
I've set configured parameters in values.yaml file:
superUsers: User:adminuser
auth.externalCl... | |
I'm not sure what will work exactly for you, but here's a few things you can try to approach this (read carefully because nginx is confusing):
Define service for your deployment, and make sure it covers port routes you want and support on deployment end:
apiVersion: v1
kind: Service
metadata:
name: web-app
na... | ###Instruction: by default, nginx ingress listens to two ports 80 and 443, how to add listening on port 9898
I tried to change it in daemon set, but nothing came out
, I don 't even know where else to dig
### Response: I'm not sure what will work exactly for you, but here's a few things you can try to approach this (r... | by default, nginx ingress listens to two ports 80 and 443, how to add listening on port 9898
I tried to change it in daemon set, but nothing came out
, I don 't even know where else to dig
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.