prompt stringlengths 65 38.7k | response stringlengths 41 29.1k |
|---|---|
<p>My pod metrics stopped working on a local <code>minikube</code> deployment. It appears similar to an <a href="https://github.com/kubernetes/kubernetes/issues/94281" rel="nofollow noreferrer">issue reported a while back</a>, but I don't see the same error messages in the logs. The node statistics are working fine:</p... | <p>Either switching to <code>hyperkit</code> or making sure that there are enough resources available resolved the issue. Perhaps <code>metrics-server</code>, same as the <code>ingress-dns</code> only works reliably with the <code>hyperkit</code> driver or requires a certain amount of available resources. Below are ste... |
<p>Having read the Quasar framework's description for <a href="https://quasar.dev/quasar-cli-webpack/handling-process-env" rel="nofollow noreferrer">Handling process.env</a>, I understand that it is possible to add environment variables <strong>when building the application</strong> for development or production.</p>
<... | <p>This is how I sorted my requirement that works perfectly for my use case.
A quick review of what I wanted to do: Be able to pass in environment variables via a docker-compose file to a Vue.js application to allow different team members to test different development APIs depending on their assignment(localhost if run... |
<p>Going through blogs/official sites, I installed kubectl and minikube. After successful installation of both, I executed the following command.</p>
<pre><code>minikube start --driver=hyperv
</code></pre>
<p>After executing the above command I am struck and the process is not completed at all as mentioned below screen... | <p>Maybe this can help (from here <a href="https://stackoverflow.com/questions/56327843/minikube-is-slow-and-unresponsive">Minikube is slow and unresponsive</a>):</p>
<p><strong>1)</strong> Debugging issues with minikube by adding <code>-v</code> flag and set debug level (0, 1, 2, 3, 7).</p>
<p>As example: <code>miniku... |
<p>I have a website that is developed by WordPress. Recently I try to activate Google CDN for this website. My host provider is not google. After installing CDN it takes almost 3 hours to activate SSL. I replaced the IP that I created in A record of the website. I get this error :</p>
<pre><code>ERR_TOO_MANY_REDIRECT
<... | <p>Yes, you can use the Cloud CDN with <strong>external</strong> original also.</p>
<p>we were running it before and moved WordPress to GKE for redirect SSL error try adding snippet into <code>config.php</code> once, plus make sure inside database <code>wp_option or wp_setting</code> table have site URL are using <stro... |
<p>I'm still a noob, so go gentle on me please!</p>
<p>I have an eks cluster running with this node group configs:</p>
<pre><code>resource "aws_eks_node_group" "this" {
cluster_name = aws_eks_cluster.this.name
node_group_name = local.cluster_name
node_role_arn = aws_iam_role.eks_node.arn
... | <p>according to the message <code>0/2 nodes are available: 2 Too many pods.</code>, you can find the node can not be placed any pods. In EKS, the number of max pods could be placed in the node would based on several things <code>instance type</code> & <code>cni</code>. By default, you can refer this document <a hre... |
<p>i'm working with Minikube to make a full stack K8s application using React as a frontend and ASP NET Core as a backend.
Here there are my configuration</p>
<p>Deployments and Services</p>
<pre class="lang-yaml prettyprint-override"><code>apiVersion: v1
kind: ServiceAccount
metadata:
name: web-frontend
---
apiVersi... | <p>To contact or make links between apps you could use their kubernetes native FQDN ( try to ping or telnet it if you want to test the connection but here is how it works:
Thr default FQDN of any service is:</p>
<pre><code> <service-name>.<namespace>.svc.cluster.local.
</code></pre>
<p>In your above example... |
<p>We have a dozen of services exposed using a ingress-nginx controller in GKE.</p>
<p>In order to route the traffic correctly on the same domain name, we need to use a rewrite-target rule.</p>
<p>The services worked well without any maintenance since their launch in 2019, that is until recently; when cert-manager sudd... | <p>Please share the cluster issuer or issue you are using.</p>
<p><strong>ingressClass</strong></p>
<blockquote>
<p>If the <strong>ingressClass</strong> field is specified, <code>cert-manager</code> will create
new <strong>Ingress</strong> resources in order to route traffic to the
<code>acmesolver</code> pods, which a... |
<p>I want block outgoing traffic to the ip (eg-DB) in IP tables in K8s.</p>
<p>I know that in K8s ip tables exist only at node level.</p>
<p>and I'm not sure in which file changes should be made and what is the command or changes required.</p>
<p>Please help me with this query.</p>
<p>Thanks.</p>
| <p>You could deploy istio and specifically the istio egress gateway.</p>
<p>This way you will be able to manage outgoing traffic within the istio manifest</p>
|
<p>If I run, for example, <code>kubectl logs --namespace kube-system kube-apiserver-XXXX | head -n 25</code> I can see the output with only a timestamp and no date. I can't tell if these are from the inception of the pod or not.</p>
<p>Generally speaking, how long do a pod's logs last in Kubernetes?</p>
| <p><a href="https://unofficial-kubernetes.readthedocs.io/en/latest/concepts/cluster-administration/logging/#:%7E:text=Kubernetes%20performs%20log%20rotation%20daily,five%20logging%20rotations%20per%20container." rel="nofollow noreferrer">From k8s unofficial docs</a></p>
<blockquote>
<p>Kubernetes performs log rotation ... |
<p>i am trying GCP and GKE google kubernetes engine.
1-)i am create a cluster
2-)i opened cloud shell and used command "kubectl get nodes"</p>
<p>i get this error:
"The connection to the server localhost:8080 was refused - did you specify the right host or port?"</p>
<p>how can i solve. thanks.</p>
| <p>You must have a local Kubernetes config file that is used by <code>kubectl</code> to access cluster(s).</p>
<p>Conventionally, the config file is called <code>config</code> (YAML) and is found in <code>${HOME}/.kube/config</code>.</p>
<p>Google provides a way to generate a config file (and context) for you. To do th... |
<p>I'm using ArgoCD for gitops deployments right now and I have k8s manifest files that require configMap values to be built (via helm right now). However, ArgoCD does not allow me to use helm lookup feature so I can't have that in my helm chart.</p>
<p>I have a helm chart that uses helm lookup to pull values from a c... | <p>I think this is a well-known issue for ArgoCD to work with helm, I think the below thread will be helpful for you.
<a href="https://github.com/argoproj/argo-cd/issues/5202" rel="nofollow noreferrer">https://github.com/argoproj/argo-cd/issues/5202</a></p>
|
<p>When running following command to update kubernetes config to get connected with EKS cluster then getting this error "'NoneType' object is not iterable"</p>
<pre><code>aws eks update-kubeconfig --region us-east-2 --name <cluster name>
</code></pre>
| <p>Do you have an existing k8s config? Running</p>
<p><code>aws eks update-kubeconfig --region <region> --name <cluster name></code></p>
<p>Generates a ~/.kube/config.</p>
<p>If you already have a ~/.kube/config, there could be a conflict between the file to be generated, and the file that already exists th... |
<p>Is there a way to connect C# Thick Client running in the Windows Machine outside of the Kubernetes with Apache Ignite Cluster nodes are present in the Kubernetes.</p>
<p>Below specified article says it is not possible but this article was written in 2020. We are looking for Scenario-3 from below article
<a href="htt... | <p>The recommendation here would be to use the thin-client. The .net thin-client does have the data streamer API.</p>
<p>There is no straight-forward way to connect a thick-client node from outside Kubernetes to a cluster inside it.</p>
|
<p>I've pod with two containers, one is creating a file and one delete it, I was able to create the file but not to delete it. I want it to delete the files every 2 hours, how can I make it work in clean way? we dont want to use cron job...</p>
<pre><code>apiVersion: v1
kind: Pod
metadata:
name: its
s... | <p>This is what works for me</p>
<pre><code>apiVersion: v1
kind: Pod
metadata:
name: mc1
spec:
volumes:
- name: html
emptyDir: {}
containers:
- name: 1st
image: nginx
command: ["/bin/sh", "-c"]
args:
- while true; do
touch /usr/share/nginx/html/test.txt;
... |
<p>I need to get the current date in Helm with the following format YY-MM-DD. I'm trying <code>{{ now | date }}</code> but this returns an error because the number of arguments expected by date is two, not one.</p>
| <p>Try Format the date to YEAR-MONTH-DAY:</p>
<pre><code>{{ now | date "20060102150405" }}
</code></pre>
<p>Source <a href="http://masterminds.github.io/sprig/date.html" rel="nofollow noreferrer">here</a>:</p>
<p>or add the following annotation :</p>
<pre><code>annotations:
deploymentTime: {{ now | date &q... |
<p>I want to delete a specific file from a cronJob to the following container, the problem is that when I run exec I got error, how can I exec to distroless container (k8s v1.22.5) and delte the file from a cronJob, which option do we have?</p>
<p>this is the deployment</p>
<pre><code>apiVersion: apps/v1
kind: Deployme... | <p>The point of using <code>distro-less</code> is to have a minimal amount of tools/software packaged in the image. This means the removal of unnecessary tools like <code>shell</code> from the image.</p>
<p>You may work around using, however it may depend on your objective:</p>
<pre><code>kubectl debug -it <POD_TO_D... |
<p><s>I set up a Kubernetes cluster in my private network and managed to deploy a test pods:</p>
<p>now I want to expose an external ip for the service:</p>
<p>but when I run:</p>
<pre><code>kubectl get deployments kube-verify
</code></pre>
<p>i get:</p>
<pre><code>Error from server (NotFound): deployments.apps "k... | <p>First you need to get the deployment by</p>
<pre><code>$ kubectl get deployment
NAME READY UP-TO-DATE AVAILABLE AGE
test-deployment 1/1 1 1 15m
</code></pre>
<p>If you have used any namespace then</p>
<pre><code>$ kubectl get deployment -n your-namesapce
</code></pre>
... |
<p>Earlier today I had increased my Docker desktop resources, but when ever since it restarted Kubernetes has not been able to complete its startup. Whenever I try to run a kubectl command, I get <code>Unable to connect to the server: EOF</code> in response.</p>
<p>I had thought that it started because I hadn't delet... | <p>I'll share that what solved this for me was Docker Desktop settings feature for "<strong>reset kubernetes cluster</strong>". I know that @shenyongo said that a "reset kubernetes" didn't work, and I suppose they mean this.</p>
<p>But <strong>for the sake of other readers who may find this</strong>... |
<p>Hey im trying to cross account access for a role. <strong>i have 2 accounts: prod and non-prod</strong>.
and <strong>bucket in prod account</strong>, which im trying to write files to there from a non-prod role which is used as a service account in k8s cluster.</p>
<p><strong>in prod account i configured:</strong>
a... | <p>If you're getting the error <code>An error occurred (InvalidIdentityToken) when calling the AssumeRoleWithWebIdentity operation: No OpenIDConnect provider found in your account for $oidc_url</code> when trying to cross-account assume roles, but you can assume roles in your cluster account normally, here's some point... |
<p>When I try to install a Helm chart with a template file:</p>
<pre class="lang-yaml prettyprint-override"><code>{{ if eq .Release.Namespace "fedx-app-1100" }}{{ $nodePort := 30106 }}{{ end }}
apiVersion: v1
kind: Service
metadata:
name: mysql
namespace: {{ .Release.Namespace }}
labels:
app: mysql... | <p>Just try this</p>
<pre><code>{{ if eq .Release.Namespace "fedx-app-1100" }}{{ $nodePort := 30106 }}
apiVersion: v1
kind: Service
metadata:
name: mysql
namespace: {{ .Release.Namespace }}
labels:
app: mysql
spec:
type: NodePort
ports:
- port: 3306
targetPort: 3306
nodePort: {{ $node... |
<p>I am trying to patch, clear Node conditions in OpenShift and/or Kubernetes cluster on a worker node. Patch isn't working, trying even workarounds, maybe update the key in etcd.</p>
<p>Main problem that i created new node conditions and then i removed them but they are not removed from list although they are no longe... | <p>Posting answer from comment as Community Wiki.</p>
<p>I found the fix, you can edit whatever you want in the node description by updating the etcd key <code>/kubernetes.io/minions/<node-name></code></p>
<p><strong>Edit:</strong>
Finally I found a way to patch and update the Node condition type status, add new ... |
<p>Currently have Istio deployed to handle the ingress to my applications. Running into an issue where one app needs to be reachable via a certain URL such as "http://gateway/webapp1" and I need it to route internally to:
server-name1:8080/some/odd/name/path</p>
<p>The current match statement I have is:</p>
<... | <p>You can use the <strong>HTTP rewrite</strong> with the virtual service before sending traffic further</p>
<pre><code>apiVersion: networking.istio.io/v1alpha3
kind: VirtualService
metadata:
name: ratings-route
spec:
hosts:
- ratings.prod.svc.cluster.local
http:
- match:
- uri:
prefix: /webapp1
... |
<p>we have an application deployed on AWS EKS, with these components:</p>
<ul>
<li>Apache Artemis JMS</li>
<li>PostgreSQL</li>
<li>Kafka</li>
<li>and some application stateless pods made in node.js</li>
</ul>
<p>Which is the best approach to move the entire application from one nodegroup to another?</p>
<p>We were thin... | <p>I would just add nodeselectors of nodeaffinity and then delete the running pods (so they will be rescheduled on the correct nodes)</p>
|
<p>I am running Rancher Desktop on my ubuntu laptop.
I have a container running mongodb in a kubernetes container:</p>
<pre><code>$ kubectl get all
NAME READY STATUS RESTARTS AGE
pod/mongo-deployment-7fb46bd85-vz9th 1/1 Running ... | <p>i found a solution: it seems that the ip returned by
<code>kubectl get node -o wide</code>
is not usable to acess services from the kubernetes node, in Rancher Desktop (it is working in other kubernetes cluster named "kind" (<a href="https://kind.sigs.k8s.io/" rel="nofollow noreferrer">https://kind.sigs.k8... |
<p>This is more of an architecture question. I have a data engineering background and have been using airflow to orchestrate ETL tasks using airflow for a while. I have limited knowledge of containerization and kuberentes. I have a task to come up with a good practice framework for productionalizting our Data science m... | <p>Normally people schedule the container or PODs as per need on top of k8s cluster, however, I am not sure how frequent you need to crate the k8s cluster.</p>
<p><strong>K8s cluster setup :</strong></p>
<p>You can create the K8s cluster in different ways that are more dependent on the cloud provider and options they p... |
<p>I deployed the images of microservices currency-conversion and currency-exchange on Google cloud but in the Kubernetes Engine, I see that the pods/replica sets are not available.</p>
<p>When I check under Workload tab, I see that the service shows a message "Does not have minimum availability"</p>
<p><a hr... | <p>The pod is crashing hence why you're getting "Does not mean minimum availability"</p>
<p>You should look at the logs of the container first and see why its crashing</p>
<p><code>kubectl logs -n default {name of pod}</code></p>
|
<p>I have application that is using Helm charts to be deployed. On first <code>helm upgrade --install</code> command everything works as expected but second time I have this error:</p>
<pre><code>Error: UPGRADE FAILED: failed to replace object: PersistentVolumeClaim "logs" is invalid: spec: Forbidden: is immu... | <p>Removing --force from helm upgrade solved my issue.</p>
|
<p>We have several sites running under a CMS using virtual machines. Basically we have three VM running the CMS and a SQL instance to store data. We plan to transition to containers, but to be honest I'm don't have much idea about it and my boss plans to have the full app (CMS and DB) within an image and then deploy as... | <p>Short answer is: No.</p>
<p>It's best practice with containers to have one process per container. The container has an entrypoint, basically a command that is executed when starting the container. This entrypoint will be the command that starts your process. If you want more than one process, you need to have a scri... |
<p>I deployed the images of microservices currency-conversion and currency-exchange on Google cloud but in the Kubernetes Engine, I see that the pods/replica sets are not available.</p>
<p>When I check under Workload tab, I see that the service shows a message "Does not have minimum availability"</p>
<p><a hr... | <p>Many reasons could be there behind failure:</p>
<ul>
<li>Low Resources so POD are not starting or pending</li>
<li>Liveness or Readiness failing for PODs</li>
<li>Configmap or secret which POD require to start is not available</li>
</ul>
<p>You can describe the POD or check the logs of POD to debug more issue</p>
<p... |
<p>I am using the following chart to deploy a Cassandra cluster to my gke cluster.
<a href="https://github.com/k8ssandra/k8ssandra/tree/main/charts/k8ssandra" rel="nofollow noreferrer">https://github.com/k8ssandra/k8ssandra/tree/main/charts/k8ssandra</a></p>
<p>However, the statefulset stuck in state 1/2 (the cassandra... | <p>The message in the <code>cassandra</code> container says it should resolve itself once Cassandra is up and running which is correct.</p>
<p>Similarly no logs are available with the <code>server-system-logger</code> container until Cassandra has started and more precisely, not until the logging framework has initiali... |
<p>I am new to Kubernetes, and planning on moving some of my ECS services to EKS. In my current auto-scaling algorithm, apart from CPU, memory and some other things I also used rate of incoming requests. In Kubernetes, how can I leverage rate of incoming requests to customize auto-scaling?</p>
| <p>You can use the <strong>Prometheus</strong> adapter along with the HPA to scale the deployment based on incoming requests or other metrics you want.</p>
<p><a href="https://github.com/kubernetes-sigs/prometheus-adapter/blob/master/docs/walkthrough.md" rel="nofollow noreferrer">https://github.com/kubernetes-sigs/prom... |
<p>Below is the logic in my docker file.
I am using nginx to build the application.</p>
<pre><code>FROM node:14-alpine as builder
COPY package.json ./
RUN npm install && mkdir /app && mv ./node_modules ./app
WORKDIR /app
COPY . .
RUN npm run build
FROM nginx:1.16.0-alpine
COPY --from=builder /app/b... | <p>If you want to dynamically mount the <strong>nginx.conf</strong> I would suggest using the <strong>config map</strong> with your <strong>deployment.yaml</strong></p>
<p>So this way you re-use your docker image multiple times without recreating it and pass the <strong>config map</strong> to update it.</p>
<p>You dock... |
<p>I see that normally a new image is created, that is, a dockerfile, but is it a good practice to pass the cert through environment variables? with a batch that picks it up and places it inside the container</p>
<p>Another approach I see is to mount the certificate on a volume.</p>
<p>What would be the best approximat... | <p>Definitely do <strong>not</strong> bake certificates into the image.</p>
<p>Because you tagged your question with <code>azure-aks</code>, I recommend using the Secrets Store CSI Driver to mount your certificates from Key Vault.</p>
<ul>
<li>See the <a href="https://github.com/Azure/secrets-store-csi-driver-provider-... |
<p>I have used Kubernetes and I deployed for example WordPress or nginx or etc. We install from the YAML file. Where is it installed how can i find directory of pages(for example WordPress pages etc.) at same point at Google Cloud too. When I use Kubernetes at Google Cloud where is the path of installed files(ex. index... | <p>If you are running the docker image <strong>directly</strong> without attaching anything like NFS, S3 or Disk then you will be able to get those files by default in the container file system(index.php and all).</p>
<p>With any <strong>K8s</strong> cluster you check files inside <strong>container</strong> either Gclo... |
<p>Imagine a scenario where I have 3 classes of worker node (A,B,C) and 2 master nodes (X,Y) as part of a Kubernetes cluster. There maybe multiple worker nodes of each class. Is it possible to route the traffic such that traffic arriving at the different master nodes is routed to a different set of worker nodes. For ex... | <p>As correctly pointed out in the comments, the traffic is not handled by the master nodes; its responsibility, at a high level, is to observe and maintain the desired state of the Kubernetes resources deployed in the worker nodes, as well as to push any changes to them.</p>
<p>That being said, yes, it is possible to ... |
<p>I have a kubernetes service, written in Go, and am using <code>client-go</code> to access the kubernetes apis.</p>
<p>I need the <code>Pod</code> of the service's own pod.</p>
<p>The <code>PodInterface</code> allows me to iterate all pods, but what I need is a "self" concept to get the currently running po... | <p>Expose the <code>POD_NAME</code> and <code>POD_NAMESPACE</code> to your pod as environment variables. Later use those values to get your own pod object.</p>
<pre class="lang-yaml prettyprint-override"><code>apiVersion: v1
kind: Pod
metadata:
name: dapi-envars-fieldref
spec:
containers:
- name: test-container... |
<p>First of all, let me thank you for this amazing guide. I'm very new to kubernetes and having a guide like this to follow helps a lot when trying to setup my first cluster!</p>
<p>That said, I'm having some issues with creating deploytments, as there are two pods that aren't being created, and remain stuck in the sta... | <p>Looks like you got pretty far! Support for docker as a container runtime was dropped in 1.24.0. I can't tell if that is what you are using or not but if you are that could be your problem.</p>
<p><a href="https://kubernetes.io/blog/2022/05/03/kubernetes-1-24-release-announcement/" rel="nofollow noreferrer">https://k... |
<p>Sorry if this question might sound "convoluted" but here it goes...</p>
<p>I'm currently designing a k8s solution based on Firecracker and Kata-containers. I'd like the environment to be as isolated/secure as possible. My thoughts around this are:</p>
<ol>
<li>deploy k8s masters as Firecracker nodes having... | <p>You might want to take a look at <a href="https://github.com/weaveworks-liquidmetal" rel="nofollow noreferrer">https://github.com/weaveworks-liquidmetal</a> and consider whether contributing to that would get you further towards your goal? alternative runtimes (like kata) for different workloads are welcomed in PR’s... |
<p>I am attempting to create a kubernetes ConfigMap with helm, which simply consists of the first line within a config file. I put my file in <code>helm/config/file.txt</code>, which has several lines of content, but I only want to extract the first. My first attempt at this was to loop over the lines of the file (natu... | <p>EDIT:<br />
I've determined the following is the cleanest solution:</p>
<pre><code>.Files.Lines "config/file.txt" | first
</code></pre>
<p>(As a side note, I had to pipe to <code>squote</code> in my acutal solution due to my file contents containing special characters)</p>
<hr />
<p>After poking around in ... |
<p>I have the following ingress...</p>
<pre><code>apiVersion: networking.k8s.io/v1
kind: Ingress
metadata:
name: core-ingress
namespace: earth
annotations:
kubernetes.io/ingress.global-static-ip-name: "core-proxy-static-ip"
nginx.ingress.kubernetes.io/rewrite-target: /
spec:
ingressClassName: ... | <p>Try something like :</p>
<pre><code>apiVersion: networking.k8s.io/v1
kind: Ingress
metadata:
name: ingress-myservicea
annotations:
kubernetes.io/ingress.global-static-ip-name: "core-proxy-static-ip"
nginx.ingress.kubernetes.io/rewrite-target: /
spec:
ingressClassName: nginx
rules:
- http:... |
<p>I hope somebody can help me.
I'm trying to pull a private docker image with no success. I already tried some solutions that I found, but without success.</p>
<p>Docker, Gitlab, Gitlab-Runner, Kubernetes all run on the same server</p>
<p>Insecure Registry</p>
<pre><code>$ sudo cat /etc/docker/daemon.json
{ "inse... | <p>First, you need to create a file in /etc/containerd/config.toml</p>
<pre><code># Config file is parsed as version 1 by default.
# To use the long form of plugin names set "version = 2"
[plugins.cri.registry.mirrors]
[plugins.cri.registry.mirrors."10.0.10.20:5555"]
endpoint = ["http://1... |
<pre class="lang-text prettyprint-override"><code>Error: failed to start container "node-exporter": Error response from daemon: path /sys is mounted on /sys but it is not a shared or slave mount
</code></pre>
<p>shows that message here is the repository I took it from trying to make a node exporter to Grafana... | <p>Well for me (Docker-Desktop in MacOS) this command saved my day:</p>
<pre><code>kubectl patch ds monitoring-prometheus-node-exporter --type "json" -p '[{"op": "remove", "path" : "/spec/template/spec/containers/0/volumeMounts/2/mountPropagation"}]'
</code></pre>
<p>cr... |
<p>I'm unable to get the controller working. Tried many times and still I get <code>Error: ImagePullBackOff</code>.</p>
<p>Is there a alternative that I can try or any idea why its failing?</p>
<pre><code> kubectl apply -f https://raw.githubusercontent.com/kubernetes/ingress-nginx/nginx-0.27.0/deploy/static/mandator... | <p>I had the same problem, with the <code>ingress-nginx</code> installation.</p>
<pre><code>kubectl apply -f https://raw.githubusercontent.com/kubernetes/ingress-nginx/controller-v1.2.0/deploy/static/provider/cloud/deploy.yaml
</code></pre>
<p>For some reason it couldn't get the ingress-nginx-controller.</p>
<pre><code... |
<p>I am trying to run kubectl virt commands to manage my virtual machine via PHP. First, I log in to my server with phpseclib with the following code:</p>
<pre><code>$ssh = new SSH2('localhost');
if (!$ssh->login('root', 'rootPassword')) {
throw new \Exception('Login failed');
}
</code></pre>
<p>This part works ... | <p>When you are issuing ad-hoc ssh commands, you are not using interactive shell, and depending on your default shell behavior it may or may not load your .bashrc file . See <a href="https://serverfault.com/questions/936746/bashrc-is-not-sourced-on-ssh-command">https://serverfault.com/questions/936746/bashrc-is-not-sou... |
<p>Is it possible to display Kubernetes (K8s) resources from multiple specified <code>namespaces</code> with <strong><em>only</em></strong> the CLI (<code>kubectl</code>)?</p>
<p>In other words, given two <code>namespaces</code> in a K8s cluster:</p>
<pre class="lang-shell prettyprint-override"><code>kubectl get namesp... | <p>You may use <code>go-template</code> to print the name of the pods belonging to the two namespaces, following is an example of printing pods from the <code>test-1</code> and <code>test-2</code> namespace.</p>
<pre><code>kubectl get pod -A -o go-template='{{range .items}}{{if or (eq .metadata.namespace "test-1&q... |
<p>I have a kubernetes cluster into which I'm intending to implement a service in a pod - the service will accept a grpc request, start a long running process but return to the caller indicating the process has started. Investigation suggests that <code>IHostedService</code> (<code>BackgroundService</code>) is the way ... | <blockquote>
<p>Investigation suggests that IHostedService (BackgroundService) is the way to go for this.</p>
</blockquote>
<p>I <a href="https://blog.stephencleary.com/2021/01/asynchronous-messaging-1-basic-distributed-architecture.html" rel="nofollow noreferrer">strongly recommend</a> using a durable queue with a sep... |
<p>Hi i have been trying to do cpu pinning in my eks cluster. i have used amazon linux latest release, and my eks version is 1.22 . i have created a launch template where i have used this user data mentioned below.</p>
<pre><code>Content-Type: multipart/mixed; boundary="//"
MIME-Version: 1.0
--//
#!/bin/bas... | <p>I had the same question. I added the following <code>userdata</code> script to my launch template</p>
<h2>User data script</h2>
<pre class="lang-sh prettyprint-override"><code>MIME-Version: 1.0
Content-Type: multipart/mixed; boundary="==MYBOUNDARY=="
--==MYBOUNDARY==
Content-Type: text/x-shellscript; char... |
<p>I'm pretty new to K8s.</p>
<p>I'm trying to make my app visible to the outside world. I have deployed <a href="https://docs.nginx.com/nginx-ingress-controller/installation/installation-with-helm/#configuration" rel="nofollow noreferrer">this</a> Nginx Ingress Controller with my apps, using Helm and <a href="https://... | <p>You should deploy the ingress controller only once as it can handle <em>all</em> ingress traffic for your whole cluster.</p>
<p>Sometimes it makes sense to deploy multiple, for example we run 2 ingress controller. 1 for internal traffic (private IP) and one for external traffic (public IP).</p>
<p>Once you have that... |
<p>I'm not clear what the difference is between <code>kubernetes_config_map, </code>kubernetes_config_map_v1<code>and</code>kubernetes_config_map_v1_data`?</p>
<p>e.g. <a href="https://registry.terraform.io/providers/hashicorp/kubernetes/latest/docs/resources/config_map" rel="nofollow noreferrer">https://registry.terra... | <p>The <code>v1</code> suffix was recently introduced in the Kubernetes provider (definitely after the <code>alpha</code> provider merge in version 2.4.0) to designate the usage of the Go package for the <code>v1</code> of the Kubernetes API. You can also view resources with the <code>v2</code> suffix for <code>v2</cod... |
<p>We're using gitlab for CI/CD.I'll include the script which we're using</p>
<pre><code>services:
- docker:19.03.11-dind
workflow:
rules:
- if: $CI_COMMIT_BRANCH == $CI_DEFAULT_BRANCH || $CI_COMMIT_BRANCH == "developer" || $CI_COMMIT_BRANCH == "stage"|| ($CI_COMMIT_BRANCH =~ (/^([A-Z]([0-9]... | <p>As already mentioned in <a href="https://stackoverflow.com/a/37904830/13097422">the question</a> in the comment section, you would need to execute a shell form, because the exec form won't do directly do variable substitution.</p>
<pre><code>ENTRYPOINT ["java","-Dspring.profiles.active= $env_var_name&... |
<p>I am using minikube (docker driver) with kubectl to test an agones fleet deployment. Upon running <code>kubectl apply -f lobby-fleet.yml</code> (and when I try to apply any other agones yaml file) I receive the following error:</p>
<pre><code>error: resource mapping not found for name: "lobby" namespace: ... | <p>In order to create a resource of kind <code>Fleet</code>, you have to apply the Custom Resource Definition (CRD) that defines what is a <code>Fleet</code> first.</p>
<p>I've looked into the YAML installation instructions of agones, and the <a href="https://raw.githubusercontent.com/googleforgames/agones/release-1.23... |
<p>I'm just trying to create a simple service account. Theoretically, kubectl automatically creates the secret and token for service accounts... But, not in my case... I've done this in <code>kube-system</code>, <code>default</code>, and new/other namespaces.</p>
<pre><code>me@mymachine ~ % kubectl create serviceaccoun... | <p>Docker-Desktop 4.7.1 includes the appropriate Kubernetes configuration for the controller manager and api service to automatically create secrets and tokens when creating a service account.</p>
<p>Docker-Desktop 4.8.x does not have this configuration. Fresh install or resetting the Kubernetes cluster will prevent th... |
<p>I have my deployment scaled across multiple pods. The requirement is that whenever the app starts up I want a piece of code to be executed. But I just want one pod to execute this code. How can this be achieved?</p>
<p>Right now I have a way - I set a flag in my DB and have my pods read the flag, which ever reads an... | <p>I believe this is right approach. All pods need to have a way to understand if someone else is processing the task and doing through DB is best option. The only drawback is what if while the pod which picks it up, couldnt update the flag status. What would happen in that case?</p>
<p>The other option that i could th... |
<p>I want to update my kubernetes cluster from 1.21 to 1.22, I should update ingress resources from v1beta1 to v1, how do I compare the resource definitions of v1beta1 and v1 to know what to update?</p>
| <p>You could check on internet first (example: <a href="https://docs.konghq.com/kubernetes-ingress-controller/latest/concepts/ingress-versions/" rel="nofollow noreferrer">https://docs.konghq.com/kubernetes-ingress-controller/latest/concepts/ingress-versions/</a> )</p>
<p>Or you could use <code>kubectl proxy</code> comm... |
<p>So I want to create a directory under the node kubernetes simulated via docker-desktop</p>
<p>When I am trying to do so I am getting this error</p>
<p>/ # mkdir pod-volume
mkdir: can't create directory 'pod-volume': Read-only file system</p>
<p>Any idea How can I fix this inside docker-desktop (used for kubernetes s... | <blockquote>
<p>The Kubernetes server runs locally within your Docker instance, is not
configurable, and is a single-node cluster.</p>
</blockquote>
<p><a href="https://docs.docker.com/desktop/kubernetes/" rel="nofollow noreferrer">https://docs.docker.com/desktop/kubernetes/</a></p>
<blockquote>
<p>Docker Desktop offer... |
<p>I found that there are two ingress-controllers, one is <code>jcmoraisjr/haproxy-ingress</code> and the other is <code>haproxytech/kubernetes-ingress</code> What is the difference between them?</p>
| <p>If you look at <a href="https://github.com/jcmoraisjr/haproxy-ingress" rel="nofollow noreferrer">https://github.com/jcmoraisjr/haproxy-ingress</a>, it is tagged "hacktoberfest" so possibly this one is that user's work on on the application at a <a href="https://en.wikipedia.org/wiki/Hackathon" rel="nofollo... |
<p>I have used <code>kubectl create serviceaccount sa1</code> to create service account. Then I used <code>kubectl get serviceaccount sa1 -oyaml</code> command to get service account info. But it returns as below.</p>
<pre><code>apiVersion: v1
kind: ServiceAccount
metadata:
creationTimestamp: "2022-05-16T08:03:5... | <p>In Kubernetes 1.24, ServiceAccount token secrets are no longer automatically generated. See <a href="https://github.com/kubernetes/kubernetes/blob/master/CHANGELOG/CHANGELOG-1.24.md#urgent-upgrade-notes" rel="noreferrer">"Urgent Upgrade Notes" in the 1.24 changelog file</a>:</p>
<blockquote>
<p>The <code>... |
<p>I'm trying to understand the Arch of Airflow on Kubernetes.</p>
<p>Using the helm and Kubernetes executor, the installation mounts 3 pods called: Trigger, WebServer, and Scheduler...</p>
<p>When I run a dag using the Kubernetes pod operator, it also mounts 2 pods more: one with the dag name and another one with the ... | <p>Airflow application has some components that require for it to operate normally: Webserver, Database, Scheduler, Trigger, Worker(s), Executor. You can read about it <a href="https://airflow.apache.org/docs/apache-airflow/stable/concepts/overview.html#architecture-overview" rel="nofollow noreferrer">here</a>.</p>
<p>... |
<p>Im new to kubernetes and this topic is confusing for me. I've learned that stateful set doesn't share the PV and each replica has it's own PV. On the other hand I saw the examples when one was using one pvc in stateful set with many replicas. So my question is what will happen then? As PVC to PV are bind 1:1 so one ... | <p>You should usually use a <a href="https://kubernetes.io/docs/concepts/workloads/controllers/statefulset/#volume-claim-templates" rel="nofollow noreferrer">volume claim template</a> with a StatefulSet. As you note in the question, this will create a new PersistentVolumeClaim (and a new PersistentVolume) for each rep... |
<p>I'm requesting some JSON data from a pod's web server via the Kubernetes API proxy verb. That is:</p>
<pre><code>corev1 = kubernetes.client.CoreV1Api()
res = corev1.connect_get_namespaced_pod_proxy_with_path(
'mypod:5000', 'default', path='somepath', path2='somepath')
print(type(res))
print(res)
</code></pre>
... | <p>Looking at the source code for <a href="https://github.com/kubernetes-client/python/blob/master/kubernetes/client/api/core_v1_api.py" rel="nofollow noreferrer">core_v1_api.py</a>. The method calls generally accept a kwarg named <code>_preload_content</code>.</p>
<p>Setting this argument to <code>False</code> instruc... |
<p>Im looking to scale my pods/nodes based on disk space. Is it possible? I see that i can scale based on cpu or memory, but how can i scale based on disk usage?</p>
| <p><strong>Yes</strong>, you can use a tool named <strong>Keda</strong>, basically, it gives you the option to scale based on anything.</p>
<p><a href="https://keda.sh/docs/1.4/scalers/prometheus/" rel="nofollow noreferrer">Here</a> is an example of scaling based on the sum of HTTP requests to your service; Keda will t... |
<p>Terraform <a href="https://registry.terraform.io/providers/hashicorp/google/latest/docs/resources/container_cluster" rel="nofollow noreferrer">google_container_cluster</a> example removes the default node pool.</p>
<pre><code>resource "google_container_cluster" "primary" {
name = "my-g... | <p>Those are system pods that get deployed on each node, maybe kube-dns, kube-proxy however metrics server and other if running as deployment those can be running as single replicas on one of node.</p>
<blockquote>
<p>What is the good way to have a node to deploy the system pods?</p>
</blockquote>
<p>Keep at least <str... |
<p>I have a <code>StorageClass</code> with <code>provisioner: kubernetes.io/aws-ebs</code></p>
<p>And I have a deployment where I need to mount some volumes. So, I need to use this <code>StorageClass</code></p>
<p>Here's my <code>sc.yaml</code></p>
<pre><code>apiVersion: storage.k8s.io/v1
kind: StorageClass
metadata:
... | <blockquote>
<p>I need to specify the storage class in my deployment. Can someone help me?</p>
</blockquote>
<p>Before we answer, first let's explain how <code>StroageClass</code>, <code>PersistentVolume</code>, <code>Persistent Volume Claim</code>.</p>
<h3>Terminology</h3>
<h4><code>StroageClass</code></h4>
<ul>
<li>W... |
<p>I deployed one ingress controller in a namespace by running the command:</p>
<pre><code>helm install nginx-ingress ingress-nginx/ingress-nginx \
--namespace kk \
--set controller.replicaCount=2 \
--set controller.nodeSelector."beta\.kubernetes\.io/os"=linux \
--set defaultBackend.nodeSelect... | <p>It's all about your internet connection. I've had the same problem.
Try using the specific version; that may help:</p>
<pre><code>helm install ingress-nginx ingress-nginx/ingress-nginx --version 3.7.1 --debug
</code></pre>
|
<p>I am using the opentelemetry-ruby otlp exporter for auto instrumentation:
<a href="https://github.com/open-telemetry/opentelemetry-ruby/tree/main/exporter/otlp" rel="nofollow noreferrer">https://github.com/open-telemetry/opentelemetry-ruby/tree/main/exporter/otlp</a></p>
<p>The otel collector was installed as a daem... | <p>The correct solution is to use the <a href="https://kubernetes.io/docs/tasks/inject-data-application/environment-variable-expose-pod-information/" rel="nofollow noreferrer">Kubernetes Downward API</a> to fetch the node IP address, which will allow you to export the traces directly to the daemonset pod within the sam... |
<p>I have two k8s operators say operatorA and operatorB . I have both custom resources present in microservice(helm/templates).</p>
<p>how can I make sure custom resource for operatorB applied only after operatorA custom resource is applied?</p>
| <p>there is no validation between the two CRDs, only your operator can affect by the installation order, therefore, all you need to do is to make sure that the CRDs will install before the operator itself.</p>
<p>you can achieve this by using a <code>crds</code> folder, you can read about this in the official <a href="... |
<p><a href="https://docs.aws.amazon.com/eks/latest/userguide/creating-a-vpc.html" rel="nofollow noreferrer">This</a> article from AWS states that recommended production setup for EKS is a mix of private and public subnets. Unfortunately it does not explain the 'why'.
What is wrong with the option 'only public subnets' ... | <p>This <a href="https://stackoverflow.com/questions/22188444/why-do-we-need-private-subnet-in-vpc">SO</a> seems to actually answer my question:</p>
<p>In particular the question in one of the comments:</p>
<blockquote>
<p>What is the advantage of a server on a private subnet with a NAT instance and a a server public s... |
<h2>Problem</h2>
<p>I would like to do the following:</p>
<ol>
<li>Create an image with Trivy and Docker installed</li>
<li>Run the container on Kubernetes</li>
<li>Schedule a CRON job to pull all images from a container registry and to scan them, and output the results to stdout</li>
</ol>
<h2>Question</h2>
<p>Is ther... | <p>I ended up doing the following:</p>
<ol>
<li>Creating an image with <a href="https://github.com/aquasecurity/trivy" rel="nofollow noreferrer">Trivy</a> and <a href="https://github.com/containers/skopeo" rel="nofollow noreferrer">Skopeo</a> installed</li>
<li>Downloading the docker images with Skopeo
<ul>
<li>skopeo ... |
<p>I am working on a problem to implement a helm chart with customize configMap and trying to populate the configMap based on the environment mode.</p>
<p>Values.yaml</p>
<pre><code>externalIPService:
ip: 1.1.1.1
port: 80
emsConfig: "receivers:
otlp:
protocols:
http:
processors:
batch:
exporters:
o... | <p>in this situation, you need to use <code>_halpers.tpl</code> file.</p>
<p>first, add this to the <code>_halpers.tpl</code> file:</p>
<pre><code>{{- define "appname.emsConfig" -}}
receivers:
otlp:
protocols:
http:
processors:
batch:
exporters:
otlp/ems:
endpoint: {{ .Values.externalIPService.i... |
<p>Anyone faced similar issue with helm, even with helm list I get that</p>
<p>query: failed to query with labels: stream error when reading response body, may be caused by closed connection. Please retry. Original error: stream error: stream ID 3; INTERNAL_ERROR; received from peer</p>
| <p>In my case I found that it was a timeout issues.</p>
<p>Below are the ways I debuged and fixed the issue.</p>
<p>debug</p>
<pre><code>helm ls --debug
</code></pre>
<p>delete older versions</p>
<pre><code>kubectl get secrets --all-namespace | grep -i <name of your helm chart>
kubectl delete secret <name here... |
<p>I am running a Kafka pod in Kubernetes with Rancher. I am using the confluent image and it is connecting properly to zookeeper. I am using the stable helm chart with the Kafka confluent image 5.3.1. I also added SSL encryption into Helm using this <a href="https://medium.com/weareservian/encryption-authentication-an... | <p>As mentioned by @Hamzatli, it is about liveness and readiness. K8s thinks that your pod is hitting a timeout issue and sends the SIGTERM to the pod for it to shutdown.</p>
<p>In your Helm Chart's values.yaml, there should be an option about liveness and/or readiness. Increase the initialDelaySeconds to a higher time... |
<p>I am working with a test environment that has around 10 kubernetes pods that I need to interact with a lot, especially port forwarding.</p>
<p>It takes me a lot of time every day to list pods, get pod name and use that in a command.</p>
<p>Since all my pods start with a fixed name, followed by some random string tha... | <p>You can do a port-forward on a service or controller, i.e. deployment, instead, which should be sufficient, given the assumption that you have a service or controller.</p>
<pre><code>kubectl port-forward svc/planning-api 8081:80
# or
kubectl port-forward deploy/planning-api 8081:8081
</code></pre>
<p>That removes th... |
<p>I am new at kubernetes so apologies in advance for any silly questions and mistakes. I am trying to setup external access through ingress for ArgoCD. My setup is an aws eks cluster. I have setup alb following the guide <a href="https://github.com/kubernetes-sigs/aws-load-balancer-controller/tree/v2.2.3/helm/aws-load... | <p>Service type needs to be NodePort.</p>
|
<p>I have a application of workload deployment and need to change it to statefulset</p>
<pre><code>apiVersion: apps/v1
kind: Deployment
metadata:
name: app
labels:
app: app
spec:
replicas: 1
selector:
matchLabels:
app: app
template:
metadata:
labels:
app: app
spec:
co... | <ul>
<li>If you want to use existing PVC in statefulset then you should not mention it under
<code>volumeclaimtemplate </code> as <code>volumeclaimtemplate </code> will create a new PVC .</li>
<li>You should mention it under <code>pod spec</code> just like you mention in a deployment</li>
</ul>
<p>Example:</p>
<pre><co... |
<p>I'm trying to route POST requests through a K8s Load Balancer to a Webhook in Argo Events. I can't find any clear documentation on this. I'm able to get the Webhook created and I can successfully communicate with it when I port forward the webhook-eventsource-svc. The Load Balancer is built fine and displays the ext... | <p>I'm trying to do something similar in AWS. I can get the sample webhook to work with port forwarding (<a href="https://argoproj.github.io/argo-events/quick_start/" rel="nofollow noreferrer">https://argoproj.github.io/argo-events/quick_start/</a>) But it won't work with regular K8s objects. In my case, an Ingress and... |
<p>I have deployed vault in K8s . I would like to know how to inject the vault secret in the configmap of a application which has all the configuration of the application.</p>
| <p>It's not possible you can not mount the vault secret into config map. But you can parallelly inject both <strong>configmap</strong> and <strong>vault secret</strong> to single deployment.</p>
<ul>
<li>If you are mounting configmap as the file you can mount vault secret as file into same directory or another director... |
<p>I'm just trying to create a simple service account. Theoretically, kubectl automatically creates the secret and token for service accounts... But, not in my case... I've done this in <code>kube-system</code>, <code>default</code>, and new/other namespaces.</p>
<pre><code>me@mymachine ~ % kubectl create serviceaccoun... | <p><strong>Disclaimer</strong>: This answer will not "fix" the automatic creation of secrets for service accounts, but shows how you can associate a secret to a service account.</p>
<p>For the newer Docker Desktop 4.8.1 (for Mac), you can create the secret manually:</p>
<pre><code>kubectl apply -f - <<E... |
<p>I have a deployment on google gke, and I can't see the pod logs on the console even though the Cloud logging is enabled on the cluster?
So what could be the issue? did I miss something?</p>
| <p>It sounds like Workload monitoring and logging may not have been enabled and currently it's only doing system monitoring and logging. Please see the docs here on how to change the logging settings: <a href="https://cloud.google.com/stackdriver/docs/solutions/gke/installing#installing" rel="nofollow noreferrer">https... |
<p>I am going to implement PDB on AKS. Can someone please tell me why do we need it when we can use node autoscaler.</p>
<p>Also, does PDB allow zero unavailability by creating a node when one of the nodes fails?</p>
| <p><a href="https://kubernetes.io/docs/tasks/run-application/configure-pdb/" rel="nofollow noreferrer">PDB</a> allows you to set rules before evicting your pods from a node.</p>
<p>Let's say you have a 2 nodes cluster and a deployment with 1 replica and you want to update your nodes.</p>
<ul>
<li><code>kubectl drain</c... |
<p>I need to write a iptables rule in the K8s pod to SNAT packets based on some conditions but the network traffic never go through NAT table</p>
| <p><strong>Why my Kubernetes pod network traffic does not go through the iptables NAT table?</strong></p>
<p>Ans :</p>
<p>Because Kubernetes Dictates so to all CNI.
Following is from <a href="https://kubernetes.io/docs/concepts/services-networking/#the-kubernetes-network-model" rel="nofollow noreferrer">Kubernetes Docu... |
<p>Can someone briefly explain what is the difference between <code>istio_request_bytes_count</code> and <code>istio_request_bytes_sum</code>?. And why is the "istio_request_bytes" standard metric is missing?</p>
| <p><a href="https://istio.io/latest/docs/reference/config/metrics/" rel="nofollow noreferrer">Istio Standard Metrics</a> notes that <code>istio_request_bytes</code> is a <code>DISTRIBUTION</code> type metric. In Prometheus, this would appear as a <a href="https://prometheus.io/docs/concepts/metric_types/#histogram" re... |
<p>I have 3 contexts set up in k9s (<code>context1</code>, <code>context2</code>, <code>context3</code>). I know I can change the context within k9s by typing <code>:context</code> but how do I change the default context that loads when I open k9s from <code>context3</code> to <code>context1</code>?</p>
| <p>You can set the default context via <code>kubectl</code>:</p>
<pre><code>kubectl config use-context context1
</code></pre>
<p>This will update the default context in your KUBECONFIG, what is the base for k9s.</p>
|
<p>I have deployed an application in k8s cluster with 8 replicas. but how to ensure that there will be at least 3 pods always running during rolling update, can anyone please suggest a solution ?</p>
<p>Thanks in advance.</p>
| <p>you can set the required values on <code>maxSurge</code> and <code>maxUnavailable</code></p>
<pre><code> strategy:
rollingUpdate:
maxSurge: 25%
maxUnavailable: 50%
type: RollingUpdate
</code></pre>
<p>setting <code>maxUnavailable</code> to 50% will make sure that you always have 4 pods running... |
<p>I installed vanilla kubernetes 1.24, cluster is up and healthy but when i try to install kubernetes-dashboard, i realized can not access dashboard token. Before 1.24 i just describe token and get.</p>
<p>Normally when sa created, secret should be created automaticaly, BUT NOW, I just tried create service account the... | <p>For your question “Anyone faced this problem?”, the answer is that all the people that install version 1.24 are going to face the same behavior, as this <a href="https://kubernetes.io/docs/reference/command-line-tools-reference/feature-gates/" rel="nofollow noreferrer">documentation</a> indicates, this version inclu... |
<p>I encountered the following error when added <strong>spring-cloud-starter-kubernetes-config</strong> dependency to my pom.xml:</p>
<pre><code>io.fabric8.kubernetes.client.KubernetesClientException: An error has occurred. Caused by: java.security.cert.CertificateException: Could not parse certificate: java.io.IOExcep... | <p>As stated on the Spring Cloud Kubernetes documentation</p>
<blockquote>
<p>Also note that these properties: spring.cloud.kubernetes.config.enabled and spring.cloud.kubernetes.secrets.enabled only take effect when set in bootstrap.{properties|yml}</p>
</blockquote>
<p><a href="https://docs.spring.io/spring-cloud-kube... |
<p>I have a GitLab CI pipeline configured to run on Kubernetes runner. Everything worked great until I tried to add services (<a href="https://docs.gitlab.com/ee/ci/services/mysql.html" rel="nofollow noreferrer">https://docs.gitlab.com/ee/ci/services/mysql.html</a>) for test job. The service hostname (eg.: <code>mysql<... | <p>This was a known issue with older versions of GitLab Runner (< 12.8), or when running Kubernetes executor in older versions of Kubernetes (< 1.7).</p>
<p>From the <a href="https://gitlab.com/gitlab-org/gitlab-runner/-/blob/main/docs/executors/kubernetes.md#L26" rel="nofollow noreferrer">Kubernetes executor doc... |
<p>I wanna install Elasticsearch in AWS EKS. But <a href="https://www.elastic.co/guide/en/elasticsearch/plugins/master/cloud-aws-best-practices.html#:%7E:text=is%20not%20recommended%20or%20supported" rel="nofollow noreferrer">Elasticsearch is not recommended EFS Storage</a>.</p>
<p>So I want to install Elasticsearch us... | <p>I think the simpler way to install Elasticsearch (or ELK in general) is to use <a href="https://docs.aws.amazon.com/eks/latest/userguide/efs-csi.html" rel="nofollow noreferrer">EKS with EFS driver</a>. Then you can use Helm / Operator to install Elastic.</p>
<p>If you strive for highest Elastic performance, or/and h... |
<p>Today when I using <code>duc</code> command to check the kubernetes(v1.21) cluster host disk usage like this:</p>
<pre><code>[root@k8smasterone log]# duc ls -Fg /var/log/
5.4G messages-20220515 [++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++... | <p>You can tweak the following two parameters in the <code>kubelet</code> <a href="https://v1-21.docs.kubernetes.io/docs/reference/config-api/kubelet-config.v1beta1/" rel="nofollow noreferrer">config</a>:</p>
<blockquote>
<p><strong><code>containerLogMaxSize</code></strong> string A quantity defines the maximum size o... |
<p>I am trying to access the kubectl of the master node that is running on an ec2 instance. I want to do this from another ec2 instance running on a different vpc. What steps should I take to make this possible?</p>
<p>I have the kubeconfig file on my second machine already but on running kubectl, it gives me a connect... | <ul>
<li>If both of your <strong>EC2</strong> are in diff VPCs you can do the <code>VPC peering</code>.</li>
<li>If you want to expose your master and K8s setup you can directly use the public IP(if exist) of EC2 and <code>kubectl</code> will connect to k8s cluster over the internet.</li>
</ul>
<p>You can also checkout... |
<p>I am a beginner in kubernetes and was trying to deploy my flask application following this guide: <a href="https://medium.com/analytics-vidhya/build-a-python-flask-app-and-deploy-with-kubernetes-ccc99bbec5dc" rel="nofollow noreferrer">https://medium.com/analytics-vidhya/build-a-python-flask-app-and-deploy-with-kuber... | <p>I would check the following:</p>
<ol>
<li>Check if your Docker image works in Docker, you can run it with the <code>run</code> command, find the official doc <a href="https://docs.docker.com/engine/reference/commandline/run/" rel="nofollow noreferrer">here</a></li>
<li>If it doesn't work, then you can check what is ... |
<p>I wanna install Elasticsearch in AWS EKS. But <a href="https://www.elastic.co/guide/en/elasticsearch/plugins/master/cloud-aws-best-practices.html#:%7E:text=is%20not%20recommended%20or%20supported" rel="nofollow noreferrer">Elasticsearch is not recommended EFS Storage</a>.</p>
<p>So I want to install Elasticsearch us... | <p>You can use the Helm chart to deploy the elastic search on EKS cluster.</p>
<p><a href="https://github.com/elastic/helm-charts/tree/main/elasticsearch" rel="nofollow noreferrer">https://github.com/elastic/helm-charts/tree/main/elasticsearch</a></p>
<p>So by default, it will use the storage class, which will be disk ... |
<p>I'm using k3s to deploy my cluster, in my worker node I already setup insecure registries in /etc/docker/daemon.json for an internal network private registry</p>
<pre><code>{ "insecure-registries": ["192.168.30.87:7111"] }
</code></pre>
<p>and I have restarted both my docker and my machine. I can... | <p>finally after 4 hours of searching i finally come into this issue <a href="https://github.com/k3s-io/k3s/issues/1802" rel="nofollow noreferrer">https://github.com/k3s-io/k3s/issues/1802</a></p>
<p>Because i'm using k3s for cluster setup it's using crictl instead of docker, so the daemon.json doesn't apply
which brin... |
<p>I created a node js TLS server, dockerized it, and created a K8S Deployment and ClusterIP service for it. I created a DNS for the LoadBalancer service external IP of istio-ingressgateway and I’m using this DNS to try access this TLS server using istio but for some reason this error appears</p>
<pre><code>[2022-02-10... | <p>One thing I noticed right away is that you are using the incorrect selector in your <code>istio-gateway</code>, it should be:</p>
<pre><code>spec:
selector:
istio: ingressgateway
</code></pre>
<p>A good troubleshooting starting point would be to get the routes for your <code>ingressgateway</code> and validate ... |
<p>I'm trying to use Kubectl get namespaces command it is fetching the data.</p>
<pre><code>kubectl get namespace
NAME STATUS AGE
default Active 1d
kube-node-lease Active 1d
kube-public Active 1d
kube-system Active 1d
</code></pre>
<p>but I want to filter it with name only... | <p>Try any one of the command</p>
<pre><code>kubectl get namespace --template '{{range .items}}{{.metadata.name}}{{"\n"}}{{end}}'
</code></pre>
<pre><code>kubectl get namespace | awk '{print $1}'
</code></pre>
<pre><code>kubectl get namespace --no-headers -o custom-columns=":metadata.name"
</code></... |
<p>I have created 2 services and for each of the service there is a corresponding deployment. All these are in the same PC. After applying the YAML, the services and deployments are running properly.</p>
<pre><code>sudo npm kubectl apply -f deployment.yaml
</code></pre>
<p>Now, if I try to curl to the ingress IP addres... | <p>Looks like there is issue with ingress mainly. i would suggest first to check the services status if it's running or not at <code><Loadbalancer IP:Port/path></code> <strong>(Both services)</strong></p>
<p>Your app is listening on one specific path but you are not requesting that path in <strong>curl</strong>. ... |
<p>I deployed my angular application(Static webpage) on kubernetes and tried launching it from Google Chrome. I see app is loading, however there is nothing displayed on the browser. Upon checking on browser console , I could see this error</p>
<p>"Failed to load module script: Expected a JavaScript module script ... | <p>This error usually happens because you deployment was into a subfolder, so it seems like Angular is fetching you app directly from your base URL, so your html is found when you go to your <code>domain.com/mysubfolder/index.html</code>, but as the Angular fetches your resources from <code>domain.com/index.html</code>... |
<p>I am facing an error while deploying deployment in CircleCI. Please find the configuration file below.</p>
<p>When running the kubectl CLI, we got an error between kubectl and the <a href="https://aws.amazon.com/eks/" rel="noreferrer">EKS</a> tool of the <code>aws-cli</code>.</p>
<pre class="lang-yaml prettyprint-ov... | <p>There is <a href="https://github.com/aws/aws-cli/issues/6920" rel="nofollow noreferrer">an issue</a> in aws-cli. It is already fixed.</p>
<hr />
<p>In <em>my</em> case, updating aws-cli + updating the ~/.kube/config helped.</p>
<ol>
<li>Update aws-cli (<a href="https://docs.aws.amazon.com/cli/latest/userguide/gettin... |
<p>Planning to use Nginx <a href="http://nginx.org/en/docs/http/ngx_http_mirror_module.html" rel="nofollow noreferrer">Mirror</a> module to copy the traffic to other server. Wanted to see if there are any performance implication of doing this ?</p>
<p>Like what if the mirror server is buggy or too slow ?</p>
<p>Thanks ... | <p>There could be chances of performance impact on prod server if you are running both together. For suppose running socket connection and both are online which might leads to latency or another issue for prod server also.</p>
<p>Forum has few unanswered ticket : <a href="https://forum.nginx.org/read.php?2,281042,28104... |
<p>This is what i am trying to do:Get nginx pod's ip created in previous step, use a temp busybox image to wget its '/'</p>
<p>Find the link for your reference:
<a href="https://github.com/dgkanatsios/CKAD-exercises/blob/main/a.core_concepts.md#get-nginx-pods-ip-created-in-previous-step-use-a-temp-busybox-image-to-wget... | <p>You have to first create an Nginx pod. This is what is referred as "previous step".</p>
<pre><code>$ kubectl run nginx --image=nginx --restart=Never --port=80
pod/nginx created
</code></pre>
<p>You can then run wget inside a BusyBox pod:</p>
<pre><code>$ kubectl run BusyBox --image=busybox --rm -it --res... |
<p>I have a bunch of secretKey in values.yaml like below. I need to add each value of <code>secretKey</code> as a key and decoded value in template.data like as a value like below.</p>
<p>How can I achieve this ?</p>
<pre><code>{{- range $externalSecretName, $externalSecret := .Values.externalSecrets }}
apiVersion: ext... | <pre><code>{{- range $externalSecretName, $externalSecret := .Values.externalSecrets }}
apiVersion: external-secrets.io/v1beta1
kind: ExternalSecret
metadata:
name: {{ $externalSecretName }}
spec:
refreshInterval: 1m
secretStoreRef:
name: secret
kind: SecretStore
target:
name: {{ $externalSecretName... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.