Questions tagged [kubernetes]

SOFTWARE DEVELOPMENT-RELATED INQUIRIES ONLY FOR KUBERNETES. Discussions about configuration and deployment are not permitted in this context. An easy guideline to follow is that if the matter pertains to activities outside the pod, it's likely to be irrelevant. However, queries regarding code functionality within the pod are generally acceptable.

Encountering an issue when attempting to add a CustomResourceDefinition in AKS, specifically when trying to execute it using

I am facing an issue with adding customresourcedeployment in aks. Previously, we were using the V1beta1 version which appears to be deprecated now. I have attempted to transition to the v1 version, but encountered a schema validation error. The original V1 ...

Encountering connection closure while using the http GET method in a Node.js application with Express framework

My issue involves receiving a connection close header in response when making a GET request, but the connection remains keep-alive for POST requests. My current setup includes an AWS ALB directing traffic to EKS. Within EKS, there is an NGINX ingress rout ...

Managing incoming server events from multiple pods

Currently, I am developing a NodeJS server that has an /events endpoint for sending events to clients using SSE. In addition to this endpoint, there are multiple routes for handling POST requests. I am faced with the challenge of setting up this system so ...

Upgrading GKE results in terminating Pods that have ongoing requests

Our team has been facing challenges with the Google Kubernetes Engine (GKE) as regular upgrades to newer versions are causing disruptions in our cluster's pods and containers. While we understand the importance of updates, the issue arises when the cluster ...

Apologies, we were unable to establish a connection as the server refused to respond on the specified IP address and port

kubectl get namespace default Active 3h33m ingress-nginx Active 3h11m kube-node-lease Active 3h33m kube-public Active 3h33m kube-system Active 3h33m kubectl get services -n ingress-nginx NAME ...

Converting personal injury claims into configuration maps with the help of jq

Here is my input: { "apiVersion": "apps/v1", "kind": "Deployment", "spec": { "template": { "spec": { "containers": [ { "volum ...

Building a Next.js application in a docker container on a local machine using minikube is successful, however, the build fails when attempting to build it on a staging environment

I've encountered a puzzling issue. My next.js app is running in a docker container. It builds successfully on my local Ubuntu machine with minikube and ks8 orchestration, but it gets stuck indefinitely during the build process on the staging setup. The ha ...

Encountering a glitch while attempting to generate a fresh Kubernetes configuration file using NodeJs and sed

My approach involves utilizing the Shelljs and sed command to create a new K8S configuration file shell.exec(`sed -e s%${server}%${endpoint}%g -e s%${certificate}%${cert}%g config-temp`) shell.exec("cat config-temp | tee config") Subsequently, I validate ...

Deployment replacement in Kubernetes encounters error

I've developed a NodeJS script to deploy review apps to Kubernetes for my GitLab repository, using the Kubernetes NodeJS client. Including abbreviated definitions of Kubernetes resources for thoroughness: const k8s = require('@kubernetes/client-node'); ...

Operating multiple containers with kubernetes for job processing

Currently, I am facing a challenge with processing multiple files in s3 using k8s. To address this, I have set up a job on k8s that consists of around 500 containers, each with different environments. However, the job is running very slowly and has failed ...

Locating and fixing a memory leak in a ReactJS/NextJS/ApolloClient web application

https://i.stack.imgur.com/qXcZM.png Dealing with a memory leak in my new web application has proven to be quite challenging. Despite the fact that it did not manifest during local development, every 18 hours, a Kubernetes pod hosting a web client runs out ...

Configuration of Kubectl on Google Cloud Platform

Recently, I created a cluster in gcloud with three nodes. Everything seemed to be going well until I encountered an error while trying to run the pod. Upon investigation, it turned out that my kubectl configuration was not set up correctly. The specific er ...

Creating a critical section in a multi-instance Node.js application in a Kubernetes environment - a step-by-step guide

Recently, I encountered a situation where an interval is set up in Node.js to send periodic emails in a MEAN stack application running on multiple instances in a Kubernetes deployment. However, I noticed that the interval was triggered for all instances ...

Metric count in Datadog decreasing across various containers

When using Python, I am incrementing a Datadog counter: from datadog import initialize from datadog import ThreadStats stats.increment('api.request_count', tags=['environment:' + environment]) I have configured the metric type as "cou ...

ErrorHookWebpack: When executing npm build in the node container, the service is detected as inactive

Encountering an issue when executing npm run build within a container on Kubernetes during a gitlab-ci job. It's worth noting that npm install, npm run lint, and npm run test all completed without any problems. Error: node@runner-7gbsh-sz-project-9665-con ...

Challenges with Socket.io in Kubernetes Deployment

I am currently developing a collaborative whiteboard application that utilizes socket.io to communicate with MongoDB. The backend-service, which is in a separate pod from the whiteboard pod, handles all communication. For example: whiteboard app -> backen ...

Selenium Maven in Jenkins Kubernetes plugin is able to fetch dependencies but struggles with compiling

I have modified this example from the Jenkins Kubernetes plugin documentation Recently, I set up a basic Jenkins pipeline job and included the groovy script. While Maven successfully fetched all the dependencies, it unexpectedly crashed during the compila ...

What is the best way to make a service in minikube accessible from another device on the same network?

I have set up a service in minikube (expressjs API) on my local machine. When I start the service using minikube service wedeliverapi --url, I am able to access it from my browser at localhost:port/api. https://i.stack.imgur.com/Rhm3B.png https://i.stack ...

Deploying a Next JS app using Gitlab CI/CD to a Kubernetes cluster may result in ENV_VARS being set to "undefined"

I've been grappling with this issue for quite some time now: In my standard NextJS app, I'm utilizing environment variables (such as NEXT_PUBLIC_MY_VAR for the client side and MY_OTHER_VAR for the server side). I'm using Gitlab's CI-C ...

Encountering 404 or 502 errors when running multiple vue.js containers in a Kubernetes and Terraform environment

I'm currently facing an issue with my setup involving Ingress, Terraform, NGINX, and Kubernetes. It's serving a vue.js frontend and a .NET Core backend successfully online. However, when I try to add another Vue.JS instance, it fails to redirect properly t ...

The process.env.NEXT_PUBLIC variable in NextJS seems to be cleared out in production environments

I am facing an issue with my NextJS app "^11.1.2" when deploying it using Dockerfile and CI/CD to production. The problem arises with the rendering of my process.env variables Within my client-side code, I have the following line that should be rendered a ...

Adding a secure npm repository to a docker container using kubernetes/skaffold deployment strategy

I'm currently facing challenges with building my application on a local cluster using skaffold, k8s, and docker. In particular, I have a code repository that requires a private NPM package, but during the build process, it seems to lose the .npmrc file or ...

Encounter an error message stating "Request failed with status code 502 nginx in Next.js TypeScript."

After setting up Next.js typescript with Kubernetes NGINX Ingress, I encountered a problem where specific routes were returning a 502 error. For example, the route /test works fine, but /login does not. I'm unsure whether the issue lies with Kubernete ...

Unveiling the enigma: Kubernetes deployment rendered with undefined environmental

I recently posted a question on Stack Overflow having a similar issue. I followed the instructions provided in the answer of this post: How to get access to Kubernetes container environment variables from Next.js application?. However, even after calling m ...

Selenium KEDA encountered a FailedGetExternalMetric Warning due to the inability to retrieve the external metric

Currently, I am utilizing selenium KEDA for auto-scaling purposes. However, upon reviewing the HPA logs, I stumbled upon an error stating that it FAILED to retrieve the Metrics. I would greatly appreciate any guidance or assistance in resolving this issue ...

Is there a way to connect to a Kubernetes worker node from a master node without using SSH?

I am looking to develop a Python script that can connect to a Kubernetes worker node, retrieve a list of network interfaces, capture traffic from a selected interface using tcpdump, and then save the resulting pcap file on the master node. Is there a way ...

Managing traffic in Google Kubernetes Engine (GKE)

I am encountering an issue with our website deployment on GKE, which consists of 10 pods. When deploying a new version, we use MAXsurge=1 and MAXunavailable=0. Upon trying to access the website during a new deployment, I sometimes only see the header in t ...

Storing kubernetes secrets securely within GitHub Actions

We are currently implementing the use of github actions, with a focus on securely storing sensitive information like kubeconfig within github's secrets. A GitHub secret has been set up under the name KUBECONFIG1 Steps to Replicate The GitHub secret shoul ...

A guide on integrating runtime environmental variables in a NextJS application

Currently, I am deploying a NextJS app across multiple K8 environments, each with its own set of variables that need to be passed. Although I can pass these variables and retrieve them using getServerSideProps(), the issue arises as this function only work ...

Having trouble connecting to PyMongo DB deployed on Kubernetes environment

After successfully running my application on Docker, I encountered an issue with the database connection when migrating to Kubernetes. The error message received is: pymongo.errors.ServerSelectionTimeoutError pymongo.errors.ServerSelectionTimeoutError: co ...

The Docker image is functioning properly, but the Kubernetes Pod running Ubuntu is encountering issues. The log reveals the error "/bin/sh: [npm,start]: not

Currently enrolled in a Kubernetes course and encountering an issue while trying to create a pod within Kubernetes. My setup includes Ubuntu, AMD64 I followed the steps (here) to install microk8s.kubectl This is my Dockerfile, functioning correctly with ...

Is it better to allocate more cores or more nodes in Express (NodeJS)? (Exploring the Pros and Cons with Case

When operating Express (NodeJS) in an environment like Kubernetes, which approach is more cost-effective: having more cores and fewer nodes, or having more nodes with fewer cores each? (Assuming a linear cost of cpus per node, for example, 1 node with 4 co ...

Executing Tasks in Kubernetes

As I work on developing a scraping app using multiple Selenium scripts that are interdependent, I've realized the potential benefits of utilizing Kubernetes for this project. However, in order to make this setup successful, I need to establish communi ...

Error encountered while transitioning to Kubeflow Pipelines version 2 due to JSON decoder issue

Reference: https://github.com/kubeflow/pipelines/issues/7608 I encountered an issue while transitioning a code file from Kubeflow v1 to Kubeflow v2. The code file runs smoothly on Kubeflow v1, but upon moving it to Kubeflow v2, I received the following er ...

Integrating an AKS cluster with an application gateway in Kubernetes. Several websites (not sub pages) directing to a shared IP address

In the past, our system functioned with Docker swarm and multiple services like nginx, nodejs/auth, and web app all linked to an application gateway. Each tenant/customer had their own URL mapped to the app gateway IP, allowing for customized pages based o ...

Setting up a Health check endpoint in Next.js: A step-by-step guide

I currently have an application deployed on Kubernetes (Google Cloud). To ensure the deployment runs smoothly, it must return a 200 status response to endpoints "/healthz" and "/". In my Express server, I've set up a route that handles this like so: ...

Is it possible to modify the URL path between the ingress and service?

I have a docker image that is serving its server on / (root). In my ingress, I already have a service called homepage that corresponds to the /. My goal is: Visiting / should redirect me to the home page. Visiting /custom should lead me to the docker ser ...

Unable to reach the ingress service from inside the cluster

Recently dipping my toes into kubernetes, I've got minikube up and running on my linux mint 20. Currently working to implement server-side rendering with nextjs, and I've used helm to install ingress-nginx. ingess-service.yaml : apiVersion: netw ...