input
stringclasses
1 value
output
stringlengths
30
28.3k
text
stringlengths
151
31.8k
instruction
stringlengths
49
30.3k
And what is the error message you are getting? Some of the issues I noticed: use the expected file name know to docker, i.e. Dockerfile not DockerFile make sure base image exists (tritonserver:latest does not, you probably want one of these) first update the sources (RUN apt install ... -> RUN apt update && apt instal...
###Instruction: Description Trying to deploy the triton docker image as container on kubernetes cluster Triton Information What version of Triton are you using? -> 22.10 Are you using the Triton container or did you build it yourself? I used the server repo with following command: python3 compose.py --backend onnxrunti...
Description Trying to deploy the triton docker image as container on kubernetes cluster Triton Information What version of Triton are you using? -> 22.10 Are you using the Triton container or did you build it yourself? I used the server repo with following command: python3 compose.py --backend onnxruntime --backend pyt...
I think the simplest solution is to run crond (or an alternative of your choice) in a sidecar container (that is, another container in the same pod). Recall that all containers in a pod share the same network namespace, so localhost is the same thing for all containers. This means your cron container can happily run a ...
###Instruction: I have read about the various ways to run tasks periodically in a K8s cluster, but none of them seem to work well for this specific case. I have a deployment "my-depl" that can run an arbitrary number of pods and the task needs to execute periodically inside each pod (basically a shell command that "nud...
I have read about the various ways to run tasks periodically in a K8s cluster, but none of them seem to work well for this specific case. I have a deployment "my-depl" that can run an arbitrary number of pods and the task needs to execute periodically inside each pod (basically a shell command that "nudges" the main ap...
Hope is not too late, I found myself doing this a couple of months ago as well, all you have to do is to change the docker image as explained in the documentation above, to be more specific, the deployment docker image. So I assume you have some basic understanding of helm, it is pretty common to have a custom values.y...
###Instruction: I've installed Zolando PostgreSQL Operator v1.8.1 in bare-metal K8S using helm, helm repo add postgres-operator-charts https://opensource.zalando.com/postgres-operator/charts/postgres-operator helm install postgres-operator postgres-operator-charts/postgres-operator --version 1.8.1 but I'm not sure how...
I've installed Zolando PostgreSQL Operator v1.8.1 in bare-metal K8S using helm, helm repo add postgres-operator-charts https://opensource.zalando.com/postgres-operator/charts/postgres-operator helm install postgres-operator postgres-operator-charts/postgres-operator --version 1.8.1 but I'm not sure how to properly upg...
Yes, you can solve it with a secret deletion in one of our cases it was also not working. So i would recommend checking the kubetl get events it will point out an error also if someone can not enable the logs of not getting debug log. i faced issues due to helm deploying creating the service Type: LoadBalancer and we w...
###Instruction: I am experiencing a pending-update Helm issue, ie. in CI pipelines we sometimes deploy a particular application just one time after another. The first helm deployment is still in the pending-update state, while the other deployment of the same application (ran eg. 1 min later) cannot be deployed causing...
I am experiencing a pending-update Helm issue, ie. in CI pipelines we sometimes deploy a particular application just one time after another. The first helm deployment is still in the pending-update state, while the other deployment of the same application (ran eg. 1 min later) cannot be deployed causing a well-known er...
It's hard to say precisely what the root cause is, but in general it's something related to the network or domain names resolution. A public address is assigned to a node on a startup and is exposed to other nodes for communication. Other nodes store that address and nodeId in their history. Here is what is happening: ...
###Instruction: We have been experimenting with the number of Ignite server pods to see the impact on performance. One thing that we have noticed is that if the number of Ignite server pods is increased after client nodes have established communication the new pod will just fail loop with the error below. If however th...
We have been experimenting with the number of Ignite server pods to see the impact on performance. One thing that we have noticed is that if the number of Ignite server pods is increased after client nodes have established communication the new pod will just fail loop with the error below. If however the grid is destro...
You can leverage the Operator to create these databases on Kubernetes. Operators will manage and create the database for you. Elasticsearch - https://www.elastic.co/downloads/elastic-cloud-kubernetes Cassandra - https://github.com/instaclustr/cassandra-operator Janusgraph - https://github.com/IBM/janusgraph-operator Y...
###Instruction: I want to setup cassandra,elasticsearch and janusgraph on ubuntu 20.04 using kubernetes. can anyone suggest me links or provide me yaml file for setup? i have a 3node Kubernetes cluster,1 master and 2 nodes, i have installed 1.26.1 Kubernetes version ### Response: You can leverage the Operator to crea...
I want to setup cassandra,elasticsearch and janusgraph on ubuntu 20.04 using kubernetes. can anyone suggest me links or provide me yaml file for setup? i have a 3node Kubernetes cluster,1 master and 2 nodes, i have installed 1.26.1 Kubernetes version
There is no official AWS support for S3 as a CSI. There is a fuse driver from Yandex-cloud here: https://github.com/yandex-cloud/k8s-csi-s3
###Instruction: We have on-premises Kubernetes clusters. Our data is in S3-compatible cloud storage (e.g. Amazon s3). We want to mount S3 bucket to Kubernetes pods in ReadWriteMany (RWX) mode via a CSI driver. What non-dead Kuebrnetes CSI RWX S3 drivers exist in 2022? ### Response: There is no official AWS support for...
We have on-premises Kubernetes clusters. Our data is in S3-compatible cloud storage (e.g. Amazon s3). We want to mount S3 bucket to Kubernetes pods in ReadWriteMany (RWX) mode via a CSI driver. What non-dead Kuebrnetes CSI RWX S3 drivers exist in 2022?
A common approach is to use separate projects for staging and production. With that, you will get the isolation, and clear separation between the staging & production environment. Prevents accidental changes or testing and also prevents downtimes etc. Resource management across the project would be easy for you will ha...
###Instruction: This is my first time using GCP, I have always been an AWS person before this. As a small team without dedicated DevOps, should we separate our prod and sandbox environments into 2 clusters / VPCs under one GCP project, or should we be going through the hassle of entirely separate GCP projects as well? ...
This is my first time using GCP, I have always been an AWS person before this. As a small team without dedicated DevOps, should we separate our prod and sandbox environments into 2 clusters / VPCs under one GCP project, or should we be going through the hassle of entirely separate GCP projects as well? What is the indu...
I also had the issue showing in the etcd logs: {"level":"warn","ts":"2023-02-14T11:47:26.260Z","caller":"embed/config_logging.go:169","msg":"rejected connection","remote-addr":"192.168.65.4:34996","server-name":"","error":"tls: failed to verify client certificate: x509: certificate has expired or is not yet valid: curr...
###Instruction: Issue type: Kubernetes on Docker Desktop stopped working due to expired kuber-apiserver certificates OS Version/build: Windows 10 version - 1909 and OS Build - 18363 App version: Docker Desktop 3.03 Steps to reproduce: Install Docker Desktop Enable Kubernetes Change the Windows PC time to ahead by 1 ye...
Issue type: Kubernetes on Docker Desktop stopped working due to expired kuber-apiserver certificates OS Version/build: Windows 10 version - 1909 and OS Build - 18363 App version: Docker Desktop 3.03 Steps to reproduce: Install Docker Desktop Enable Kubernetes Change the Windows PC time to ahead by 1 year Kubernetes cl...
@Harsh Manvar while I do appreciate your anwser I found something that is a better suit for my needs. Cert-manager documentation contains multiple options to sync secrets across namespaces The one I chose was reflector. The steps to install are included in the documentation but just for the sake of service i'll post he...
###Instruction: I was under the impression that the main point of cluster-issuer is that its namespaced and doesn't have to be recreated across different resources, in general there could be one main cluster-issuer that will manage all ingresses across the cluster. From what I am seeing the cluster-issuer can only crea...
I was under the impression that the main point of cluster-issuer is that its namespaced and doesn't have to be recreated across different resources, in general there could be one main cluster-issuer that will manage all ingresses across the cluster. From what I am seeing the cluster-issuer can only create one secret an...
After reading silh's comment and the kubebuilder Dockerfile again, I somehow solved this problem by adding CGO_ENABLED=0 to go build. It changes dynamic linker to static linker. CGO_ENABLED=0 GOOS=linux GOARCH=amd64 go build -a -o manager main.go At least the no such file or directory error is now gone.
###Instruction: This is my Dockerfile: FROM gcr.io/distroless/static:nonroot WORKDIR / COPY ls . COPY tail . COPY test . COPY manager . ENTRYPOINT ["/manager"] after [root@master go-docker-test]# docker build -t strangething:v1.13 . [root@master go-docker-test]# docker run -d strangething:v1.13 [root@master go-docker-...
This is my Dockerfile: FROM gcr.io/distroless/static:nonroot WORKDIR / COPY ls . COPY tail . COPY test . COPY manager . ENTRYPOINT ["/manager"] after [root@master go-docker-test]# docker build -t strangething:v1.13 . [root@master go-docker-test]# docker run -d strangething:v1.13 [root@master go-docker-test]# docker lo...
Finally the problem wasn't the values.yaml that was not set correctly but more the way it was used within the template. When using an include of a definition coming from a .tpl file (this one was the autogenerated by Helm), we must be careful to not be in a range. I was creating a range of assets so it seems that it wi...
###Instruction: I am building a new Helm chart (mychart) that I'm trying to install. A values.yaml exists and its contents specify the fullnameOverride: fullnameOverride: "myapp" I run the following command helm install --dry-run -f "mychart-stack/values.yaml" mychart-stack1 ./mychart-stack And it's giving me the erro...
I am building a new Helm chart (mychart) that I'm trying to install. A values.yaml exists and its contents specify the fullnameOverride: fullnameOverride: "myapp" I run the following command helm install --dry-run -f "mychart-stack/values.yaml" mychart-stack1 ./mychart-stack And it's giving me the error: template: my...
To annotate all nodes with a particular machinedeployment. You can use the kubectl annotate command to annotate all nodes in a particular machinedeployment with a specific key-value pair. For example, to annotate all nodes with a machinedeployment of nginx-deployment, you can run the following command: kubectl annotate...
###Instruction: We have created two machine deployments. kubectl get machinedeployment -A NAMESPACE NAME REPLICAS AVAILABLE-REPLICAS PROVIDER OS KUBELET AGE kube-system abc 3 3 hetzner ubuntu 1.24.9 116m kube-system v...
We have created two machine deployments. kubectl get machinedeployment -A NAMESPACE NAME REPLICAS AVAILABLE-REPLICAS PROVIDER OS KUBELET AGE kube-system abc 3 3 hetzner ubuntu 1.24.9 116m kube-system vnr4jdxd6s-worker...
Yes, you will be able to access the ClusterIP from Kubernetes worker nodes. When you create the SVC in to Kubernetes with type ClusterIP it assigns the Virtual IP to SVC, Virtual IP address is accessible only within the K8s cluster. Kubernetes uses the IPTables rules to forward traffic from VirtualIP to the PODs that t...
###Instruction: when CLUSTER-IP is internal to cluster network, then why I am able to ping one of the cluster IP service from host/node where k8s installed. Have a look at ip 10.101.210.88 which is a cluster-ip and as per definition it must be only reachable from any other pod only but still I can reach it from my Ubun...
when CLUSTER-IP is internal to cluster network, then why I am able to ping one of the cluster IP service from host/node where k8s installed. Have a look at ip 10.101.210.88 which is a cluster-ip and as per definition it must be only reachable from any other pod only but still I can reach it from my Ubuntu host/node mac...
Is the client using a persistent/long-lived connection? Because the service endpoint will only distribute the new connections in a round-robin manner as per your setting. Kubernetes doesn't offer any built-in mechanism to load balance long-lived connections. For long-lived connections, you can handle the load balancing...
###Instruction: a have a problem with Kubernetes service. My service only sends requests to one pod ignoring other pods. I don't know why and how can I debug it. It should distribute request in a round-robin way. For me, it seems that something's wrong service but I don't know to debug it. Outputs of kubectl describe s...
a have a problem with Kubernetes service. My service only sends requests to one pod ignoring other pods. I don't know why and how can I debug it. It should distribute request in a round-robin way. For me, it seems that something's wrong service but I don't know to debug it. Outputs of kubectl describe service and nodes...
Just copy the templates folder from the builder, like: COPY --from=builder /app ./ ADD ./migrations /migrations COPY --from=builder ./templates /templates or add the folder like: COPY --from=builder /app ./ ADD ./migrations /migrations ADD ./templates /templates
###Instruction: I have the following directory structure: templates/ a.tmpl services/ service.go main.go Now inside the service.go file i am calling the below function: dir, err := filepath.Abs(filepath.Dir("./templates/")) if err != nil { return nil, err } baseFile := filepath.Join(dir, "a.t...
I have the following directory structure: templates/ a.tmpl services/ service.go main.go Now inside the service.go file i am calling the below function: dir, err := filepath.Abs(filepath.Dir("./templates/")) if err != nil { return nil, err } baseFile := filepath.Join(dir, "a.tmpl") tmpl, err...
When you build your binary, go only includes the necessary go files to have your program work. It does not know that your templates directory is necessary to the running of the program. There is several solutions to your problem : Create an environment variable pointing to were the templates are and use it on runtime....
###Instruction: I have the following directory structure: templates/ a.tmpl services/ service.go main.go Now inside the service.go file i am calling the below function: dir, err := filepath.Abs(filepath.Dir("./templates/")) if err != nil { return nil, err } baseFile := filepath.Join(dir, "a.t...
I have the following directory structure: templates/ a.tmpl services/ service.go main.go Now inside the service.go file i am calling the below function: dir, err := filepath.Abs(filepath.Dir("./templates/")) if err != nil { return nil, err } baseFile := filepath.Join(dir, "a.tmpl") tmpl, err...
In our case we were using gcsfuse and mounted the bucket to the gce instance at /root/bucketmount. since the bucket is mounted on root fs, I have to use escalate privilege tag but it's not suggested to use. so we now changed the permissions to the folder using chown command. This helped us so In our pipeline we have cr...
###Instruction: We are planning to move from on-prem to gcp, but the process of designing is taking some time. We want to deploy our docker containers on gce vms. We don't want to manually increase the storage every time the containers fill up the space, we know that this can be done by auto scaling but we don't have e...
We are planning to move from on-prem to gcp, but the process of designing is taking some time. We want to deploy our docker containers on gce vms. We don't want to manually increase the storage every time the containers fill up the space, we know that this can be done by auto scaling but we don't have enough expertise ...
I don't think that is how it works. meshservice1 sidecar needs to know where to contact meshservice2, it's used Kubernetes service to get the latest endpoint IP of meshservice2 itself. alternatively, you can use spec.endpoints, but you need to update everytime Pod IP is change.
###Instruction: I have one question regarding ServiceEntry in Istio. As I can see in the guides it says that we can use workloadSelector to select one or more Kubernetes pods of the MESH_INTERNAL to direct traffic into them. That means that we can route traffic directly to a kuberneted pod without the usage of a kubern...
I have one question regarding ServiceEntry in Istio. As I can see in the guides it says that we can use workloadSelector to select one or more Kubernetes pods of the MESH_INTERNAL to direct traffic into them. That means that we can route traffic directly to a kuberneted pod without the usage of a kubernetes service? Le...
This: spec: containers: - name: private-reg-container image: xichen9718/portals_docker_repository:latest Is pulling from docker.io and not a private repo. Also, this: Warning Failed 28s (x2 over 46s) kubelet Failed to pull image "xichen9718/portals_docker_repository:latest": rpc error: code ...
###Instruction: I'm trying to pull my Docker Image from my private Docker Registry in Kubernetes, but I got this error: ImagePullBackOff NAME READY STATUS RESTARTS AGE nginx-994fc8fb7-f24sv 2/2 Running 0 2d22h portals-app-669b654d87-lk258 0/1 ...
I'm trying to pull my Docker Image from my private Docker Registry in Kubernetes, but I got this error: ImagePullBackOff NAME READY STATUS RESTARTS AGE nginx-994fc8fb7-f24sv 2/2 Running 0 2d22h portals-app-669b654d87-lk258 0/1 ImagePullBac...
With the node-exporter installed as daemonset, you have the metrics of the entire cluster. To have the overall cluster memory usage, in percentage: 100 * ( sum(node_memory_MemTotal_bytes{service="node-exporter"}) - sum(node_memory_MemAvailable_bytes{service="node-exporter"}) ) / sum(node_memory_MemTotal_bytes{service...
###Instruction: I have this query: 100 * (1 - ((avg_over_time(node_memory_MemFree_bytes[10m]) + avg_over_time(node_memory_Cached_bytes[10m]) + avg_over_time(node_memory_Buffers_bytes[10m])) / avg_over_time(node_memory_MemTotal_bytes[10m]))) However it only returns the namespace where Prometheus is installed: {instance...
I have this query: 100 * (1 - ((avg_over_time(node_memory_MemFree_bytes[10m]) + avg_over_time(node_memory_Cached_bytes[10m]) + avg_over_time(node_memory_Buffers_bytes[10m])) / avg_over_time(node_memory_MemTotal_bytes[10m]))) However it only returns the namespace where Prometheus is installed: {instance="10.240.0.11:91...
After a couple of days' research, I managed to find a way to do this, and it is annoyingly simple... The key to all of this lies in the documentation here. Basically, in order to update from mongo 4.4.0 to 6.0.4, you need to do it in steps: First, change the mongo version from "4.4.0" to e.g. "5.0.4", whilst setting th...
###Instruction: I have set up the Kubernetes MongoDB operator according to this guide: https://adamtheautomator.com/mongodb-kubernetes/ and it works well. However, when I try to update the MongoDB version to 6.0.4, I get the following error: { "error":"UPGRADE PROBLEM: Found an invalid featureCompatibilityVersion docum...
I have set up the Kubernetes MongoDB operator according to this guide: https://adamtheautomator.com/mongodb-kubernetes/ and it works well. However, when I try to update the MongoDB version to 6.0.4, I get the following error: { "error":"UPGRADE PROBLEM: Found an invalid featureCompatibilityVersion document (ERROR: Loc...
I want to dynamically change the amount of replicas of a deployment depending on the available resources, especially memory. You can use the Kubernetes HPA (Horizonatal POD autoscaling), which which dynamically changes the number of replicas based on the CPU/Memory utilization. While you can also set the default numb...
###Instruction: I am using Google Kubernetes Engine and some of my deployments are more important than others (For example, the staging environment can run on less replicas or even stop if needed). I want to dynamically change the amount of replicas of a deployment depending on the available resources, especially memor...
I am using Google Kubernetes Engine and some of my deployments are more important than others (For example, the staging environment can run on less replicas or even stop if needed). I want to dynamically change the amount of replicas of a deployment depending on the available resources, especially memory. Ideally, I wo...
well... I feel dumb for not reading the docs more closely. Here I am to answer my own question. create a RuntimeClass like this: kind: RuntimeClass apiVersion: node.k8s.io/v1 metadata: name: nvidia handler: nvidia add runtimeClassName: nvidia to the container spec of any containers that you want to use the nvid...
###Instruction: I want to run some gpu workloads on my bare metal k8s cluster. So I have installed the nvidia containerd runtime engine on my cluster. But the cilium cni pods crashes when I make nvidia the default runtime. (I'll post about that some other place) I'm thinking I should be able to work around this problem...
I want to run some gpu workloads on my bare metal k8s cluster. So I have installed the nvidia containerd runtime engine on my cluster. But the cilium cni pods crashes when I make nvidia the default runtime. (I'll post about that some other place) I'm thinking I should be able to work around this problem by scheduling o...
Just use the options to the kubectl command to get the name column as the only output. kubectl get pods -o custom-columns=NAME:.metadata.name Then use a grep/sed to filter out what you do or do not want.
###Instruction: I tried the following but failed to get a list of all pods like these: my-pod-1 my-pod-19 my-pod-24 etc. kgp | grep -E my-pod-[0-9]+ kgp | grep -E my-pod-[0-9] kgp | grep -i -E my-pod-[0-9] kgp | grep -i -E "my-pod-[0-9]" kgp | grep -i -E "^my-pod-[0-9]" kgp | grep "^my-pod-[0-9]" kgp | grep -v 'my-pod...
I tried the following but failed to get a list of all pods like these: my-pod-1 my-pod-19 my-pod-24 etc. kgp | grep -E my-pod-[0-9]+ kgp | grep -E my-pod-[0-9] kgp | grep -i -E my-pod-[0-9] kgp | grep -i -E "my-pod-[0-9]" kgp | grep -i -E "^my-pod-[0-9]" kgp | grep "^my-pod-[0-9]" kgp | grep -v 'my-pod-[0-9]' kgp == ...
One way to ensure that only one replica per partition subscribes to messages is to use a queue group subscription in NATS. When multiple subscribers are part of the queue group. Only one of them will receive each message. This allows you to ensure that only one replica per partition processes messages at a time. Exampl...
###Instruction: I'm developing a NATS based solution with deterministic subject partitioning, I use this type of mapping: service.* --> service.*.<number of partition> Now I need a way to subscribe only one of my replicas per partition, what's the right way to do that? I was thinking about K8s ordinal index, but all ...
I'm developing a NATS based solution with deterministic subject partitioning, I use this type of mapping: service.* --> service.*.<number of partition> Now I need a way to subscribe only one of my replicas per partition, what's the right way to do that? I was thinking about K8s ordinal index, but all the replicas sho...
Use grep like so: kubectl get pods | grep -P '^my-pod-\d+$' Here, GNU grep uses the following option: -P : Use Perl regexes. ^my-pod-\d+$ : matches the start of the line, followed by my_pod-, then 1 or more digits until the end of the line. SEE ALSO: perlre - Perl regular expressions
###Instruction: I tried the following but failed to get a list of all pods like these: my-pod-1 my-pod-19 my-pod-24 etc. kgp | grep -E my-pod-[0-9]+ kgp | grep -E my-pod-[0-9] kgp | grep -i -E my-pod-[0-9] kgp | grep -i -E "my-pod-[0-9]" kgp | grep -i -E "^my-pod-[0-9]" kgp | grep "^my-pod-[0-9]" kgp | grep -v 'my-pod...
I tried the following but failed to get a list of all pods like these: my-pod-1 my-pod-19 my-pod-24 etc. kgp | grep -E my-pod-[0-9]+ kgp | grep -E my-pod-[0-9] kgp | grep -i -E my-pod-[0-9] kgp | grep -i -E "my-pod-[0-9]" kgp | grep -i -E "^my-pod-[0-9]" kgp | grep "^my-pod-[0-9]" kgp | grep -v 'my-pod-[0-9]' kgp == ...
I found the problem was with used port 8000 for websocket server. Used port was not open on firewall, after changing websocket server port to 80, everything started working.
###Instruction: I want to expose 2 services: web application at example.com port 80 web sockets at example.com/app/ws port 8000 with given configuration: apiVersion: "v1" kind: "Service" metadata: name: "web-app-service" annotations: cloud.google.com/load-balancer-type: "Internal" spec: type: "LoadBalancer...
I want to expose 2 services: web application at example.com port 80 web sockets at example.com/app/ws port 8000 with given configuration: apiVersion: "v1" kind: "Service" metadata: name: "web-app-service" annotations: cloud.google.com/load-balancer-type: "Internal" spec: type: "LoadBalancer" selector: ...
This error might be due to not creating the label ‘jenkins-eks-pod’ on the jenkins server. To create a label on the jenkins server : go to manage jenkins > Manage nodes and Clouds > labels and then enter the label name. Post creating this label try to run the job and check if it works. Refer to this Blog by Bibin Wil...
###Instruction: After running a pipeline job in Jenkins that runs in my k8s cluster I am getting this error - ‘Jenkins’ doesn’t have label ‘jenkins-eks-pod’. What am I missing in my configuration? Pod Logs in k8s- 2023-02-20 14:37:03.379+0000 [id=1646] WARNING o.c.j.p.k.KubernetesLauncher#launch: Error in provisi...
After running a pipeline job in Jenkins that runs in my k8s cluster I am getting this error - ‘Jenkins’ doesn’t have label ‘jenkins-eks-pod’. What am I missing in my configuration? Pod Logs in k8s- 2023-02-20 14:37:03.379+0000 [id=1646] WARNING o.c.j.p.k.KubernetesLauncher#launch: Error in provisioning; agent=Kub...
The securityContext are more related to the container itself and some access to the host machine. The allowPrivilegeEscalation allow a process to gain more permissions than its parent process. This is more related to setuid/setgid flags in binaries, but inside a container there is no much to get worried about. You can ...
###Instruction: I want to check if pod in the cluster running as privileged pods, which can indicate that we may have security issue, so I check if privileged: true However under the securityContext: spec there is additional fields like allowPrivilegeEscalation RunAsUser ProcMount Capabilities etc Which may be risky ...
I want to check if pod in the cluster running as privileged pods, which can indicate that we may have security issue, so I check if privileged: true However under the securityContext: spec there is additional fields like allowPrivilegeEscalation RunAsUser ProcMount Capabilities etc Which may be risky (not sure about ...
I'd reckon the issue is with the resources, not with Ansible. Take a look: apiVersion: rbac.authorization.k8s.io/v1 kind: ClusterRole metadata: name: myapp-cluster-role namespace: myapp-ns # <-- NOT A NAMESPACED RESOURCE rules: - apiGroups: ["*"] resources: ["*"] verbs: ["*"] --- apiVersion: rbac.authorization....
###Instruction: My NodeJS microservice is deployed to k8s cluster. I would like this microservice to access the k8s API server. For that, I guess I need to create a ServiceAccount for it. So I did this: apiVersion: v1 kind: ServiceAccount metadata: name: my-app-service-account namespace: myapp-ns Then, I also cre...
My NodeJS microservice is deployed to k8s cluster. I would like this microservice to access the k8s API server. For that, I guess I need to create a ServiceAccount for it. So I did this: apiVersion: v1 kind: ServiceAccount metadata: name: my-app-service-account namespace: myapp-ns Then, I also created a ClusterRo...
The Operator Lifecycle Manager is really well suited for the task. When you create operator Foo, you can package it in the OLM way by creating a bundle which contains the ClusterServiceVersion needed to inform OLM of dependencies that need to be resolved before install and during upgrades. These can just be a list of A...
###Instruction: I need to automate the provisioning of a complex application in Kubernetes. It's a complex, multi-step process that involves provisioning of some cluster-wide resources and some app-specific resources. The cluster-wide resources are: Istio A few Operators (Cert Manager, Prometheus Operator, Postgres Op...
I need to automate the provisioning of a complex application in Kubernetes. It's a complex, multi-step process that involves provisioning of some cluster-wide resources and some app-specific resources. The cluster-wide resources are: Istio A few Operators (Cert Manager, Prometheus Operator, Postgres Operator, among ot...
It seems you have missing broker config, usually I have below config exposed from my docker compose when I run Kafka on my CI KAFKA_LISTENERS: 'LISTENER_INTERNAL://kafka:29092,LISTENER_HOST://:9092' KAFKA_ADVERTISED_LISTENERS: LISTENER_INTERNAL://kafka:29092,LISTENER_HOST://localhost:9092 KAFKA_LISTEN...
###Instruction: I'm trying to deploy kafka on local k8s, then I need to connect to it by application and using offset explorer so, using kubectl I created zookeeper service and deployment using this yml file apiVersion: v1 kind: Service metadata: labels: app: zookeeper-service name: zookeeper-service spec: ty...
I'm trying to deploy kafka on local k8s, then I need to connect to it by application and using offset explorer so, using kubectl I created zookeeper service and deployment using this yml file apiVersion: v1 kind: Service metadata: labels: app: zookeeper-service name: zookeeper-service spec: type: NodePort p...
In summary, I want the overlay to be able to define when the sidecar should be added, and to which specific deployments to add it to. My first thought was that you could have a label that means "apply the sidecar patch", and use that in the Component: apiVersion: kustomize.config.k8s.io/v1alpha1 kind: Component patc...
###Instruction: On a Kubernetes cluster, I have multiple Deployment resources. For security, I am using a sidecar proxy pattern where the Service will proxy traffic to the sidecar, which will ensure authentication before passing on to the deployed application. I am trying to set up Kustomize to do this. Since the sidec...
On a Kubernetes cluster, I have multiple Deployment resources. For security, I am using a sidecar proxy pattern where the Service will proxy traffic to the sidecar, which will ensure authentication before passing on to the deployed application. I am trying to set up Kustomize to do this. Since the sidecar definition is...
I was able to solve the issue by adding two things to description: PGDATA env variable inside containers: env: - name: PGDATA value: /var/lib/postgresql/data/pgdata subPath: postgres under volumeMounts Now my deployment file looks like this: --- apiVersion: apps/v1 kind: StatefulSet metadata: name: i...
###Instruction: I am trying to deploy PostgreSQL to GKE and here is my PersistentVolumeClaim definition: apiVersion: v1 kind: PersistentVolumeClaim metadata: name: postgres-pvc namespace: db labels: app: imgress-db spec: accessModes: - ReadWriteOnce resources: requests: storage: 400Mi and t...
I am trying to deploy PostgreSQL to GKE and here is my PersistentVolumeClaim definition: apiVersion: v1 kind: PersistentVolumeClaim metadata: name: postgres-pvc namespace: db labels: app: imgress-db spec: accessModes: - ReadWriteOnce resources: requests: storage: 400Mi and this is deploymen...
Indeed, there seem to be an issue. Docs still suggests that URL should be used. Yet I see to 500 too. Checking google status page ( https://status.cloud.google.com/ ), there could be an issue with FileStore (file access issues for non-root users). With a bunch of affected locations. and right now it works.
###Instruction: I am following the instructions on the official Kubernetes documentation to install Kubernetes repository, I run sudo curl -fsSLo /etc/apt/keyrings/kubernetes-archive-keyring.gpg https://packages.cloud.google.com/apt/doc/apt-key.gpg but I get 500 error curl: (22) The requested URL returned error: 500 ...
I am following the instructions on the official Kubernetes documentation to install Kubernetes repository, I run sudo curl -fsSLo /etc/apt/keyrings/kubernetes-archive-keyring.gpg https://packages.cloud.google.com/apt/doc/apt-key.gpg but I get 500 error curl: (22) The requested URL returned error: 500 Visiting the URL...
I have tried from inside minikube to curl the backend-service-name did not work If you explicitly meant that you've: connected to your minikube instance (i.e. minikube ssh) curl the service name directly from minikube instance. Then it should not work. It will work from a Pod/container that is targeting internal Ku...
###Instruction: I have a ruby on rails deployment and I want to use it in the frontend deployment so I created a service exposing port 3000 called "flicron-backend-service" here is the description of the service kubectl describe svc flicron-backend-service Name: flicron-backend-servic...
I have a ruby on rails deployment and I want to use it in the frontend deployment so I created a service exposing port 3000 called "flicron-backend-service" here is the description of the service kubectl describe svc flicron-backend-service Name: flicron-backend-service Namespace: ...
You need to specify a real path not an empty string, let's say in your image you have a tmp folder under /opt/spark, then the conf should be set like this: --conf spark.kubernetes.file.upload.path='local:///opt/spark/tmp' If you don't want to use the cmd = f""" {SPARK_HOME}/bin/spark-submit ...
###Instruction: Im trying to deploy spark (pyspark) in kubernetes using spark-submit, but I'm getting the following error : Exception in thread "main" org.apache.spark.SparkException: Please specify spark.kubernetes.file.upload.path property.    at org.apache.spark.deploy.k8s.KubernetesUtils$.uploadFileUri(KubernetesU...
Im trying to deploy spark (pyspark) in kubernetes using spark-submit, but I'm getting the following error : Exception in thread "main" org.apache.spark.SparkException: Please specify spark.kubernetes.file.upload.path property.    at org.apache.spark.deploy.k8s.KubernetesUtils$.uploadFileUri(KubernetesUtils.scala:330) ...
Edit your network settings in /etc/containers/net.d/podman-default-kube-network.conflist Change this line "dns_enabled": false, To this: "dns_enabled": true, Then reboot and up your yaml and try to resolve this: postgres_pgadmin-container_1 Or maybe this: postgres_postgres_1 Edit1 Just copy the config file: sudo cp...
###Instruction: I'm using podman 4.5-dev I have two pods deployed using: podman kube play foo.yaml podman kube play bar.yaml I specified the pods' hostnames in the files, but they won't get resolved inside the containers. I verified that the pods are in the same network. Is there some DNS configuration missing? Should ...
I'm using podman 4.5-dev I have two pods deployed using: podman kube play foo.yaml podman kube play bar.yaml I specified the pods' hostnames in the files, but they won't get resolved inside the containers. I verified that the pods are in the same network. Is there some DNS configuration missing? Should I use a Services...
There is no difference serviceAccount is DEPRECATED and you shoud use serviceAccountName instead. Quoting from the Kubernetes API docs > pod spec: serviceAccount: DeprecatedServiceAccount is a deprecated alias for ServiceAccountName: Deprecated: Use serviceAccountName instead
###Instruction: I have seen both serviceAccount and serviceAccountName been used in a pod manifest. What is the difference? ### Response: There is no difference serviceAccount is DEPRECATED and you shoud use serviceAccountName instead. Quoting from the Kubernetes API docs > pod spec: serviceAccount: DeprecatedServic...
I have seen both serviceAccount and serviceAccountName been used in a pod manifest. What is the difference?
If by hybrid k8s cluster you mean a cluster that has nodes over different cloud providers, then yes that is entirely possible. You can create a simple example cluster of this by using k3s (lightweight Kubernetes) and then using the --node-external-ip flag. This tells your nodes to talk to eachother via their public IP....
###Instruction: I am a student and have to make a Bachelor thesis for my school. Is it possible to make a hybrid Kubernetes cluster, and how is this possible? Is there a good application I can run in this cluster to show that it works? I have made an AKS cluster and a on-prem cluster. Then I made a nginx loadbalancer a...
I am a student and have to make a Bachelor thesis for my school. Is it possible to make a hybrid Kubernetes cluster, and how is this possible? Is there a good application I can run in this cluster to show that it works? I have made an AKS cluster and a on-prem cluster. Then I made a nginx loadbalancer and loadbalanced ...
My solution was to create write the credentials to a file and create a background thread to refresh that file. I can then pass tell aws-iam-authenticator to read the credentials from the file via the AWS_SHARED_CREDENTIALS_FILE environment variable. This might also be possible using AWS_WEB_IDENTITY_TOKEN_FILE to save ...
###Instruction: I'm trying to construct a Kubernetes informer outside of the EKS cluster that it's watching. I'm using aws-iam-authenticator plugin to provide the exec-based credentials to the EKS cluster. For the plugin to work, I'm assuming an IAM role and passing the AWS IAM credentials as environment variables. The...
I'm trying to construct a Kubernetes informer outside of the EKS cluster that it's watching. I'm using aws-iam-authenticator plugin to provide the exec-based credentials to the EKS cluster. For the plugin to work, I'm assuming an IAM role and passing the AWS IAM credentials as environment variables. The problem is that...
Not really, unless you are using indexed jobs (Kubernetes 1.21, Apr. 2021). For indexed jobs, the index is exposed to each Pod in the batch.kubernetes.io/job-completion-index annotation and the JOB_COMPLETION_INDEX environment variable. Official documentation: "Indexed Job for Parallel Processing with Static Work Assi...
###Instruction: In, nomad, we have an env variable named NOMAD_ALLOC_INDEX, that gives me the index of the container, is there a similar env variable in Kubernetes for the pods to get the pod index? Could you please provide your inputs? Thanks, Sarita ### Response: Not really, unless you are using indexed jobs (Kubern...
In, nomad, we have an env variable named NOMAD_ALLOC_INDEX, that gives me the index of the container, is there a similar env variable in Kubernetes for the pods to get the pod index? Could you please provide your inputs? Thanks, Sarita
This is an issue I am comming across too which lead me hear, it looks like it was just recently fixed with this patch https://docs.nvidia.com/datacenter/cloud-native/gpu-operator/release-notes.html#id2 Which will evict pods requesting gpus while the operator starts up again. This should solve your issue as it did mine....
###Instruction: I have run into an issue where helm installing my charts will work fine, but when I go to restart the system, the nvidia gpu operator will fail to validate. Bootstrapping is simple: $ microk8s enable gpu < watching dashboard for all the pods to turn green > $ microk8s helm install -n morpheus morpheus-a...
I have run into an issue where helm installing my charts will work fine, but when I go to restart the system, the nvidia gpu operator will fail to validate. Bootstrapping is simple: $ microk8s enable gpu < watching dashboard for all the pods to turn green > $ microk8s helm install -n morpheus morpheus-ai-engine morpheu...
Answering the first part: Output of rpm -q --changes which-2.21-28.el9.x86_64 * Fri Apr 15 14:00:00 2022 Than Ngo <than@redhat.com> - 2.21-28 - Resolves: #2050996, error on login when using ksh as the default shell * Tue Aug 10 14:00:00 2021 Mohan Boddu <mboddu@redhat.com> - 2.21-27 - Rebuilt for IMA sigs, glibc 2.34,...
###Instruction: Problem After moving to RHEL 8.5 from 8.4, started having the issue of K8S pods failure. spec.template.spec.containers[0].env[52].name: Invalid value: "BASH_FUNC_which%%": a valid environment variable name must consist of alphabetic characters, digits, '_', '-', or '.', and must not start with a digit ...
Problem After moving to RHEL 8.5 from 8.4, started having the issue of K8S pods failure. spec.template.spec.containers[0].env[52].name: Invalid value: "BASH_FUNC_which%%": a valid environment variable name must consist of alphabetic characters, digits, '_', '-', or '.', and must not start with a digit (e.g. 'my.env-na...
The issue can be solved by providing a valid GitHub API token via the GITHUB_TOKEN environment variable. Thanks a lot Christian Nunciato for the hint. However, if anybody knows some background about this and why this happened so surprisingly, I would be very interested in some insights/explanations.
###Instruction: I have a little Go app which creates YAML ressources for me I then deploy to a Kubernetes cluster. It worked quite well but since some hours (?) it fails saying: error: Could not automatically download and install resource plugin 'pulumi-resource-kubernetes', install the plugin using pulumi plugin inst...
I have a little Go app which creates YAML ressources for me I then deploy to a Kubernetes cluster. It worked quite well but since some hours (?) it fails saying: error: Could not automatically download and install resource plugin 'pulumi-resource-kubernetes', install the plugin using pulumi plugin install resource kub...
Update: This problem was resolved after upgrading Docker-Desktop to version 4.20.1 which uses a new docker/desktop-vpnkit-controller image tagged with dc331cb22850be0cdd97c84a9cfecaf44a1afb6e Original Answer you can get the log of crashed vpnkit-controller pod via command as follow: kubectl logs -p -n kube-system vpnk...
###Instruction: I've just enabled docker desktop's kubernetes feature on my m2 macbook air, and I observed that the vpnkit-controller pod under kube-system namespace has restarted several times since enabling the feature, is this normal or I missed some of the settings? screen shot of pod status ### Response: Update: ...
I've just enabled docker desktop's kubernetes feature on my m2 macbook air, and I observed that the vpnkit-controller pod under kube-system namespace has restarted several times since enabling the feature, is this normal or I missed some of the settings? screen shot of pod status
pod will remember the PVC it is using, but am struggling to find the official documentation to support this I think here is the exact line you are looking for You can set the .spec.volumeClaimTemplates which can provide stable storage using PersistentVolumes provisioned by a PersistentVolume Provisioner. Ref doc : ...
###Instruction: How does a StatefulSet ensure that a PersistentVolume and Pod will always be provisioned in the same Availability Zone? I understand that each pod in a StatefulSet has a storage identity, and that each pod will remember the PVC it is using, but am struggling to find the official documentation to support...
How does a StatefulSet ensure that a PersistentVolume and Pod will always be provisioned in the same Availability Zone? I understand that each pod in a StatefulSet has a storage identity, and that each pod will remember the PVC it is using, but am struggling to find the official documentation to support this.
We have faced the same issue we were able to reach through ipv4 and not working with ipv6. We did the following, # Reset the Cluster kubeadm reset # Create the cluster by adding the ipv6 CIDR along with the ipv4 address also enable IPv6DualStack # NOTE: The ipv6 given below matches the first 4 octet with Host ipv6 ad...
###Instruction: Below is the manifest file i used to enable calico CNI for k8s, pods are able to communicate over ipv4 but i am unable to reach outside using ipv6, k8s version v1.14 and calico version v3.11, am i missing some settings, forwarding is enabled on host with "sysctl -w net.ipv6.conf.all.forwarding=1" ---...
Below is the manifest file i used to enable calico CNI for k8s, pods are able to communicate over ipv4 but i am unable to reach outside using ipv6, k8s version v1.14 and calico version v3.11, am i missing some settings, forwarding is enabled on host with "sysctl -w net.ipv6.conf.all.forwarding=1" --- # Source: calic...
We have been running multiple databases on K8s like Elasticsearch, Redis some message brokers so it you can definitely run on Production. Now i would suggest going with the Operator managed Database deployment. As on Production, you might be expecting an HA, data replication which you won't be having an idea in depth. ...
###Instruction: Good afternoon! I am relatively new to Kubernetes. I would like to ask for your help in knowledge! What is the best way to deploy Postgresql or MySql in kubernetes for production? Suggest articles or resources, I would be very grateful. I only see examples and information on how to deploy Postgresql dev...
Good afternoon! I am relatively new to Kubernetes. I would like to ask for your help in knowledge! What is the best way to deploy Postgresql or MySql in kubernetes for production? Suggest articles or resources, I would be very grateful. I only see examples and information on how to deploy Postgresql dev, very little in...
You configured the NodePort of 30092 for your kafka broker so to be able to connect to it you should use <node-ip>:30092 as your bootstrap server address. If you're running minikube, you can find the node ip with the minikube ip command. (Although you mentioned that the connection to your zookeeper at localhost:30181 w...
###Instruction: I'm trying to deploy kafka on local k8s, then I need to connect to it by application and using offset explorer so, using kubectl I created zookeeper service and deployment using this yml file apiVersion: v1 kind: Service metadata: labels: app: zookeeper-service name: zookeeper-service spec: ty...
I'm trying to deploy kafka on local k8s, then I need to connect to it by application and using offset explorer so, using kubectl I created zookeeper service and deployment using this yml file apiVersion: v1 kind: Service metadata: labels: app: zookeeper-service name: zookeeper-service spec: type: NodePort p...
When you apply the helm release it convert the Helm template to K8s resources like deployment, configmap, secret, statefulset and those values get applied and stored to etcd datastore of K8s. Still helm also create the secret for release so if you check the kubectl -n <namespace> get secret there will be secrets. Secre...
###Instruction: Alice deployes a chart from her computer to a k8s cluster. Bob runs helm ls -a on that cluster and sees Alice's chart. I am looking for any configmaps on my cluster that could hold chart info but cant find any. Where is it then? ### Response: When you apply the helm release it convert the Helm template...
Alice deployes a chart from her computer to a k8s cluster. Bob runs helm ls -a on that cluster and sees Alice's chart. I am looking for any configmaps on my cluster that could hold chart info but cant find any. Where is it then?
Helm is like a package manager. It can install applications on your cluster, but it has only some basic logic for updates to its configuration or for version upgrades. You control it through the helm commands and call it when you need it. So it helps you with some tasks, but it is still up to you to run your Kafka clus...
###Instruction: Can anyone explain in simple terms what is the difference between deploying Kafka through Kubernetes operator (for example Strimzi ) and Kafka helm chart or manifest file? Previously in my project we used helm chart for kafka but for now we've received requirement to move to kafka strimzi-operator. I ca...
Can anyone explain in simple terms what is the difference between deploying Kafka through Kubernetes operator (for example Strimzi ) and Kafka helm chart or manifest file? Previously in my project we used helm chart for kafka but for now we've received requirement to move to kafka strimzi-operator. I can't access peopl...
Eks does not provide the ability to override the default scheduler configuration, which means that actually configuring the default-scheduler profile with the MostAllocated scoring strategy is not an option. However, you may run your own scheduler alongside the default scheduler, and this one may be configured how you...
###Instruction: We would like to pack as many pods into each nodes in our cluster as much as possible do decrease the amount of nodes we have on some of our environments. I saw https://github.com/kubernetes-sigs/descheduler HighNodeUtilization strategy which seems to fit the bill for what we need. However, it seems the...
We would like to pack as many pods into each nodes in our cluster as much as possible do decrease the amount of nodes we have on some of our environments. I saw https://github.com/kubernetes-sigs/descheduler HighNodeUtilization strategy which seems to fit the bill for what we need. However, it seems the cluster needs t...
As David suggested there is no option to control the log target. However as requested for log collector application writing this answer. If your application is streaming the UDP logs you can use the Graylog Opensource. It uses Mongo & Elasticsearch as backend databases. We been using Graylog to collect logs from the ap...
###Instruction: I know docker has options like syslog log-driver and log-opts so that it can be used to send the logs to say, the UDP server. Marathon is the docker orchestrator here and a config file has the below: { "key": "log-driver", "value": "syslog" }, { "key": "log-opt", "val...
I know docker has options like syslog log-driver and log-opts so that it can be used to send the logs to say, the UDP server. Marathon is the docker orchestrator here and a config file has the below: { "key": "log-driver", "value": "syslog" }, { "key": "log-opt", "value": "syslog-add...
This is a tricky problem requiring in-depth explanation of GitLab and Kubernetes dynamics. Summary of your problem: volumes: - .:/var/www/html # or # - /builds/projects/laravel-api:/var/www/html The Docker service you are using does not share the same filesystem than your job's Pod. When you instruct ...
###Instruction: I am having a problem with my GitLab pipeline when trying to mount a docker volume inside a container. Before I explain the problem, first I will describe my whole setup, because I think that is very essential to understand the problem, because I think that this is the reason why I am having this proble...
I am having a problem with my GitLab pipeline when trying to mount a docker volume inside a container. Before I explain the problem, first I will describe my whole setup, because I think that is very essential to understand the problem, because I think that this is the reason why I am having this problem. Setup Okay, s...
You can configure Kubernetes to use your host's DNS resolver by setting up dnsPolicy for the pod by selecting either Default or ClusterFirstWithHostNet. The first option uses the cluster DNS if available, and falls back to the host's DNS resolver if none is found. The second option uses the cluster DNS first, and fall...
###Instruction: Kubernetes cluster is running on a node (Virtual Machine) which gets its network configuration from a DHCP server (this includes DNS settings). From within a pod I need to be able to reach external resources identified by FQDN. The DNS on the K8 node (VM) is able to solve the FQDN to an IP address but h...
Kubernetes cluster is running on a node (Virtual Machine) which gets its network configuration from a DHCP server (this includes DNS settings). From within a pod I need to be able to reach external resources identified by FQDN. The DNS on the K8 node (VM) is able to solve the FQDN to an IP address but how could I make ...
I solved the same issue and the problem was with different MLRun version between client side and server side. I had MLRun on client in version 1.2.1rc2 and server side in version 1.2.1 (these versions have different interfaces and it generates freez issue). Please, synch MLRun versions between client and server and it ...
###Instruction: I got freez of Sklearn-classifier in MLRun (the job is still running after 5, 10, 20, ... minutes), see log output: 2023-02-21 13:50:15,853 [info] starting run training uid=e8e66defd91043dda62ae8b6795c74ea DB=http://mlrun-api:8080 2023-02-21 13:50:16,136 [info] Job is running in the background, pod: tra...
I got freez of Sklearn-classifier in MLRun (the job is still running after 5, 10, 20, ... minutes), see log output: 2023-02-21 13:50:15,853 [info] starting run training uid=e8e66defd91043dda62ae8b6795c74ea DB=http://mlrun-api:8080 2023-02-21 13:50:16,136 [info] Job is running in the background, pod: training-tgplm see...
Try this one-liner: while [ true ]; do echo $(date) $(date +%s) $(kubectl top -n your-namespace pod $(kubectl get pods -n your-namespace -l your-label-name=your-label-value -o jsonpath='{..metadata.name}') | tail -n 1) | tee -a /path/to/save/your/logs.txt; done Add sleep 300 to sample it every 5 minutes instead of con...
###Instruction: I am running a load test over a kubernetes pod and i want to sample every 5 minutes the CPU and memory usage of it. I was currently manually using the linux top command over the kubernetes pod. Is there any way given a kubernetes pod to fetch the CPU/Memory usage every X minutes and append it to a file ...
I am running a load test over a kubernetes pod and i want to sample every 5 minutes the CPU and memory usage of it. I was currently manually using the linux top command over the kubernetes pod. Is there any way given a kubernetes pod to fetch the CPU/Memory usage every X minutes and append it to a file ?
Some generic thoughts on Helm charts vs. operators: A Helm chart directly includes Kubernetes YAML files using the Go text/template language. An operator has actual code, frequently written in Go using the Kubernetes SDK, that creates the same objects. If you're going to install some application, using a Helm chart it...
###Instruction: Can anyone explain in simple terms what is the difference between deploying Kafka through Kubernetes operator (for example Strimzi ) and Kafka helm chart or manifest file? Previously in my project we used helm chart for kafka but for now we've received requirement to move to kafka strimzi-operator. I ca...
Can anyone explain in simple terms what is the difference between deploying Kafka through Kubernetes operator (for example Strimzi ) and Kafka helm chart or manifest file? Previously in my project we used helm chart for kafka but for now we've received requirement to move to kafka strimzi-operator. I can't access peopl...
After some testing, here is a working nginx.conf - http{ server { listen 81; set $target "http://127.0.0.1:80"; location / { proxy_pass $target; proxy_set_header Host $host; } } } New directive - proxy_set_header Host $host; Trailing slash removed from...
###Instruction: I have a strange result from using nginx and IIS server together in single Kubernetes pod. It seems to be an issue with nginx.conf. If I bypass nginx and go directly to IIS, I see the standard landing page - However when I try to go through the reverse proxy I see this partial result - Here are the fi...
I have a strange result from using nginx and IIS server together in single Kubernetes pod. It seems to be an issue with nginx.conf. If I bypass nginx and go directly to IIS, I see the standard landing page - However when I try to go through the reverse proxy I see this partial result - Here are the files: nginx.conf:...
But the client rep said this might cause problems in a Kubernetes pod, relating to access rights and process monitoring among other things. There is nothing special about kubernetes with respect to child processes and access rights. It's just Unix processes: a child runs with the same credentials as the parent and ca...
###Instruction: As an IT contractor, I was tasked with fixing an issue in a client's software which made simple use of a third-party library to encrypt or decrypt byte strings. For reasons relating to AWS temporary access tokens, the library required occasional reinitialisation for a fresh access token to be acquired (...
As an IT contractor, I was tasked with fixing an issue in a client's software which made simple use of a third-party library to encrypt or decrypt byte strings. For reasons relating to AWS temporary access tokens, the library required occasional reinitialisation for a fresh access token to be acquired (via AWS EKS) and...
If the encoded data is a string and not binary data, you can decode it to a UTF-8 string using the @base64d filter. This should be available in jq 1.6. $ ./etcdctl ... | jq '.[][] | (.key, .value) |= @base64d' { "key": "by-dev/meta/snapshots/root-coord/partitions/440047424618365170/440047424618365171_ts44004948989181...
###Instruction: Is there any easy command line option to export my entire ETCD database to json file but also decode the keys and values automatically from base64? What I succeeded to the moment is this(example show 1x key/value): ./etcdctl get "" --prefix -w json | jq -r ".[] | .[] " { "key": "YnktZGV2L21ldGEvc...
Is there any easy command line option to export my entire ETCD database to json file but also decode the keys and values automatically from base64? What I succeeded to the moment is this(example show 1x key/value): ./etcdctl get "" --prefix -w json | jq -r ".[] | .[] " { "key": "YnktZGV2L21ldGEvc25hcHNob3RzL3Jvb...
I had to set output format to json. >kubectl get nodes Unable to connect to the server: getting credentials: decoding stdout: couldn't get version/kind; json parse error: json: cannot unmarshal string into Go value of type struct { APIVersion string "json:\"apiVersion,omitempty\""; Kind string "json:\"kind,omitempty\""...
###Instruction: error: Couldn't get available api versions from server: couldn't get version/kind; json parse error: json: cannot unmarshal string into Go value of type struct { APIVersion string "json:\"apiVersion,omitempty\""; Kind string "json:\"kind,omitempty\"" } ### Response: I had to set output format to json. ...
error: Couldn't get available api versions from server: couldn't get version/kind; json parse error: json: cannot unmarshal string into Go value of type struct { APIVersion string "json:\"apiVersion,omitempty\""; Kind string "json:\"kind,omitempty\"" }
You are right topology spread constraints is good for one deployment. There could be many reasons behind that behavior of Kubernetes. One could be like you have set the Resource request & limit which K8s think is fine to Run both on Single Node so it's scheduling both pods on the same Node. Or you have not at all set a...
###Instruction: I have set of pods belonging to different deployments. All are configured to run as single replicas. Further, i have 2 nodes in my cluster. Now, when i try to schedule my pods, all pods get deployed to same node. its very rare that i see my pods are going to another node. Due to this, my one node is alw...
I have set of pods belonging to different deployments. All are configured to run as single replicas. Further, i have 2 nodes in my cluster. Now, when i try to schedule my pods, all pods get deployed to same node. its very rare that i see my pods are going to another node. Due to this, my one node is always under memory...
@Jun's answer worked mostly for me, but the secretName values have to be different. Otherwise, you'll get this error: Warning BadConfig 12m cert-manager-ingress-shim spec.tls[0].secretName: Invalid value: "api-ingress-cert": this secret name must only appear in a single TLS entry but is also used in spec...
###Instruction: I have setup a backend and frontend service running on Kubernetes. Frontend would be www.<myDomain>.com and backend would be api.<myDomain>.com I need to expose and secure both services. I wish to use one ingress. I want to use free certificates from let's encrypt + cert manager. I guess a certificate f...
I have setup a backend and frontend service running on Kubernetes. Frontend would be www.<myDomain>.com and backend would be api.<myDomain>.com I need to expose and secure both services. I wish to use one ingress. I want to use free certificates from let's encrypt + cert manager. I guess a certificate for <myDomain>.co...
I believe Knative 1.9 requires Kubernetes 1.23 or newer. One of the changes that happened in the last year or so was the removal of the v2beta2 autoscaling API and replacement with v2 API. I believe the new API is present in Kubernetes 1.22, but Knative 1.9 was tested with the community supported versions as of Januar...
###Instruction: I followed the official instruction to installing knative serving on a self-built k8s cluster. But when running the second line kubectl apply -f https://github.com/knative/serving/releases/download/knative-v1.9.2/serving-core.yaml I got unable to recognize "https://github.com/knative/serving/releases/d...
I followed the official instruction to installing knative serving on a self-built k8s cluster. But when running the second line kubectl apply -f https://github.com/knative/serving/releases/download/knative-v1.9.2/serving-core.yaml I got unable to recognize "https://github.com/knative/serving/releases/download/knative-...
I solved the issue by escaping quotes and double quotes of the SecRule in the configmap as follows: SecRule REQUEST_URI|ARGS|QUERY_STRING \"@contains attack\" \"id:100001,phase:1,t:lowercase,deny,status:403,msg:\'Attack Detected\'\"
###Instruction: I created the following configMap for my NGINX ingress controller: apiVersion: v1 data: allow-snippet-annotations: "true" enable-modsecurity: "true" enable-owasp-modsecurity-crs: "true" modsecurity-snippet: |- SecRuleEngine On SecRequestBodyAccess On SecAuditLog /dev/stdout SecAu...
I created the following configMap for my NGINX ingress controller: apiVersion: v1 data: allow-snippet-annotations: "true" enable-modsecurity: "true" enable-owasp-modsecurity-crs: "true" modsecurity-snippet: |- SecRuleEngine On SecRequestBodyAccess On SecAuditLog /dev/stdout SecAuditLogFormat JSO...
Executing both minikube delete and minikube start has solved the problem for me
###Instruction: I'm getting below error when I try to run the minikube after downloading its binary:- ❌ Exiting due to GUEST_START: wait: /bin/bash -c "sudo env PATH="/var/lib/minikube/binaries/v1.22.3:$PATH" kubeadm init --config /var/tmp/minikube/kubeadm.yaml --ignore-preflight-errors=DirAvailable--etc-kubernetes-m...
I'm getting below error when I try to run the minikube after downloading its binary:- ❌ Exiting due to GUEST_START: wait: /bin/bash -c "sudo env PATH="/var/lib/minikube/binaries/v1.22.3:$PATH" kubeadm init --config /var/tmp/minikube/kubeadm.yaml --ignore-preflight-errors=DirAvailable--etc-kubernetes-manifests,DirAvai...
Is it necessary to enable Vertical or Horizontal Pod Autoscaling in GKE Autopilot Clusters? Not necessary, but if using autopilot it's about leveraging the option to scale nodes without worry and just you focus on HPA & VPA. For a GKE cluster is configured with Autopilot, does it make sense to also enable autoscalin...
###Instruction: For a GKE cluster configured with Autopilot, does it make sense to also enable autoscaling? In the document Compare GKE Autopilot and Standard, it says the auto scaler are optional. Also node auto-provisioning says: With Autopilot clusters, you don't need to manually provision nodes or manage node pool...
For a GKE cluster configured with Autopilot, does it make sense to also enable autoscaling? In the document Compare GKE Autopilot and Standard, it says the auto scaler are optional. Also node auto-provisioning says: With Autopilot clusters, you don't need to manually provision nodes or manage node pools because node p...
Damn, Solved :) --- apiVersion: metallb.io/v1beta1 kind: L2Advertisement metadata: name: lb-pool namespace: metallb-system spec: ipAddressPools: - lb-pool Seems that L2Advertisement was missing according to : https://github.com/kubernetes/ingress-nginx/blob/main/docs/deploy/baremetal.md
###Instruction: So, here is my current setup My experience is mostly on openshift, but I'm trying to get familiar with kubernetes... and I'm a bit noob in KS8 :) kubernets + callico + external storage(nfs) + metallb + ingress-nginx kubectl get nodes -o wide NAME STATUS ROLES AGE VERSION INTER...
So, here is my current setup My experience is mostly on openshift, but I'm trying to get familiar with kubernetes... and I'm a bit noob in KS8 :) kubernets + callico + external storage(nfs) + metallb + ingress-nginx kubectl get nodes -o wide NAME STATUS ROLES AGE VERSION INTERNAL-IP EXTE...
It's a type assertion, as @peter suggested in the comment.
###Instruction: While I'm reading how to test on k8s with the fake client on this link, I noticed this function, which, IIUC, assigns a faked server version to the faked k8s cluster. k8s.clientset.Discovery().(*discoveryfake.FakeDiscovery).FakedServerVersion = &version.Info{ Major: expectedMajor, ...
While I'm reading how to test on k8s with the fake client on this link, I noticed this function, which, IIUC, assigns a faked server version to the faked k8s cluster. k8s.clientset.Discovery().(*discoveryfake.FakeDiscovery).FakedServerVersion = &version.Info{ Major: expectedMajor, ...
You can use the Scaling policy with the HPA Example scaleUp: stabilizationWindowSeconds: 0 policies: - type: Pods value: 3 periodSeconds: 5 selectPolicy: Max it will add the 3 PODs every 5 second until HPA metrics become steady. Ref doc : https://github.com/kubernetes/enhancements/blob/mast...
###Instruction: We want our deployment to have 3/6/9/etc replicas at all times to have an even AZ spread. Is there a way to achieve this via HPA config ? ### Response: You can use the Scaling policy with the HPA Example scaleUp: stabilizationWindowSeconds: 0 policies: - type: Pods value: 3 peri...
We want our deployment to have 3/6/9/etc replicas at all times to have an even AZ spread. Is there a way to achieve this via HPA config ?
Try this: kubectl create secret generic airflow-postgresql -n airflow --from-literal=password='postgres' --dry-run=client -o yaml | kubectl apply -f - I think the error is due to the helm create the airflow-postgresql's secrets using "postgres-password" as the key while the helm update expects "password" as the key. O...
###Instruction: I am getting the following error on installing a custom docker image as a revision. I am not able to figure out the reason. So far I have tried adding secrets with the password and it didn't work helm upgrade --install airflow apache-airflow/airflow -n airflow -f values.yaml --debug history.go:56: [debu...
I am getting the following error on installing a custom docker image as a revision. I am not able to figure out the reason. So far I have tried adding secrets with the password and it didn't work helm upgrade --install airflow apache-airflow/airflow -n airflow -f values.yaml --debug history.go:56: [debug] getting histo...
You can mount your local kubeconfig file to the Docker image that you are trying, not sure if the way you follow Env variable option is suggested anywhere or not Try something like : docker run --publish-all --name kubeview -v ./config:/.kube/config ghcr.io/benc-uk/kubeview:0.1.31 ./config - will the path of your ~/.k...
###Instruction: Based on the KubeView README, I tried to run KubeView using the container provided here. I run: $ docker run --publish-all --name kubeview ghcr.io/benc-uk/kubeview:0.1.31 I get the following output: 2023/03/12 18:06:45 ### Kubeview v0.1.31 starting... 2023/03/12 18:06:45 ### Connecting to Kubernetes......
Based on the KubeView README, I tried to run KubeView using the container provided here. I run: $ docker run --publish-all --name kubeview ghcr.io/benc-uk/kubeview:0.1.31 I get the following output: 2023/03/12 18:06:45 ### Kubeview v0.1.31 starting... 2023/03/12 18:06:45 ### Connecting to Kubernetes... 2023/03/12 18:0...
It might be perfectly possible to mount your own secrets into the /var/run/secrets or /run/secrets path. Even in the scenario where Kuberbetes is concurrently using that path for system-related tasks. This commonly happens when, for instance, you are running a cluster with 2+ nodes and Kubernetes starts projecting it'...
###Instruction: I do have an existing application that used docker and docker compose so far. I want to operate this app in a Kubernetes cluster. Shouldn't be a big deal, right? But so far I failed because of the used secrets. The application expects a secret to be present in a file at: /run/secrets/webhook_secret, whe...
I do have an existing application that used docker and docker compose so far. I want to operate this app in a Kubernetes cluster. Shouldn't be a big deal, right? But so far I failed because of the used secrets. The application expects a secret to be present in a file at: /run/secrets/webhook_secret, where webhook_secre...
You can use the K8s network polcies to block the traffic across the namespace or services. So with network policy, you will be able to restrict the traffic across the namespaces, PODs based on the labels, selectors etc. With network policy service will be able to resolve the IP in DNS but the Network policy won't allow...
###Instruction: I can resolve a DNS name on the internal kubernetes DNS with a value like: http://serviceNameExampleAbc.default.svc.cluster.local where serviceExampleAbc relates to the IP of the service by name serviceExampleAbc... However, how can I instead only resolve this to the service IP only if it has a specific...
I can resolve a DNS name on the internal kubernetes DNS with a value like: http://serviceNameExampleAbc.default.svc.cluster.local where serviceExampleAbc relates to the IP of the service by name serviceExampleAbc... However, how can I instead only resolve this to the service IP only if it has a specific label to it? Fo...
Nginx Ingress does not support TCP or UDP services You can follow this guide the setup & expose the TCP service : https://kubernetes.github.io/ingress-nginx/user-guide/exposing-tcp-udp-services/ Here is my YAML config file for RabbitMQ i have used --- apiVersion: v1 kind: ConfigMap metadata: name: tcp-services name...
###Instruction: I have a k8 deployment (using minikube) for ActiveMQ-Artemis. In this I'm exposing ports for broker(61616) and console(8161) both. Pointing the ports to service. It is working fine. and also I configured an Ingress Controller for the console. Service.yaml kind: Service metadata: name: artemis-service ...
I have a k8 deployment (using minikube) for ActiveMQ-Artemis. In this I'm exposing ports for broker(61616) and console(8161) both. Pointing the ports to service. It is working fine. and also I configured an Ingress Controller for the console. Service.yaml kind: Service metadata: name: artemis-service spec: type: Cl...
Yes, I have encountered the issue multiple times. You definitely want to keep the memory limit for the k8 to avoid the noisy neighbour problems. The possible solutions you have mentioned are right. Monitoring and load testing are a must to arrive at the number. Along with these, I used the profiling of Java processes t...
###Instruction: I would like to know, if there is an optimal approach for setting memory limits for Kubernetes containers, especially for applications running java. For Java applications, we have to set a heap value in conjunction with Kubernetes resources. it's like we're kinda forced to guess at a memory limit for t...
I would like to know, if there is an optimal approach for setting memory limits for Kubernetes containers, especially for applications running java. For Java applications, we have to set a heap value in conjunction with Kubernetes resources. it's like we're kinda forced to guess at a memory limit for the Kubernetes mi...
Looks like there is no auto-provisioning of k8s cluster you are running. You need to create Persistent Volume & Storage classes on local clusters manually by cluster admin. Create one provisioner and pass that to your storage class and give that storage class to a persistence volume template to create automatic PVC and...
###Instruction: While installing influxdb2 using k8s manifest from the link influxdb2 installation on k8s I get below "pod has unbound immediate PersistentVolumeClaims" error. The instruction is given for minikube but I am installing it as a normal k8s cluster. Any idea about the issue and how to fix. /home/ravi#kubec...
While installing influxdb2 using k8s manifest from the link influxdb2 installation on k8s I get below "pod has unbound immediate PersistentVolumeClaims" error. The instruction is given for minikube but I am installing it as a normal k8s cluster. Any idea about the issue and how to fix. /home/ravi#kubectl describe pod ...
This might help you: I am having same error in injected container istio-init. My system is : k8s 1.26 and istio 1.17.1, installed on rocky 8.5 stations. This solved my problem: 1. cat <<EOT >> /etc/modules-load.d/k8s.conf overlay br_netfilter nf_nat xt_REDIRECT xt_owner iptable_nat iptable_mangle iptable_filter EOT ...
###Instruction: I am new to Kubernetes, Istio and so on, so please be gentle :) I have minikube running, I can deploy services and they run fine. I have installed istio following this guide: https://istio.io/latest/docs/setup/install/istioctl/ If I tag the default namespace with kubectl label namespace default istio-in...
I am new to Kubernetes, Istio and so on, so please be gentle :) I have minikube running, I can deploy services and they run fine. I have installed istio following this guide: https://istio.io/latest/docs/setup/install/istioctl/ If I tag the default namespace with kubectl label namespace default istio-injection=enabled ...
This is issue with indentation. Here is proper deployment definition apiVersion: apps/v1 kind: Deployment metadata: name: django-k8-web-deployment labels: app: django-k8-web-deployment spec: replicas: 3 selector: matchLabels: app: django-k8-web-deployment template: metadata: labels: ...
###Instruction: apiVersion: apps/v1 kind: Deployment metadata: name: django-k8-web-deployment labels: app: django-k8-web-deployment spec: replicas: 3 selector: matchLabels: app: django-k8-web-deployment template: metadata: labels: app: django-k8-web-deployment spec: ...
apiVersion: apps/v1 kind: Deployment metadata: name: django-k8-web-deployment labels: app: django-k8-web-deployment spec: replicas: 3 selector: matchLabels: app: django-k8-web-deployment template: metadata: labels: app: django-k8-web-deployment spec: containers: ...
You are on the right path, If you don't want to SSH into the node and manual job, what you can do is like create one Daemonset and automate SSH process. Daemonset runs on all available nodes in Cluster. You can mount your shell script to Node path and execute it by doing SSH from Image. apiVersion: v1 kind: ServiceAcco...
###Instruction: I want to execute command on GCP GKE node but I need to do it without manually sshing to the machine. What I need: adding ntp.keys configuring ntp.conf restart ntp daemon (here I encountered a problem) Point 1 and 2 can be easly achived with DaemonSet. I mounted /etc/ntp/ directory to init container a...
I want to execute command on GCP GKE node but I need to do it without manually sshing to the machine. What I need: adding ntp.keys configuring ntp.conf restart ntp daemon (here I encountered a problem) Point 1 and 2 can be easly achived with DaemonSet. I mounted /etc/ntp/ directory to init container and created right...
Yes, a core is equal to 1e9 (1,000,000,000) nanocores. You can test this by seeing that, for example in Datadog, a metric like (kubernetes.cpu.usage.total / 1000000000) / kubernetes_state.node.cpu_allocatable * 100 gives you a percentage that should be capped at 100%. The 1st metric is measured in nanocores, and the 2n...
###Instruction: im confuse to convert nanocore to core of CPU my formula is: nanocore / 1000000000 = CORE (1000000000 is 1 billion) if my linux os have 10 core. I want to calculator percentage cpu usage. This formula is: (nanocore / 1000000000) / 10 * 100 = percentage cpu usage ? is it right ? ### Response: Yes, a cor...
im confuse to convert nanocore to core of CPU my formula is: nanocore / 1000000000 = CORE (1000000000 is 1 billion) if my linux os have 10 core. I want to calculator percentage cpu usage. This formula is: (nanocore / 1000000000) / 10 * 100 = percentage cpu usage ? is it right ?
I try to give you a little suggestion, let me know if it works. If you have an up&running Jenkins instance (with the Kubernetes plugin installed), you can go to “Manage Jenkins”/“Configure Clouds” and prepare your Pod Templates as you see fit. There you will also find the definition of nodeSelector and Toleration. Once...
###Instruction: I'm using Jenkins configuration as code (JCASC). I'm having a pod template and I want to add NodeSelector + Tolerations. podTemplate doesn't support key of tolerations and NodeSelector so I need to add pod YAML spec... agent: enabled: true podTemplates: podTemplates: ...
I'm using Jenkins configuration as code (JCASC). I'm having a pod template and I want to add NodeSelector + Tolerations. podTemplate doesn't support key of tolerations and NodeSelector so I need to add pod YAML spec... agent: enabled: true podTemplates: podTemplates: jenkins-slave-p...
I tried to reproduce the same in my environment I have created a virtual network gateway vnet local network gateway like below: In virtual network added gateway subnet like below: created local network gateway : On-premise try to configure Routing and remote access role in tools -> select custom configuration ->Vpn...
###Instruction: We have a requirement to connect a K8s POD to an Azure VPN Gateway in a secure manner. This is what our network topology is: Firstly is this possible to achieve and secondly how would we go about creating this peering? If peering isn't the best option then what would you recommend to solve this problem...
We have a requirement to connect a K8s POD to an Azure VPN Gateway in a secure manner. This is what our network topology is: Firstly is this possible to achieve and secondly how would we go about creating this peering? If peering isn't the best option then what would you recommend to solve this problem? TIA We have cr...
The fastest solution is surely to use kustomize. Following your data, first organize the repository by creating a folder called "base" and one called "dev". Then move the "my-cronjob" manifest into the "base" folder and add a kustomization.yaml file that invokes the CronJob. Finally, create a file called kustomization....
###Instruction: I want to build the the secretName dynamically base on the value of the my-label key (trough a ENV). Is this possible? I used the a similar approach to use label values as ARGs which worked. apiVersion: batch/v1beta1 kind: CronJob metadata: name: my-cronjob spec: schedule: "*/1 * * * *" jobTemplat...
I want to build the the secretName dynamically base on the value of the my-label key (trough a ENV). Is this possible? I used the a similar approach to use label values as ARGs which worked. apiVersion: batch/v1beta1 kind: CronJob metadata: name: my-cronjob spec: schedule: "*/1 * * * *" jobTemplate: spec: ...
If you have an on-prem set up and you can expose your cluster you can go with that creating the K8s cluster and managing it. Else are you planning to set up manually on cloud VMs? instead better to use managed one from Digital Ocean or Oracle OKE which may cost around $20-30 months if a small project. Now you have the ...
###Instruction: I am getting into CI/CD and Microservices. I want to try Kubernetes for a project that I am starting. I spent the last two weeks learning about those topics. But I don't have the knowledge to make the decision. I would like to know if for a small project is better to setup Kubernetes in my server or pay...
I am getting into CI/CD and Microservices. I want to try Kubernetes for a project that I am starting. I spent the last two weeks learning about those topics. But I don't have the knowledge to make the decision. I would like to know if for a small project is better to setup Kubernetes in my server or pay a Cloud service...
If your changes are very specific to your project and not something that can be merged into the original repo, or you have legal loopholes to jump through, you can fork the original code and periodically sync up with the upstream. The process is outlined here: https://docs.github.com/en/pull-requests/collaborating-wit...
###Instruction: so I am creating a system composed of different components that are installed via helm charts. Since I needed different customizations for each of the charts, I created my own separated repositories, copied the charts there and added customizations. The question is: how do I conveniently upgrade the cha...
so I am creating a system composed of different components that are installed via helm charts. Since I needed different customizations for each of the charts, I created my own separated repositories, copied the charts there and added customizations. The question is: how do I conveniently upgrade the charts versions, wh...
There is a blog K8s where various aspects of the topic "Warnings" are explained. https://kubernetes.io/blog/2020/09/03/warnings/#deprecation-warnings In summary, these have been introduced since version 1.19 and you can’t remove them easily (unless you use the k8s.io/client-go library to modify the K8s API). https://ku...
###Instruction: I am trying to understand where is this warning coming from ? I have disabled the PSP support in my cluster and indeed using k8s version lower than 1.25. But I want to understand and disable this warning. Is it possible ? Which controller is responsible to handle this WARNING? kubectl get psp -A Warning...
I am trying to understand where is this warning coming from ? I have disabled the PSP support in my cluster and indeed using k8s version lower than 1.25. But I want to understand and disable this warning. Is it possible ? Which controller is responsible to handle this WARNING? kubectl get psp -A Warning: policy/v1beta1...
This was fixed by deploying the CRDs separately. There seem to be more issues with a few objects and CRDs within the kube-prometheus-stack and loki charts, however, I can close this one.
###Instruction: I am using the non HA version of ArgoCD (v2.6.5) installed in a single node k3s cluster. The goal is to deploy a sample application together with kube-prometheus-stack, loki, tempo & minIO via Helm. However, when I create an "Application" in Github and reference it in Argocd, all of them are in "Out of ...
I am using the non HA version of ArgoCD (v2.6.5) installed in a single node k3s cluster. The goal is to deploy a sample application together with kube-prometheus-stack, loki, tempo & minIO via Helm. However, when I create an "Application" in Github and reference it in Argocd, all of them are in "Out of sync" state. Onc...
there is no way to mount a Volume in a certain folder without overwriting its contents. In my opinion the best approaches could be: The first one reported by you (for large content): a. Create PVC b. Add an initContainer to your Deployment that mount the Volume in a DIFFERENT path from the directory containing the dat...
###Instruction: I have a question about Kubernetes containers and persistent volumes. How can I make some of the preexisting folders of a Kubernetes container persistent? I know the usage of PVCs in Kubernetes but the problem about mounting a PVC to a container is that this operation -naturally- deletes everything in t...
I have a question about Kubernetes containers and persistent volumes. How can I make some of the preexisting folders of a Kubernetes container persistent? I know the usage of PVCs in Kubernetes but the problem about mounting a PVC to a container is that this operation -naturally- deletes everything in the mount path. e...
PREMISE: Every node in the cluster configures itself to listen on that assigned port and to forward traffic to one of the ready endpoints associated with that Service. You'll be able to contact the type: NodePort Service, from outside the cluster, by connecting to any node using the appropriate protocol (for example: ...
###Instruction: I'm pretty new to Kubernetes, I have docker for mac, not minikube. I have the deployment file running with one pod (containing an express app) in the cluster, then i created a NodePort service. Inside the express app i have a get request to '/posts' and I want to access it from the localhost. i have thi...
I'm pretty new to Kubernetes, I have docker for mac, not minikube. I have the deployment file running with one pod (containing an express app) in the cluster, then i created a NodePort service. Inside the express app i have a get request to '/posts' and I want to access it from the localhost. i have this service file h...
A some time ago, ingress-nginx allows multiple origins. See issue https://github.com/kubernetes/ingress-nginx/issues/5496 Example of usage: nginx.ingress.kubernetes.io/cors-allow-origin: "https://example.com, https://another.com, http://localhost:8000"
###Instruction: It's currently possible to allow a single domain or subdomain but I would like to allow multiple origins. I have tried many things like adding headers with snipets but had no success. This is my current ingress configuration: kind: Ingress apiVersion: extensions/v1beta1 metadata: name: nginx-ingress ...
It's currently possible to allow a single domain or subdomain but I would like to allow multiple origins. I have tried many things like adding headers with snipets but had no success. This is my current ingress configuration: kind: Ingress apiVersion: extensions/v1beta1 metadata: name: nginx-ingress namespace: defa...
If the second code works, I'd assume there is an embedded struct, and looking at the code (assuming it's this) that appears to be the case: type Node struct { metav1.TypeMeta `json:",inline"` // Standard object's metadata. // More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-co...
###Instruction: I'm trying to create a k8s node struct and assign default value to it. The following code complains "unknown field Name in struct literal" node = &corev1.Node{Name: pod.Spec.NodeName} However, this code is fine: node = &corev1.Node{} node.Name = pod.Spec.NodeName why? ### Response: If the second code...
I'm trying to create a k8s node struct and assign default value to it. The following code complains "unknown field Name in struct literal" node = &corev1.Node{Name: pod.Spec.NodeName} However, this code is fine: node = &corev1.Node{} node.Name = pod.Spec.NodeName why?
The given commands does not work for me. I have created a few manifests that you can apply in your cluster to automatically delete the Pods matching the criteria with a kubernetes CronJob. https://github.com/tyriis/i-see-dead-pods this is working for me kubectl get pods \ --all-namespaces \ -o go-te...
###Instruction: I have an issue with my GKE cluster. I am using two node pools: secondary - with standard set of highmen-n1 nodes, and primary - with preemptible highmem-n1 nodes. Issue is that I have many pods in Error/Completed status which are not cleared by k8s, all ran on preemptible set. THESE PODS ARE NOT JOBS. ...
I have an issue with my GKE cluster. I am using two node pools: secondary - with standard set of highmen-n1 nodes, and primary - with preemptible highmem-n1 nodes. Issue is that I have many pods in Error/Completed status which are not cleared by k8s, all ran on preemptible set. THESE PODS ARE NOT JOBS. GKE documentatio...
try the ingress config like apiVersion: extensions/v1beta1 kind: Ingress metadata: annotations: certmanager.k8s.io/cluster-issuer: core-prod kubernetes.io/ingress.class: nginx nginx.ingress.kubernetes.io/proxy-read-timeout: "1800" nginx.ingress.kubernetes.io/proxy-send-timeout: "1800" nginx.ingres...
###Instruction: I am trying to make socket connection from react application to nodejs server hosted on GKE. I am getting connection error "Connection closed before it was established". HTTP connection working fine. dev.host.com is used for frontend and dev.host.com/api is used for backend and included in ingress.yml f...
I am trying to make socket connection from react application to nodejs server hosted on GKE. I am getting connection error "Connection closed before it was established". HTTP connection working fine. dev.host.com is used for frontend and dev.host.com/api is used for backend and included in ingress.yml file below. Can i...
It isn't possible to do this in a single step. But you can: Access the K8s cluster where PVC exists Create a Deployment (or single Pod) that mounts PVC on the path you prefer (Example /xyz) Run kubectl -n NAMESPACE cp POD_NAME:/xyz /tmp/ to locally copy the contents of the /xyz folder to the /tmp path Logout fro...
###Instruction: I have a k8s cluster which uses rancher.io/local-path. There is a PV there $ kubectl describe pv pvc-979af6ff-3617-4707-8a2c-b6c4ac00043f Name: pvc-979af6ff-3617-4707-8a2c-b6c4ac00043f Labels: <none> Annotations: pv.kubernetes.io/provisioned-by: rancher.io/...
I have a k8s cluster which uses rancher.io/local-path. There is a PV there $ kubectl describe pv pvc-979af6ff-3617-4707-8a2c-b6c4ac00043f Name: pvc-979af6ff-3617-4707-8a2c-b6c4ac00043f Labels: <none> Annotations: pv.kubernetes.io/provisioned-by: rancher.io/local-path F...
Debug pointers: Application Level Check if you have a /test endpoint in your service what does it respond with. Because based on your test requests, with the IP you made request to / and with DNS you made a request to /test K8s Service Level Port forward the service and try to run it on your local machine. kubectl...
###Instruction: ENV: k8s: v1.20.5 ingress-nginx: v1.6.4 I created ingress-nginx-controller from offical yaml: https://raw.githubusercontent.com/kubernetes/ingress-nginx/controller-v1.6.4/deploy/static/provider/baremetal/deploy.yaml and I changed the network type to hostnetwork: hostNetwork: true Then I created a dep...
ENV: k8s: v1.20.5 ingress-nginx: v1.6.4 I created ingress-nginx-controller from offical yaml: https://raw.githubusercontent.com/kubernetes/ingress-nginx/controller-v1.6.4/deploy/static/provider/baremetal/deploy.yaml and I changed the network type to hostnetwork: hostNetwork: true Then I created a deployment to creat...
As of Kubernetes 1.22, swap memory is supported (as an alpha feature). Configure the node's host OS with a swap memory device (e.g., with swapon or /etc/fstab); Configure kubelet on that node to: still start despite detecting the presence of swap (disable fail-on-swap), enable the NodeSwap feature gate, and configure...
###Instruction: I need to add swap memory in kubernates pod. so that if any pods exceeds the available RAM then it can use the swap memory from hard disk. is that possible in kubernates? ### Response: As of Kubernetes 1.22, swap memory is supported (as an alpha feature). Configure the node's host OS with a swap memor...
I need to add swap memory in kubernates pod. so that if any pods exceeds the available RAM then it can use the swap memory from hard disk. is that possible in kubernates?