prompt stringlengths 65 38.7k | response stringlengths 41 29.1k |
|---|---|
<p>Could anyone get me a example about how to use</p>
<pre><code>kubectl rollout pause xxx
kubectl rollout update xxx
</code></pre>
<p>in client-go? I can't find any example about it. Thank you~</p>
| <p>maybe .</p>
<pre><code>data := fmt.Sprintf(`{"spec":{"template":{"metadata":{"annotations":{"kubectl.kubernetes.io/restartedAt":"%s"}}}}}`, time.Now().String())
resultDeployment, err = p.Client.AppsV1().Deployments(p.Namespace).Patch(context.Background(... |
<p>I'm using nginx in a docker container which is serving out static content. It's run in Kubernetes as a sidecar to another service in the same file.</p>
<p>However, the issue is that although the same exact HTML page is being served (I checked using a text comparer) the page looks malformed on the web server (but fin... | <p>Since <strong>@tymur999</strong> has already solved this issue, I decided to provide a Community Wiki answer just for better visibility to other community members.</p>
<p>It's important to know that browsers use the MIME type, to choose a suitable displaying method.
Therefore, the web server must send the correct MI... |
<p>I have installed kube-prometheus-stack as a <strong>dependency</strong> in my helm chart on a local Docker for Mac Kubernetes cluster v1.19.7.</p>
<p>The <strong>myrelease-name-prometheus-node-exporter</strong> service is failing with errors received from the node-exporter daemonset after installation of the helm ch... | <p>This issue was solved recently. Here is more information: <a href="https://github.com/prometheus-community/helm-charts/issues/467" rel="nofollow noreferrer">https://github.com/prometheus-community/helm-charts/issues/467</a> and here: <a href="https://github.com/prometheus-community/helm-charts/pull/757" rel="nofollo... |
<p>I am new to ArgoCD and I get the following error:</p>
<pre><code>error: unable to recognize "rollout.yaml": no matches for kind "Rollout" in version "argoproj.io/v1alpha1"
</code></pre>
<p>The contents of my rollout.yaml file:</p>
<pre><code>apiVersion: argoproj.io/v1alpha1
kind: Rollou... | <p>Argo Rollouts is an own project and not part of Argo CD.
See <a href="https://argoproj.github.io/argo-rollouts/FAQ/" rel="nofollow noreferrer">https://argoproj.github.io/argo-rollouts/FAQ/</a></p>
|
<p>I am using eks 1.16. I have one service which has type Loadbalancer with internet-facing.</p>
<pre><code>apiVersion: v1
kind: Service
metadata:
annotations:
service.beta.kubernetes.io/aws-load-balancer-backend-protocol: tcp
service.beta.kubernetes.io/aws-load-balancer-type: nlb
name: kafka-test-3-0-exter... | <p>There is one annotation to provide elastic-ip for network-load-balancer</p>
<p><strong><code>service.beta.kubernetes.io/aws-load-balancer-eip-allocations: eipalloc-05666791973f6a240</code></strong></p>
<p>If you're using Amazon EKS 1.16 or later, you can assign Elastic IP addresses to the Network Load Balancer by ad... |
<p>I am having test environment cluster with 1 master and two worker node, all the basic pods are up and running.</p>
<pre><code>root@master:~/pre-release# kubectl get pods -n kube-system
NAME READY STATUS RESTARTS AGE
coredns-74ff55c5b-jn4pl 1/1 Running 0 23... | <p>In this case, adding <code>hostNetwork:true</code> under <code>spec.template.spec</code> to the <code>metrics-server</code> Deployment may help.</p>
<pre><code>...
spec:
hostNetwork: true
containers:
- args:
- /metrics-server
- --cert-dir=/tmp
- --secure-port=4443
-... |
<p>I am trying to spin up a testing Pod with the KubernetesPodOperator. As an image I am using the hello-world example from Docker, which I pushed to the local registry of my MicroK8s installation.</p>
<pre><code>from airflow import DAG
from airflow.operators.dummy_operator import DummyOperator
from airflow.contrib.ope... | <p>Unfortunately I still haven't figured out the problem with microK8s.</p>
<p>But I was able to use the KubernetesPodOperator in Airflow with minikube.
The following code was able to run without any problems:</p>
<pre><code>from airflow import DAG
from datetime import datetime, timedelta
from airflow.contrib.operators... |
<p>I created my Kubernetes cluster and I try to deploy this yaml file:</p>
<pre><code>apiVersion: apps/v1
kind: Deployment
metadata:
name: httpd-deployment
spec:
selector:
matchLabels:
app: httpd
replicas: 1
template:
metadata:
labels:
app: httpd
spec:
containers:
- n... | <p>You're are getting the <code>connection refused</code> because the service does not have any endpoints behind it since your label selector is different from the deployment level.</p>
<p>The deployment has <code>httpd</code> label while the service is trying to catch all the deployments with <code>httpd-app</code>. ... |
<p>i try to get kubernetes auto completion going in nvim. I am using neovim nightly (0.5.) with 'neovim-lspconfig' and 'nvim-lua/completion-nvim'.
I installed the yaml-language-sever and it is working fine (i know it is working because it is showing errors inside yaml files in nvim).</p>
<p>I am fairly new to lua and n... | <p>You should change it to</p>
<pre class="lang-lua prettyprint-override"><code>lspconfig.yamlls.setup{
settings = {
yaml = {
schemas = { kubernetes = "globPattern" },
}
}
</code></pre>
|
<p>I am trying to deploy my php symfony application on Azure Kubernetes Services. I have the following <code>deployment.yaml</code> for php pod</p>
<pre><code>apiVersion: apps/v1
kind: Deployment
metadata:
name: myphp-deployment
labels:
app: php
spec:
replicas: 1
selector:
matchLabels:
app: php
... | <p><strong>How can I control to which replica set the requests should be forwarded to?</strong></p>
<p>What you are looking for is the session affinity or sticky session. This can be achieved with ingress. The kubernetes ingress controllers, such as <a href="https://kubernetes.github.io/ingress-nginx/examples/affinity/... |
<p>I'm trying to inject my secrets from Google Secret Manager into Kubernetes Pod as environment variable.</p>
<p>I need put it as environment variable to my NodeJS application can read it.</p>
<p>I tried the solution from <a href="https://stackoverflow.com/questions/63923379/how-to-inject-secret-from-google-secret-man... | <p>You can do something like this during cloud build step.</p>
<pre><code>steps:
- name: '<secrets_to_configmap>'
entrypoint: 'bash'
args: ['USERNAME=$$USERNAME', 'PASSWORD=$$PASSWORD']
secretEnv: ['USERNAME', 'PASSWORD']
availableSecrets:
secretManager:
- versionName: projects/PROJECT_ID/secrets/SECRET... |
<p>I’m attempting to pull a private docker image into a digital ocean Kubernetes cluster. I receive this error:</p>
<blockquote>
<p>Failed to pull image "testuser/services:latest": rpc error: code =
Unknown desc = failed to pull and unpack image
"docker.io/testuser/services:latest": failed to resolv... | <p>Can you try below:</p>
<pre><code>kubectl create secret docker-registry dockerreg --docker-server=docker.io --docker-username=alloweduserid --docker-password=password --docker-email=user@abc.com
</code></pre>
|
<p>We are trying to use <code>github actions</code>, and we want to keep sensitive data such as <code>kubeconfig</code> inside the github <code>secrets</code>
I've created a GitHub secret with name <code>KUBECONFIG1</code></p>
<p><strong>Steps to reproduce</strong></p>
<p>In the GitHub secret I should store the followi... | <p>The issue is with the below command</p>
<pre class="lang-yaml prettyprint-override"><code>kubectl create secret generic project-kubecfg --from-file=~/.tmpfile.json -n default
</code></pre>
<p>The problem is that <code>~</code> goes to <code>kubectl</code> which doesn't expand it to the home directory. So if you chan... |
<p>Using <code>kustomize</code>, I'd like to set <code>namespace</code> field for all my objects.</p>
<p>Here is my <code>kustomization.yaml</code>:</p>
<pre><code>apiVersion: kustomize.config.k8s.io/v1beta1
kind: Kustomization
patchesJson6902:
- patch: |-
- op: replace
path: /kind
value: RoleBinding
... | <p>Here is a solution which solves the issue, using <code>kustomize-v4.0.5</code>:</p>
<pre><code>cat <<EOF > kustomization.yaml
apiVersion: kustomize.config.k8s.io/v1beta1
kind: Kustomization
patchesJson6902:
- patch: |-
- op: replace
path: /kind
value: RoleBinding
- op: add
path: /... |
<p>I’m packaging a Python app for use within a Kubernetes cluster. In the code base this method exists :</p>
<pre><code> def get_pymongo_client(self):
username = test;
password = 'test';
url = ‘test
conn_str = "mongodb+srv://" + username + ":" + password + “/”+ url
... | <p>The traditional way is via environment variable</p>
<pre class="lang-yaml prettyprint-override"><code>spec:
containers:
- name: your-app
# ...
env:
- name: PYMONGO_USERNAME
valueFrom:
secretKeyRef:
name: your-secret-name-here
key: PYMONGO_USERNAME
</code></pre>
<p>... |
<p>I am using test kubenetes cluster (Kubeadm 1 master and 2 nodes setup), My public ip change time to time and when my public IP changed, I am unable to connect to cluster and i get below error</p>
<pre><code> Kubernetes Unable to connect to the server: dial tcp x.x.x.x:6443: i/o timeout
</code></pre>
<p>I also have p... | <p>Since <strong>@Vidya</strong> has already solved this issue by using a static IP address, I decided to provide a Community Wiki answer just for better visibility to other community members.</p>
<p>First of all, it is not recommended to have a frequently changing master/server IP address.<br />
As we can find in the... |
<p>I'm trying to inject my secrets from Google Secret Manager into Kubernetes Pod as environment variable.</p>
<p>I need put it as environment variable to my NodeJS application can read it.</p>
<p>I tried the solution from <a href="https://stackoverflow.com/questions/63923379/how-to-inject-secret-from-google-secret-man... | <p>Checkout <a href="https://github.com/GoogleCloudPlatform/secrets-store-csi-driver-provider-gcp" rel="nofollow noreferrer">https://github.com/GoogleCloudPlatform/secrets-store-csi-driver-provider-gcp</a>. It's a CSI driver for mounting Secret Manager secrets.</p>
|
<p>I'm trying to communicate via grpc between two microservices internally on kubernetes, but I'm getting a connection refused error.</p>
<p>These are the yaml files of the services that are trying to communicate.</p>
<pre class="lang-yaml prettyprint-override"><code>---
apiVersion: v1
kind: Service
metadata:
labels:... | <p>QUARKUS_GRPC_SERVER_HOST should be 0.0.0.0 instead of localhost</p>
|
<p>I am using <code>Firebase</code> in my <code>GoLang</code> project hosted on <code>Google Kubernetes Engine</code>.</p>
<p>Steps I followed:</p>
<ol>
<li><p>Enable firebase admin SDK on the firebase account. It generated a service account <code>JSON</code> for me. This also created a service account under my Google ... | <p>Finally, I figure out how to copy it and use the environment variable. Here is. the updated <code>YAML</code>file</p>
<pre><code>apiVersion: apps/v1beta1
kind: Deployment
metadata:
name: my-app
spec:
template:
spec:
volumes:
- name: google-cloud-keys
secret:
secretName: gac-keys... |
<p>Why does <code>kubectl run dask --image daskdev/dask</code> fail?</p>
<pre><code># starting the container with docker to make sure it basically works
➜ ~ docker run --rm -it --entrypoint bash daskdev/dask:latest
(base) root@5b34ce038eb3:/# python
Python 3.8.0 (default, Nov 6 2019, 21:49:08)
[GCC 7.3.0] :: Anacond... | <ol>
<li>So basically, if you will check result of <code>kubectl describe pod dask</code>, you will see that last state was <code>Terminated</code> with Exit Code 0, that literally means you container was launched successfully, did it job and finished also successfully. What else you expect to happen with pod?
IN addit... |
<p>I've set up a k8s cluster (1 bare metal node for now, which is both master and worker). I've also set up Nginx ingress controller as described here: <a href="https://docs.nginx.com/nginx-ingress-controller/installation/installation-with-manifests/" rel="nofollow noreferrer">https://docs.nginx.com/nginx-ingress-contr... | <p>I've found out what is wrong. I was using Kubernetes Nginx Ingress Controller <a href="https://kubernetes.github.io/ingress-nginx/" rel="noreferrer">https://kubernetes.github.io/ingress-nginx/</a> with my old setup, and now I am using Nginx Ingress Controller <a href="https://www.nginx.com/products/nginx-ingress-con... |
<p>I have multiple <code>prometheusRules(rule a, rule b)</code>, and each rule defined different exp to constraint the alert; then, I have different <code>AlertmanagerConfig</code>(one receiver is slack, then other one's receiver is <code>opsgenie</code>); How can we make a connection between rules and <code>alertmanag... | <p>You need to match on a label of the alert, in your case you're trying to match on the label <code>job</code> with the value <code>service_a</code> which doesn't exist. You could either match on a label that does exist in the prometheuisRule file, eg <code>severity</code>, by changing the <code>match</code> in the a... |
<p>I found the bug below on the above "devicemapper" at bugzilla.redhat.com. It let me install the "device-mapper-persistent-data" package. However, when I installed it, I received the following error.</p>
<p>I tried to use <a href="https://github.com/google/cadvisor/pull/1476" rel="nofollow">this link</a> to solve th... | <p>for me, it worked with the next docker-compose setup. It's true I have not tested it completely. I will update the post as soon as possible. But if it helps up to this moment to someone, perfect.</p>
<pre><code> cadvisor:
image: google/cadvisor:latest
container_name: monitoring_cadvisor
restart: unless-stoppe... |
<p>I have just upgraded my Airflow from 1.10.13 to 2.0. I am running it in Kubernetes (AKS Azure) with Kubernetes Executor. Unfortunately, I see my Scheduler getting killed every 15-20 mins due to Liveness probe failing. Hence my pod keeps restarting.</p>
<p>I had no issues in 1.10.13.</p>
<p>This is my Liveness probe:... | <p>I managed to fix my restart by setting up the following configs:</p>
<pre><code>[kubernetes]
...
delete_option_kwargs = {"grace_period_seconds": 10}
enable_tcp_keepalive = True
tcp_keep_idle = 30
tcp_keep_intvl = 30
tcp_keep_cnt = 30
</code></pre>
<p>I have another Airflow instance running in AWS - Kuberne... |
<p>I'm wondering if anyone can help with my issue, here's the setup:</p>
<ul>
<li>We have 2 separate kubernetes clusters in GKE, running on v1.17, and they each sit in a separate project</li>
<li>We have set up VPC peering between the two projects</li>
<li>On cluster 1, we have 'service1' which is exposed by an <strong... | <p>So it seems you're not using a "VPC-native" cluster and what you need is "IP masquerading".</p>
<p>From <a href="https://cloud.google.com/kubernetes-engine/docs/how-to/ip-masquerade-agent" rel="nofollow noreferrer">this</a> document:
<em>"A GKE cluster uses IP masquerading so that destinatio... |
<p>How do I get top three most CPU utilized pod in a Kubernetes cluster?</p>
<pre><code>kubectl top po --all-namespaces
</code></pre>
<p>Above command gives me CPU and memory utilization for all the pods across all namespaces. How to restrict it to only top three most CPU utilized pods?</p>
<p>Also, I've tried to s... | <p>There are different way you can achieve this,
examples below</p>
<ol>
<li><code>--sort-by + head</code></li>
<li><code>--sort-by + awk</code></li>
<li><code>sort</code></li>
</ol>
<p>Followings are the all nodes just <code>--sort-by=cpu</code></p>
<pre><code>$ kubectl top pod --all-namespaces --sort-by=cpu
NAMESPACE... |
<p>I am learning Kubernetes Label Selector at the URL below.</p>
<p><a href="https://kubernetes.io/docs/concepts/overview/working-with-objects/labels/" rel="nofollow noreferrer">https://kubernetes.io/docs/concepts/overview/working-with-objects/labels/</a></p>
<h3>Set-based requirement</h3>
<blockquote>
<p>Set-based lab... | <p>The <code>!</code> is getting interpreted by your shell, use a single quote to prevent this. The correct syntax is:</p>
<p><code>kubectl get pods -l '!app'</code></p>
|
<p>I have the ingress setup for Kubernetes as the following</p>
<pre><code> apiVersion: networking.k8s.io/v1beta1
kind: Ingress
metadata:
name: dev-ingress
#namespace: dev
annotations:
nginx.ingress.kubernetes.io/rewrite-target: /$2
nginx.ingress.kubernetes.io/use-regex: "true"
ingress.gc... | <p>Your rewrite target is stripping off the <code>/webui/</code>. Consider your path:</p>
<p><code>path: /webui(/|$)(.*)</code></p>
<p>Now check the <code>rewrite-target</code>:</p>
<p><code>nginx.ingress.kubernetes.io/rewrite-target: /$2</code>.</p>
<p>If you remove this annotation (and you can remove the <code>use-r... |
<p>I've a simple spring boot application with following liveness probe:</p>
<pre><code> livenessProbe:
httpGet:
path: /health
port: 56017
initialDelaySeconds: 30
periodSeconds: 10
timeoutSeconds: 1
failureThreshold: 3
</code></pre>
<p>In t... | <p>I found this explanation in an article:</p>
<pre><code>Failed containers that are restarted by the kubelet are restarted with an exponential back-off delay (10s, 20s, 40s …) capped at five minutes, and is reset after ten minutes of successful execution.
</code></pre>
<p>Looks like its an expected behavior.</p>
|
<p>I'm running the <strong>CIS kube-bench tool</strong> on the master node and trying to resolve this error</p>
<pre><code>[FAIL] 1.2.6 Ensure that the --kubelet-certificate-authority argument is set as appropriate (Automated).
</code></pre>
<p>I understand that I need to update the API server manifest YAML file with ... | <p>3 very similar discussions on the same topic. I wont provide you all steps cause it well written in documentation and related questions on stack. Only high-level overview</p>
<ol>
<li><a href="https://stackoverflow.com/questions/63994701/how-do-i-properly-set-kubelet-certificate-authority-apiserver-parameter">How Do... |
<p>I've set up a <code>minikube</code> cluster for development purpose inside a VM.<br />
I've deployed few services and an ingress controller (the minikube one) to be able to access it without using NodePorts.<br />
Inside my VM, I can access my services as usual with <code>curl http://hello-world.info</code> or anoth... | <p>Personally I haven't found a way to expose <code>minikube</code> instance with <code>--driver=docker</code> on <code>LAN</code>.</p>
<p>As a workaround to expose your <code>minikube</code> instance on <code>LAN</code> you can either <code>--driver</code>:</p>
<ul>
<li><code>--driver=virtualbox</code></li>
<li><code>... |
<p><code>kubectl apply <file.yaml> --save-config</code> creates or updates a deployment and saves the deployment as metadata.</p>
<p>In the documentation it says</p>
<blockquote>
<p>--save-config[=false]: If true, the configuration of current object will be saved in its annotation. This is useful when you want to... | <h2>kubectl apply</h2>
<p><code>kubectl apply</code> use the data in an annotation <code>kubectl.kubernetes.io/last-applied-configuration</code> to see e.g. if any fields has been removed since the last apply. This is needed because some fields or annotations may have been added live in the cluster by e.g. a controller... |
<p>I am learning Kubernetes Label Selector at the URL below.</p>
<p><a href="https://kubernetes.io/docs/concepts/overview/working-with-objects/labels/" rel="nofollow noreferrer">https://kubernetes.io/docs/concepts/overview/working-with-objects/labels/</a></p>
<h3>Set-based requirement</h3>
<blockquote>
<p>Set-based lab... | <p>You can use <code>awk</code></p>
<pre><code>kubectl get pods --show-labels | awk '$6 !~/app/ {print ;}'
</code></pre>
<p>or <code>-o jsonpath</code></p>
<pre><code>kubectl get pods -o jsonpath='{range .items[*]} {.metadata.name} {.metadata.labels} {"\n"} {end}' | awk '$2 !~/app/ {print $1}'
</code></pre>
... |
<p>Hello folks I'm trying to deploy a nodejs application that runs mongoDB in Kubernetes. In order to accomplish this, I've created a folder named <strong>k8s</strong> and in that folder I have 2 files - <strong>deployment_nodejs.yaml</strong> and <strong>deployment_mongo.yaml</strong>. After run the command <strong>ku... | <p>Tried generating the resources as per the YAML given, below are the issues found.
api-version is not mentioned on the first line, volumes and volumeMounts are not properly indented in Deployment Yaml. PersistentVolumeClaim (P in caps it should be persistentVolumeClaim), claimName is not indented. Fix them or use the... |
<p>I am having one python-django project which consist of sqlite3 database, I am deploying it on Kubernetes pod, wanted to know how to access the sqlite3 database, once I deploy the app on Kubernetes. Generally If I was using postgres or mysql, I would have created another pod and then expose my services, not sure for ... | <p>The sqlite file should be created in the root of the project inside the pod. But, you should not use sqlite in Kuberneters. Because inside the pods, all the codes are <a href="https://kubernetes.io/docs/concepts/policy/pod-security-policy/" rel="nofollow noreferrer">read-only mode</a>. Hence even if you want to upda... |
<p>I am trying to purge images from the local kubernetes cache on a set cadence. Before you could setup some volumeMounts on a daemonSet and talk to the docker runtime directly.</p>
<p>The latest runtime is based on containerd but I can't seem to connect using the containerd.sock - when I run <code>ctr image ls</code> ... | <p>Answered in comments, most containerd commands are built for the Docker integration which uses the default containerd namespace (note, nothing to do with Linux namespaces, this is administrative namespacing inside containerd). Most commands have an option to set the ns being used but <code>crictl</code> is already s... |
<p>I need to get an ALB name or id to attach WAF rules to it.
The ALB is created by Kubernetes and not used anywhere in Terraform.
Oficial data resource only supports name and arn with no filtering.</p>
<pre><code>data "aws_lb" "test" {
name = ...
arn = ...
}
</code></pre>
<p>Is there a way to g... | <p>I'm currently facing the same issue, the name of the ALB doesn't appear to be something that you can set whilst you're deploying the Helm chart and there doesn't appear to be a way of getting the name once the chart has been deployed.</p>
<p>The only workaround I can think of is to describe the ingress resource and ... |
<p>I am running a Kuberentes cluster in dev environment. I executed deployment files for metrics server, my pod is up and running without any error message. See the output here:</p>
<pre><code>root@master:~/pre-release# kubectl get pod -o wide
NAME READY STATUS RESTARTS AGE IP ... | <p>As I mentioned in the comment section, this may be fixed by adding <code>hostNetwork:true</code> to the metrics-server Deployment.</p>
<p>According to kubernetes <a href="https://kubernetes.io/docs/concepts/policy/pod-security-policy/#host-namespaces" rel="nofollow noreferrer">documentation</a>:</p>
<blockquote>
<p>... |
<p>I'm writing a Kubernetes Operator in Go and I would like to generate events in the same way Pods do, i.e. at each point of the reconciliation I want to write an event which can be examined using <code>kubectl describe myresource</code>.</p>
<p>I found the package that would allow me to do that, but I don't understan... | <p>The Kubebuilder v1 book has a good example on how to <em>create</em> and <em>write</em> <code>Events</code> using an <a href="https://github.com/kubernetes/client-go/blob/master/tools/record/event.go#L88" rel="nofollow noreferrer">EventRecorder</a> from <code>client-go</code>.</p>
<p>See <a href="https://book-v1.boo... |
<p>I'm creating an application that is using helm(v3.3.0) + k3s. A program in a container uses different configuration files. As of now there are just few config files (that I added manually before building the image) but I'd like to add the possibility to add them dynamically when the container is running and not to l... | <p>In Kubernetes (Helm is just a tool for it) you need to do two things to mount host path inside container:</p>
<pre class="lang-yaml prettyprint-override"><code>spec:
volumes:
# 1. Declare a 'hostPath' volume under pod's 'volumes' key:
- name: name-me
hostPath:
path: /path/on/host
containers:
- na... |
<p>POD consist: <code>my-app-container</code> and <code>envoy (istio-proxy)</code> container</p>
<p>I want to get <code>cpu_usage</code> of <code>envoy-container</code> from <code>may-app-container</code>.</p>
<p>Info from: <code>http://localhost:1500/stats</code> and <code>http://localhost:1500/stats/prometheus</code>... | <p>Below are 2 ways I could find to get the information about istio-proxy cpu usage.</p>
<hr />
<p>You can use <a href="https://kubernetes.io/docs/reference/generated/kubectl/kubectl-commands#top" rel="nofollow noreferrer">kubectl top</a>.</p>
<pre><code>kubectl top pods -A --containers | grep istio-proxy | grep Mi
def... |
<p>My issue is exactly the same as <a href="https://stackoverflow.com/questions/66275458/could-not-access-kubernetes-ingress-in-browser-on-windows-home-with-minikube">this</a>. But replication the question again for your reference::</p>
<p>I am facing the problem which is that I could not access the Minikube Ingress on... | <p><strong>On Windows</strong></p>
<p>After some decent amount of time, I came to the conclusion that ingress has some conflicts to work with Docker on Windows10-Home. Things are working fine if we want to expose a service of NodePort type but Ingress is troublesome.</p>
<p>Further, I tried to set up WSL 2 with Ubuntu ... |
<p>I wonder why my tarantool cartridge cluster is not woring as it should.</p>
<p>I have a cartridge cluster running on kubernetes and cartridge image is generated from cartridge cli <code>cartridge pack</code>, and no changes were made to the those generated files.
Kubernetes cluster is deployed via helm with the foll... | <p>SQL in tarantool doesn't work in cluster mode e.g. with tarantool-cartridge.</p>
<p>P.S. that was the response to my question from tarantool community in tarantool telegramchat</p>
|
<p>I have problem with PersistentVolume in local K8s cluster. When I am rebooting PC or close and open Desktop Docker I lose data in my PV.</p>
<p>This is my PV config:</p>
<pre><code>apiVersion: v1
kind: PersistentVolume
metadata:
name: pvolume
labels:
name: pvolume
spec:
storageClassName: manual
volumeMod... | <p>As it is mentioned in links I have provided in comment section - read more: <a href="https://github.com/docker/for-win/issues/7023#issuecomment-753536143" rel="nofollow noreferrer">docker-desktop-pv</a>, <a href="https://github.com/docker/for-win/issues/7023#issuecomment-772989137" rel="nofollow noreferrer">docker-d... |
<p>I have a requirement to get the resource details inside the pod and do some operations depend upon the result. I'm using k8s client python inside the pod. After the role/rolebinding i'm getting forbidden.</p>
<p>i have created Serviceaccount/role/rolebinding as like below.</p>
<p>Can any one help me in this issue.</... | <p>Answering the question, I think there are some things that should be considered:</p>
<ul>
<li>Indentation</li>
<li>Service account running the <code>Pod</code></li>
<li>Python code and access scopes</li>
</ul>
<p>As there is no <a href="https://stackoverflow.com/help/minimal-reproducible-example">minimal, reproducib... |
<p>I have a problem with Google cloud console and kubernates</p>
<p>i have two projects:</p>
<pre><code>$ gcloud projects list
PROJECT_ID NAME PROJECT_NUMBER
telemetry Telemetry 571056202575
opex-prod OPEX 992345650242
</code></pre>
<p>If I check current project:</p>
<pre><code... | <p>kubectl commands don't work based on gcloud project config. They work based on kubeconfig set in your local environment. To set kubeconfig to point to a particular project's cluster, run <code>gcloud container clusters get-credentials cluster-name</code> command after you change your gcloud project config. Read <a h... |
<p>I'm using <strong>Docker Desktop</strong> on windows 10 pro with this docker information <a href="https://i.stack.imgur.com/2FQxL.png" rel="nofollow noreferrer">docker info</a></p>
<p>My docker is just fine and I can use docker commands completely. But when it comes to enabling kubernetes.
I can't enable it. I just ... | <p>I had the same issue.
I resolve it , changing the HOSTS file in Widnows (located at C:\Windows\System32\drivers\etc) and adding</p>
<p><strong>127.0.0.1 kubernetes.docker.internal</strong></p>
<p>( I also disable for this operation firewall and antivirus and set 8.8.8.8 in DNS , in docker desktop setting )</p>
|
<p>I have a command <code>kubectl run -it my-pod --image=<my-image> /bin/sh</code> and I'd like the pod to be scheduled on a specific node.</p>
<p>Is that possible and, if so, how?</p>
| <p>Get the hostname:</p>
<pre><code>kubectl get nodes
</code></pre>
<p>Schedule pod on a specific node:</p>
<pre><code>kubectl run mypod --image ubuntu:18.04 --overrides='{"apiVersion": "v1", "spec": {"nodeSelector": { "kubernetes.io/hostname": "my-node.internal&qu... |
<p>My K8 DNS isn't resolving, thus I did follow the debugging steps as <a href="https://kubernetes.io/docs/tasks/administer-cluster/dns-debugging-resolution/" rel="nofollow noreferrer">mentioned here</a>. As I am new to K8, can someone point me to the issue I am facing? I cant extract any useful information out of the ... | <p>There were several issues with my configuration. First off: I did use an incompatible docker version (20.10.5) which isn't supported yet. Hence, I don't know whether this issue also arises when using a supported docker version. However, even with this incompatible docker version, I was able to fix the issue with fol... |
<p>I am using Argo and have a question about the workflow of workflows example. (<a href="https://github.com/argoproj/argo-workflows/blob/master/examples/workflow-of-workflows.yaml" rel="nofollow noreferrer">https://github.com/argoproj/argo-workflows/blob/master/examples/workflow-of-workflows.yaml</a>)</p>
<p>UPDATED Y... | <p>Thanks to Alex of ArgoProj!</p>
<p>Here is a command I did not know:</p>
<p>kubectl get workflow</p>
<p>will list (surprise) workflows! From there, I could see the individual workflows embedded into the larger workflow.</p>
|
<p>In my Kubernetes config.yaml I have:</p>
<pre><code>command: ["sh", "-c", "command1; command2; command3;"]`
</code></pre>
<p>a lot of commands can complicate the config file and it will be hard to reat. What is the best approach here? Is it possible to create a script that will have th... | <p>Two ways:</p>
<p><strong>The quick and dirty way .</strong></p>
<p>The command object a an array object in yaml so you can reformat like.</p>
<pre><code>command:
- "sh"
- "-c"
- "command1; command2; command3;"
- "ect"
</code></pre>
<p><strong>A little more elegant way:</st... |
<p>I have below configmap.yml i want to patch/update date field from python script from container in kubernates deployment i searched various side but couldn't get any reference to do that. Any reference or code sample would be a great help</p>
<pre><code>apiVersion: v1
kind: ConfigMap
metadata:
name: sample-configma... | <p>The <code>body</code> parameter in <code>patch_namespaced_config_map</code> is the actual <code>configmap</code> data that you want to patch and needs to be first obtained with <code>read_namespaced_config_map</code>.</p>
<p>Following steps are required for all the operations that have the <code>body</code> argumen... |
<p>I am attempting to setup a MSSQL-server in my WSL2 Linux distro, where I mount a volume for my <code>.mdf</code>- and <code>.ldf</code>-files.
However, I can't get Kubernetes to see my folder with said files.</p>
<p>I have my files stored in <code>C:\WindowsFolder\data</code> on my host (Windows), which allows WSL2 ... | <p>Solution found!</p>
<p>Docker Desktop created a folder to store everything in.</p>
<p>The following path in explorer, <code>\\wsl$\docker-desktop-data\version-pack-data\community\kubelet\</code>, is equal to <code>/var/lib/</code> in a .yaml-file.</p>
<p>That means, you can write the following:</p>
<pre class="lang-... |
<p>I did performance test to my application.
The usage of cpu was 30% while testing. - the test sever has 4 cores.
so I thought one core had 30/4 usage = 7.5%.</p>
<p>I want to a container in k8s to keep the usage of CPU under 30%
so I decided that the cpu limits was 250m + 50m(extra core).</p>
<p>I am wondering if thi... | <p>To answer your question, <code>I am wondering if this way is right?</code>, yes, that's the right way. You can also use a tool called <a href="https://github.com/FairwindsOps/goldilocks" rel="nofollow noreferrer">goldilocks</a>, a kubernetes controller that collects data about running pods and provides recommendatio... |
<p>Using the Python Client for Kubernetes, I've created a small service to watch for new Pods and send the data to an external service, for metrics gathering. I find that it works completely, but after a few days the Watch seems to stop receiving new changes. It doesn't report any errors or throw any exceptions; it jus... | <p>You can refer to this Link: <a href="https://medium.com/programming-kubernetes/building-stuff-with-the-kubernetes-api-part-3-using-python-aea5ab16f627" rel="nofollow noreferrer">https://medium.com/programming-kubernetes/building-stuff-with-the-kubernetes-api-part-3-using-python-aea5ab16f627</a></p>
<p>It talks about... |
<p>I want to start and stop a Kubernetes on GCP using Scheduler. How can we reduce the number of nodes to zero using a corn scheduler at a particular time and again change it back to the required number when using a cron expression?</p>
<p><a href="https://i.stack.imgur.com/wEkiB.png" rel="nofollow noreferrer"><img src... | <p>It seems <a href="https://benebsworth.com/gke-development-auto-scale-down/" rel="nofollow noreferrer">GKE Auto Scale Down for Fun and Profit</a> has everything you need except vise-versa part to restore back 3 nodes. But Im sure you'll manage it. Tested for you, this is work solution.</p>
<pre><code>gcloud beta sc... |
<p>I want to change (edit/add) labels on pods with specific labels. I have the following code:</p>
<pre><code>public void changeLabelsForPodFilterByLabels(String namespace, Map<String, String> filterByLabels, Map<String, String> newLabels) {
try {
V1PodList podList = coreV1Api.listNamespacedPod... | <p>You could use <strong>JsonObject</strong> instead of String for <em>body</em> argument.<br />
For example:</p>
<pre><code>JsonObject item = new JsonObject();
item.add("op", new JsonPrimitive("add"));
item.add("path", new JsonPrimitive("/metadata/labels"));
JsonObject label = ... |
<p>Grafana, service graph and zipking aren't deployed after the installation of Istio.There's no way to install these add-ons after the initial install of Istio?? </p>
| <p><strong>NOTE:</strong> Tested with Istio <strong>v1.9.0</strong> installation with <strong>istioctl</strong> on Linux on <strong>April, 2021</strong>.</p>
<p><a href="https://istio.io/latest/blog/2020/addon-rework/#timeline" rel="nofollow noreferrer">Starting with Istio 1.6</a>, telemetry-related addons (Grafana, Pr... |
<p>I created .yaml file to create mysql service on kubernetes for my internal application, but it's unreachable. I can reach application and also phpmyadmin to reach database but it's not working properly. I'm stuck with pending status on mysql pod.</p>
<p>.yaml file:</p>
<pre><code>apiVersion: apps/v1
kind: Deployment... | <p>you are missing the volume to attach with the pod or deployment. PVC is required as your deployment configuration is using it.</p>
<p><strong>you can see clearly : persistentvolumeclaim "mysql-pv-claim" not found</strong></p>
<p>you can apply below YAML and try.</p>
<pre><code>apiVersion: v1
kind: Persiste... |
<p>I need to make my Linux container running (without any app or service in it) so I can enter /bin/bash and modify some local linux files before I actually <strong>manually</strong> run my app from the container shell (this is purely for some debugging purposes so I do not want any modifications in my image itself, p... | <p>You just need to run some long/endless process for the container to be up. For example you can read a stream, that'll last forever unless you kill the pod/container:</p>
<pre><code>command: ["/bin/bash", "-c"]
args: ["cat /dev/stdout"]
</code></pre>
|
<p>Having problem bringing up Traefik dashboard on Kubernetes environment, the following is my traefik deployment setting:</p>
<pre><code>kind: Deployment
apiVersion: apps/v1
metadata:
namespace: ingress-traefik
name: traefik
labels:
app: traefik
spec:
replicas: 1
selector:
matchLabels:
app: tr... | <p>This problem had been resolved (Not sure if this is a solution or only a workaround):</p>
<p>Please check here: <a href="https://stackoverflow.com/a/64709491/6716204">https://stackoverflow.com/a/64709491/6716204</a></p>
<p>The key point is, I set <code>api.insecure=true</code>, so that I can bring up the dashboard l... |
<p>I have a daemon running on my kubernetes cluster whose purpose is to accept gRPC requests and turn those into commands for creating, deleting, and viewing pods in the k8s cluster. It runs as a service in the cluster and is deployed through helm.</p>
<p>The helm chart creates a service account for the daemon, "t... | <p>As I have mentioned in comment section there is a deprecation on <code>apiVersion</code> <code>rbac.authorization.k8s.io/v1beta1</code>, instead use <code>rbac.authorization.k8s.io/v1</code> instead .
The API <code>v1</code> is stable. You should use stable version if it possible.</p>
<p>Read more: <a href="https://... |
<p>I want to configure a custom theme for login, register and forgot password pages in keycloak on kubernetes.</p>
<p>I am using the following url and configuration for keycloak on kubernetes.</p>
<p><a href="https://www.keycloak.org/getting-started/getting-started-kube" rel="nofollow noreferrer">https://www.keycloak.o... | <p>The approach that I have used on the past was to first create a .tar file (<em>e.g.,</em> <code>custom_theme.tar</code>) with the custom themes to be used in Keycloak. Then mount volume to the folder where the Keycloak themes are stored (<em>i.e.,</em> <code>/opt/jboss/keycloak/themes/my_custom_theme</code>), and co... |
<p>I have the following ingress.yaml file</p>
<pre><code>apiVersion: extensions/v1beta1
kind: Ingress
metadata:
name: in
annotations:
kubernetes.io/ingress.class: alb
alb.ingress.kubernetes.io/scheme: internet-facing
alb.ingress.kubernetes.io/load-balancer-attributes: idle_timeout.timeou... | <p>I have been able to solve the issue. Thought it would be helpful for everyone.</p>
<ol>
<li>Updated my ALB Ingress Controller to v2.1. Instructions can be found at: <a href="https://kubernetes-sigs.github.io/aws-load-balancer-controller/v2.1/deploy/installation/" rel="nofollow noreferrer">AWS LoadBalancer Controller... |
<p>Getting the below error for the command <code>kubectl apply -n prod -f kustomize/kustomization.yaml</code></p>
<pre><code>error: unable to recognize "kustomize/kustomization.yaml": no matches for kind "Kustomization" in version "kustomize.config.k8s.io/v1beta1"
</code></pre>
<p>Please a... | <p>Firstly I recommend to read official doc: <a href="https://kubernetes.io/docs/tasks/manage-kubernetes-objects/kustomization/" rel="nofollow noreferrer">kubernetes-kustomization</a>.</p>
<p>To solve the problem use <code>-k</code> flag instead of <code>-f</code> flag in command:</p>
<pre><code>$ kubectl apply -k <... |
<p>When I use this command: "kubectl get nodes" I get the below errors:</p>
<pre><code>Error from server (Timeout): the server was unable to return a response in the time allotted, but may still be processing the request (get nodes)
</code></pre>
<p>Can anyone help to solve this issue?</p>
| <p>As OP @Sam.Yang informed in comment section problem is resolved.</p>
<p>Problem was in the wrong configuration of <code>KUBE_ETCD_VERSION</code> in <code>apiserver.sh</code>.</p>
|
<p>We have set up full Prometheus stack - Prometheus/Grafana/Alertmanager/Node Explorer/Blackbox exporter using community helm charts in our Kubernetes cluster. Monitoring stack is deployed in its own namespace and our main software, comprised of microservices is deployed in the default namespace. Alerting is operating... | <p>Answering my own question. It seems that I have typed:</p>
<pre><code>replacement: prometheus-blackbox-exporter:9115
</code></pre>
<p>but instead it must be the service name:</p>
<pre><code>replacement: stage-prometheus-blackbox-exporter:9115
</code></pre>
<p>According to documentation:</p>
<p><em>replacement: local... |
<p>I'am using the new <a href="https://kit.svelte.dev/docs" rel="nofollow noreferrer">SvelteKit</a> Framework with the <code>node-adapter</code></p>
<p>and i have a problem of <code>undefined</code> Environment-Variables when using <code>process.env.APPLICATION_KEY_ID</code> Syntax in an endpoint in production build.</... | <p>SvelteKit uses <a href="https://vitejs.dev/" rel="nofollow noreferrer">Vite</a> as it's bundler. It is probably best to stick to how this package deals with environment variables. Which is to say, all env variabled prefixed with <code>VITE_</code> will be available in your code using <code>import.meta.env.VITE_xxx... |
<p>I have this kind of deployment</p>
<pre class="lang-yaml prettyprint-override"><code>apiVersion: apps/v1
kind: Deployment
metadata:
name: deployment-name
labels:
key: value
spec:
replicas: 1
selector:
matchLabels:
key: value
template:
metadata:
key: value
spec:
serviceAcco... | <p>That is an expected behavior as the <code>Deployment</code> controller ensures that the <code>replicas</code> number of pods defined in its <code>spec</code> is always in the <code>Ready</code> state. Failing which, it will try to restart the
failing containers using the <code>Backoff</code> algorithm.</p>
<p>You co... |
<p>I am having problems trying to get communication between two services in a kubernetes cluster. We are using a kong ingress object as an 'api gateway' to reroute http
calls from a simple Angular frontend to send it to a .NET Core 3.1 API Controller Interface backend.</p>
<p>In front of these two ClusterIP services s... | <p>Chris,</p>
<p>I haven't used linode or kong and don't know what your frontend actually does, so I'll just point out what I can see:</p>
<ul>
<li><p>The simplest dns check is to curl (or ping, dig, etc.):</p>
<ul>
<li>http://[dataapi's pod ip]:80 from a host node</li>
<li>http://[kong-proxy svc's internal ip]/dataapi... |
<p>Liveness probes are supposed to trigger a restart of failed containers. Do they respect the default stateful set <a href="https://kubernetes.io/docs/concepts/workloads/controllers/statefulset/#deployment-and-scaling-guarantees" rel="nofollow noreferrer">deployment and scaling guarantees</a>. E.g. if the liveness pro... | <p>According to <a href="https://kubernetes.io/docs/tasks/configure-pod-container/configure-liveness-readiness-startup-probes/" rel="noreferrer">https://kubernetes.io/docs/tasks/configure-pod-container/configure-liveness-readiness-startup-probes/</a> the liveness probes are a feature implemented in the <code>kubelet</c... |
<p>I have written a Go-based K8s client application to connect with the K8s cluster. To handle the realtime notification from the K8s cluster (add, delete, update) of Pod, Namespace, and Node, I have programmed an informer. The code snippet is below.</p>
<p>I want to bring specific attention to the "runtime.HandleCras... | <p>Your question is:</p>
<blockquote>
<p>Is there any way I can register a callback function (similar to Informer.AddEventHandler()).</p>
</blockquote>
<p>A believe what you are looking for is <code>SetWatchErrorHandler()</code></p>
<p>From the <a href="https://github.com/kubernetes/client-go/blob/v0.20.5/tools/cache/s... |
<p>I successfully maintain a kubernetes cluster in digital ocean throught terraform. The core cluster configuration is the following:</p>
<pre><code>resource "digitalocean_kubernetes_cluster" "cluster" {
name = var.name
region = var.region
version = var.k8s_version
vpc_uuid = digitalo... | <blockquote>
<p>Is there a way to perform that operation through terraform?</p>
</blockquote>
<p>There might be some edge cases where there is a solution to this. Since I am not familiar with kubernetes inside DigitalOcean I can't share a specific solution.</p>
<blockquote>
<p>As an alternative options, is it possible ... |
<p>I have an ingress something like below</p>
<pre><code>apiVersion: extensions/v1beta1
kind: Ingress
metadata:
name: staging-ingress-rules-login
annotations:
kubernetes.io/ingress.class: 'nginx'
nginx.ingress.kubernetes.io/proxy-body-size: '0'
spec:
rules:
- host: staging.mysite.com
http:
pat... | <p>This is a community wiki answer, feel free to edit and expand it.</p>
<p>As we are lacking some details regarding your configuration, I will explain how you can deal with this in general.</p>
<p>You can use the below annotation in order to add a custom location block:</p>
<pre><code>nginx.ingress.kubernetes.io/confi... |
<p>I have Kubernets 1.20.1 cluster with single master and single worker configured with <code>ipvs</code> mode. Using calico CNI <code>calico/cni:v3.16.1</code>. Cluster running on OS RHEL 8 kernel <code>4.18.0-240.10</code> with firewalld and selinux disabled.</p>
<p>Running one <code>netshoot</code> pod (<code>10.1.3... | <p>I was able to resolve this issue by running below command on <code>ens192</code> interface on VMware VM on.</p>
<pre><code># cat /etc/sysconfig/network-scripts/ifcfg-ens192 | grep ETHTOOL
ETHTOOL_OPTS="-K ens192 tx-udp_tnl-csum-segmentation off; -K ens192 tx-udp_tnl-segmentation off"
</code></pre>
<p>got t... |
<p>I'm attempting to create a Kubernetes deployment that allows building Docker images and Jenkins on the same host. Here is my YAML configuration for the deployment containing Docker in Docker and Jenkins containers within the <code>jenkins-docker-in-docker</code> deployment:</p>
<pre><code>apiVersion: apps/v1
kind: D... | <p>Docker tries to use the unix socket to connect to the daemon.
This happens, when no DOCKER_HOST environment variable is set.</p>
<p>Use the correct host and port to connect to your docker daemon. In your setup it would be "dind-daemon".</p>
|
<p>I was reading k8s docs at <a href="https://kubernetes.io/docs/concepts/services-networking/service/" rel="nofollow noreferrer">https://kubernetes.io/docs/concepts/services-networking/service/</a>.</p>
<blockquote>
<p>NodePort: Exposes the Service on each Node's IP at a static port (the
NodePort). A ClusterIP Service... | <p>What you're seeing is right because the IP you're hitting with <code>nmap</code> is the IP of the <code>LoadBalancer</code> created by the service of type <code>LoadBalancer</code>, which is meant to be open at 80 (and/or 443). While <code>NodePort</code> is accessible on the IP of the worker node on which the pod a... |
<p>It seems a silly question, but how do I expand the "+ 1 more..." from the endpoints list?</p>
<p>Particularly I want to see all the endpoints of a service and the following command hides some endpoints behind the "+ 1 more...".</p>
<pre><code> kubectl describe service <name>
</code></pre>... | <p>You can use the command: <code>kubectl describe endpoints <endpoint name></code></p>
<p>For eg. the output of <code>kubectl get endpoints -o wide</code>:</p>
<pre><code>NAME ENDPOINTS AGE
traefik-dashboard ... |
<p>I understand the concept of setting a <code>request</code> or a <code>limit</code> on a Kubernetes pod for both <code>CPU</code> and/or <code>memory</code> resources but I'm trying to understand what happens if you don't set either <code>request</code> or <code>limit</code> for say a CPU?</p>
<p>We have configured a... | <p><strong>What happens if you don't set either request or limit for say a CPU?</strong></p>
<blockquote>
<p>When you don’t specify a request for CPU, you’re saying you don’t
care how much CPU time the process running in your container is
allotted.</p>
</blockquote>
<blockquote>
<p>In the worst case, it may not get any... |
<p>I am having an issue with the authentication operator not becoming stable (bouncing Between Avaialbe = True, and Degraded = True). The operator is trying to check the health using the endpoing <a href="https://oauth-openshift.apps.oc.sow.expert/healthz" rel="nofollow noreferrer">https://oauth-openshift.apps.oc.sow.e... | <p>I just resolved this issue. To check you have the same issue:</p>
<pre><code>oc logs -n openshift-console console-xxxxxxx-yyyyy
</code></pre>
<p>Check if you have messages like these:</p>
<blockquote>
<p>error contacting auth provider (retrying in 10s): request to OAuth
issuer endpoint
<a href="https://oauth-openshi... |
<p>I am trying to build spark image to use with Kubernetes (minikube locally) (following <a href="https://spark.apache.org/docs/latest/running-on-kubernetes.html" rel="nofollow noreferrer">https://spark.apache.org/docs/latest/running-on-kubernetes.html</a>, <a href="https://itnext.io/running-spark-job-on-kubernetes-min... | <p>I have missed these as well. But this should be OK</p>
<p>You see the lines</p>
<pre><code>Successfully tagged spark:v2
Successfully tagged spark-py:v2
Successfully tagged spark-r:v2
</code></pre>
<p>so your build has succeeded, and the Docker images for JVM-, Python- and R-based jobs to be used for Spark jobs on Ku... |
<p>I'v got microservices deployed on GKE, with Helm v3; all apps/helms stood nicely for months, but yesterday for some reason pods were re-created</p>
<pre class="lang-sh prettyprint-override"><code>kubectl get pods -l app=myapp
NAME READY STATUS RESTARTS AGE
myapp-75cb966746-grjkj 1/1 ... | <p>First thing first, I would check nodes on which the Pods were running.</p>
<ul>
<li>If a Pod is restarted (which means that the <strong>RESTART COUNT</strong> is incremented) it usually means that the Pod had an error and that error caused the Pod to crash.</li>
<li>In your case tho, the Pod were completely recreate... |
<p>I am trying to bring up an on-prem k8 cluster using kubespray with 3 master and 5 worker nodes. The node IPs are from 2 different subnets.</p>
<p>Ansible inventory:</p>
<pre><code>hosts:
saba-k8-vm-m1:
ansible_host: 192.168.100.1
ip: 192.168.100.1
access_ip: 192.168.100.1
saba-k8-vm-m2:
ansible_host: 192.168... | <p>Thanks to @<a href="https://stackoverflow.com/users/5689995/laimison">laimison</a> for giving me those pointers.</p>
<p>Posting all my observations, so it can be useful to somebody.</p>
<p>On M1,</p>
<pre><code>root@saba-k8-vm-m1:~# ip r | grep tunl
10.233.72.0/24 via 192.168.100.5 dev tunl0 proto bird onlink
10.233... |
<p>Today, it's 366 days since the kubernetes 1.17 cluster is running.
Accordingly, All PKI certificates are expired.
Since we are using k8s 1.17, we are able to renew certificates</p>
<pre class="lang-sh prettyprint-override"><code>kubeadm alpha certs renew all
</code></pre>
<p>everything is OK , except jenkins: still ... | <p>actually the issue is not jenkins , but it was kubernetes master.
actually, i have to restart the control plane.
I reboot master tomake sure that all control plane components are refreshed.
Issue is fixed now</p>
|
<p>I have a Kubernetes cluster with the following components(Nginx-ingress).
<a href="https://i.stack.imgur.com/pVzKw.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/pVzKw.png" alt="enter image description here" /></a></p>
<p>When I deploy a new version of the Tomcat, old ones will stick around for a... | <p>I think you should try the blue green deployment model.</p>
<blockquote>
<p>A blue/green deployment is a change management strategy for releasing software code. Blue/green deployments, which may also be referred to as A/B deployments require two identical hardware environments that are configured exactly the same wa... |
<p>I have a Kubernetes pod running Laravel but I get the following permission error on load:</p>
<p><a href="https://i.stack.imgur.com/zAidq.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/zAidq.png" alt="Permission denied" /></a></p>
<p>If I access the pod interactively and run chmod on /storage:</p... | <p>You can use a <a href="https://kubernetes.io/docs/concepts/containers/container-lifecycle-hooks/#container-hooks" rel="noreferrer">PostStart</a> Container hook.</p>
<pre><code>apiVersion: apps/v1
kind: Deployment
metadata:
name: app
spec:
replicas: 1
selector:
matchLabels:
container: ... |
<p>I would like to use <em>podAffinity</em> with <em>matchFields</em>.
On the web I only found examples with field metadata.name :</p>
<pre><code>- matchFields:
- key: metadata.name
operator: NotIn
values:
- worker-1
</code></pre>
<p>I would like to know if there are any other valid node fields I can use ... | <p>I did some digging and I found out that <code>Matchfields</code> was introduced because of the issue with scheduling <code>DaemonSets</code>. The Controller that creates pod was depending the <code>kubernetes.io/hostname</code> label on a Node. This whole setup was assuming that this label is being equal to the node... |
<p>I have set up a Google Cloud Platform kubernetes cluster (and Container Registry) with source code on GitHub. Source code is divided into folders with separate Dockerfiles for each microservice.</p>
<p>I want to set up CI/CD using GitHub actions.</p>
<p>As far as I understand, the <a href="https://github.com/actions... | <blockquote>
<p>How is the deployment performed?</p>
</blockquote>
<p>To know how to deploy or run this workflow please refer this <a href="https://github.com/google-github-actions/setup-gcloud/tree/master/example-workflows/gke" rel="nofollow noreferrer">documentation</a></p>
<blockquote>
<p>What is kustomize for?</p>
... |
<p>I have set up <code>jenkins</code> on GKE using the official helm <a href="https://github.com/helm/charts/tree/master/stable/jenkins" rel="nofollow noreferrer">chart</a>.</p>
<p>I have also created an <code>nginx-ingress</code> controller installation using helm and I am able to access jenkins via <code>https://112... | <p>I had similar issue. I have solved it enabling the "Use WebSocket". Jenkins Salve/Agent > Configure > Launch Method > Use WebSocket (enable) > Save.</p>
|
<p>In my openshift cluster, I noticed that all my pods have a port that's open without me specifying it.
Its the pott 443 which is apperantly used for the k8s api as mentiond in <a href="https://stackoverflow.com/questions/47523136/whats-the-purpose-of-the-default-kubernetes-service#:%7E:text=AFAIK%20the%20kubernetes%2... | <blockquote>
<p>I noticed that all my pods have a port that's open without me specifying it.</p>
</blockquote>
<p>Yes, the <code>contanerPort:</code> is just metadata, the container might listen to other ports as well.</p>
<blockquote>
<p>Is this safe?, What opens the container port without me specifying it? Is there a... |
<p>I'm trying to deploy a simple tutorial app to a new fargate based kubernetes cluster.</p>
<p>Unfortunately I'm stuck on ImagePullBackOff for the coredns pod:</p>
<pre><code>Events:
Type Reason Age From Message
---- ------ ---- ---- ... | <p>Creating an answer to sum up the discussion in the comment that deemed to be acceptable. The most common (and arguably easier) way to setup an EKS cluster with Fargate support is to use <a href="https://docs.aws.amazon.com/eks/latest/userguide/getting-started-eksctl.html" rel="nofollow noreferrer">EKSCTL</a> and set... |
<p>I have successfully deployed</p>
<ul>
<li>prometheus via helm chart <strong>kube-prometheus-stack</strong> (<a href="https://prometheus-community.github.io/helm-charts" rel="nofollow noreferrer">https://prometheus-community.github.io/helm-charts</a>)</li>
<li>prometheus-adapter via helm chart <strong>prometheus-adap... | <p>I'm using both helm charts (<em>kube-prometheus-stack</em> and <em>prometheus-adapter</em>).</p>
<p>additional path prefix that works for me is "/", but, prometheus url must be with the name of your helm-install parameter for stack ("helm install "). I'm using "<strong>prostack</strong>&quo... |
<p>I have a Bitnami WordPress helm release, I need to browse the files and edit some from the persistent volumes it created. Ideally I'd be able to browse the files using a GUI (like Nautilus/GNOME files) and edit the files using VS Code for ease of use.</p>
<p>Should I edit the files from within a mounted container? H... | <p>Before all I should mention that everything below is for development environment.
Do not think of doing manual changes into container apps in production. For production you should make it so that all the necessary changes are applied automatically.</p>
<h3>Copy files from remote machine and back</h3>
<pre class="lan... |
<p>I am running my fabric network on kubernetes and I have setup ca servers for all the organisations. I am able to register and enroll the user from the cli but when i am using the <strong>fabric-ca-client</strong> library with <strong>nodejs</strong> to register and enroll the users. I am facing the CONNECTION Timeou... | <p>I found the solution to this issue. The issue was related to the connection timeout, my CA Server was receving the requests and able to process them also but due to the short timeout the request was being cancelled. The solution was to increase the <code>connection timeout</code> and <code>request-timeout</code>. Th... |
<p>I would like to do two things with MicroK8s:</p>
<ol>
<li>Route the host machine (Ubuntu 18.04) ports 80/443 to Microk8s</li>
<li>Use something like the simple ingress defined in the <a href="https://kubernetes.io/docs/concepts/services-networking/ingress/#ingress-controllers" rel="noreferrer">kubernetes.io</a> doc... | <h1>TLDR</h1>
<p>Update the annotation to be <code>kubernetes.io/ingress.class: public</code></p>
<h1>Why</h1>
<p>For MicroK8s v1.21, running</p>
<pre><code>microk8s enable ingress
</code></pre>
<p>Will create a <code>DaemonSet</code> called <code>nginx-ingress-microk8s-controller</code> in the <code>ingress</code> nam... |
<p>I want to ignore the resource request that is defined in the service manifest:</p>
<pre><code>resources:
requests:
memory: "512Mi"
cpu: "500m"
limits:
memory: "1024Mi"
cpu: "1000m"
</code></pre>
<p>because sometimes developers specifies requests more than t... | <p>What you can use here is a <code>ResourceQuota</code> something like:</p>
<pre><code>apiVersion: v1
kind: ResourceQuota
metadata:
name: mem-cpu
spec:
hard:
cpu: "100m"
memory: "100Mi"
requests.cpu: "500m"
requests.memory: "512Mi"
limits.cpu: "1&quo... |
<p>While working with minikube ingress, I have to write <code>nginx.ingress.kubernetes.io/rewrite-target: /$1</code>. I have been trying hard to understand why we need this annotation and how to use it.</p>
<p>I know that the <a href="https://kubernetes.github.io/ingress-nginx/user-guide/nginx-configuration/annotations... | <p>I don't know if things changes with new versions of the Ingress resource or with new versions of the Nginx Ingress Controller, but this is how I think it works.</p>
<p>Suppose I want to serve 2 different web applications under the same domain, with a Ingress.</p>
<ul>
<li>App A is expecting requests under <code>/</c... |
<p>I think I have interesting use case so I would like to hear advices of the people with more knowledge.
I have my App ("<strong>ads</strong>") which works in Kubernetes without any issue. It runs on port 9000.
It has args which have its instance name (<code>serverName</code>) and in the list of servers it h... | <p>No you can not have single service for two logically different pods . Service normally does load balancing between replica pods. So user request on your pods will be automatically route to any of the pod by the service automatically.So in your case you don't want this to happen. Request for ads can lie to ads2 serve... |
<p>I am on a GCP k8s cluster. I want to be sure that no pods or other kubernetes resources are using a particular ConfigMap first, before deleting the ConfigMap. Is there a kubectl command that I can use to check what is using a ConfigMap?</p>
| <p>You could export all your resources and grep for the config map name.</p>
<p>You can use this script to export all selected resources (select resources in the RESOURCES category)</p>
<pre><code>NAMESPACE="your_namespace"
RESOURCES="configmap secret daemonset deployment service"
for resource in $... |
<p>I am following this image architecture from K8s</p>
<p><a href="https://i.stack.imgur.com/2gu6N.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/2gu6N.png" alt="enter image description here" /></a></p>
<p>However I can not seem to connect to socket.io server <strong>from within</strong> the cluster... | <p>The services DNS name must be set in your container to access its VIP address.
Kubernetes automatically sets environmental variables in all pods which have the <strong>same selector</strong> as the <strong>service</strong>.</p>
<p>In your case, all pods with <strong>selector A</strong>, have environmental variables ... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.