Question stringlengths 65 39.6k | QuestionAuthor stringlengths 3 30 ⌀ | Answer stringlengths 38 29.1k | AnswerAuthor stringlengths 3 30 ⌀ |
|---|---|---|---|
<p>I want to customize the arguments to kube-apiserver so that I can inspect the requests being made, so that I can debug a failing request. However, I'm not sure what I need to modify. I know that kube-apiserver can't be being deployed with helm, because helm requires an API server in order to do its job. So it must b... | Robin Green | <p>The kube-apiserver is configured with a static manifest file, which is stored in <code>/etc/kubernetes/manifests/kube-apiserver.yaml</code>.</p>
<p>So find out the ID of the container that is the Kubernetes control plane node in kind:</p>
<pre><code>docker ps|grep cluster-control-plane
</code></pre>
<p>Get a shel... | Robin Green |
<p>I am trying to deploy a simple node-red container on kubernetes locally to monitor its usage and at the same time create a persistent volume storage so that my node red work is saved. However, I can't get it to deploy to kubernetes. I have created a Deployment.yaml file with the following code</p>
<pre><code>apiVers... | Quazi Afnan Ahmed | <p>The <code>requests</code> & <code>limits</code> sections needs to be under a <code>resources</code> heading as follows:</p>
<pre><code> spec:
containers:
- name: nodered
image: nodered/node-red:latest
resources:
limits:
memory: 512Mi
cpu: "1&q... | hardillb |
<p>I get the error: <strong><em>python: can't open file 'app.py': [Errno 2] No such file or directory</em></strong> when I try to create a deployment. I have included the folder structure, deployment and PVC manifests.</p>
<p>When I create a container from the docker image which I built using the docker file below, it... | UJAY | <p>I didn't get the point. </p>
<p>In <code>Dockerfile</code>, you put <code>app.py</code> in docker image's folder <code>/app</code></p>
<pre><code>WORKDIR /app
COPY ./app /app
CMD ["python", "app.py"]
</code></pre>
<p>Then in Kubernetes, you try to replace the folder <code>/app</code> with a persistent volume. <... | BMW |
<p>The <a href="https://quay.io/repository/kubernetes-ingress-controller/nginx-ingress-controller?tag=latest&tab=tags" rel="nofollow noreferrer">nginx ingress controller</a> for Kubernetes uses the cap_net_bind_service capability, which is a Linux filesystem attribute, to obtain the permissions to open a privileged... | Robin Green | <p>This turned out to be because on the Linux host, <code>dockerd</code> was being run with the <code>--no-new-privileges</code> option.</p>
| Robin Green |
<p>I had Minikube installed on my Mac and then I removed it and replaced it with a <a href="https://medium.com/better-programming/local-k3s-cluster-made-easy-with-multipass-108bf6ce577c" rel="nofollow noreferrer">3-node cluster using Multipass and K3s</a>. Now my issue is that <code>kubectl</code> is still referring to... | HemOdd | <p>Your error are mostly about the wrong setting in kubeconfig, please double check local file <code>~/.kube/confg</code></p>
<p>This is the default kubectl configuration file, it includes three parts: clusters, contexts and users</p>
<p>If you have two kubernetes clusters (one is minikube, and the other is k3s), yo... | BMW |
<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... | Kowshhal | <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... | Em Ae |
<p>Is the best approach to make migrations and migrate models using a Job and a Persistent Volume Claim on Kubernetes Django deployed app?</p>
<p>Persistent Volume</p>
<pre><code>apiVersion: v1
kind: PersistentVolumeClaim
metadata:
name: csi-pvc
spec:
accessModes:
- ReadWriteOnce
resources:
requests:
... | cuscode | <p>Looks fine for me. Not sure if you need run this job once or every time, when a new pod is up?</p>
<p>If it is running before Django service pod started every time, maybe you can get help with <a href="https://kubernetes.io/docs/concepts/workloads/pods/init-containers/" rel="nofollow noreferrer">Init Containers</a>... | BMW |
<p>I am currently facing a situation where I need to deploy a small cluster (only 4 pods for now) which will be containing 4 different microservices. This cluster has to be duplicated so I can have one PRODUCTION cluster and one DEVELOPMENT cluster.</p>
<p>Even if it's not hard from my point of view (Creating a cluste... | Emixam23 | <p>Did you know <a href="https://helm.sh/docs/topics/charts/" rel="nofollow noreferrer">helm chart</a>? It is designed for different environment deployment. </p>
<p>With different <code>values.yaml</code> file, you can quickly deploy to different environment with same source code base.</p>
<p>For example, you can nam... | BMW |
<p>If I run:</p>
<pre><code>kubectl exec spi-tools-dev-3449236037-08pau -it -- /bin/bash
</code></pre>
<p>I get an interactive shell, but something is eating ^p characters. If I type one ^p, nothing happens. When I type a second ^p, two get sent. In bash, I go two items back in my history. In emacs, I go up two l... | Roy Smith | <p>It looks like the answer is:</p>
<ol>
<li>Yes, this is kubectl's emulation of docker's ctrl-p/ctrl-q detach sequence.</li>
<li>No, there's nothing you can do to change it.</li>
<li>See <a href="https://github.com/kubernetes/kubernetes/issues/79110" rel="nofollow noreferrer">this closed bug</a>.</li>
</ol>
<p>I'm r... | Roy Smith |
<p>When running <code>kubectl get events</code>, is there a way to filter by events without knowing the name of the pod?</p>
<p>I am trying to do this with <a href="https://learn.microsoft.com/en-us/azure/devops/pipelines/tasks/deploy/kubernetes?view=azure-devops" rel="nofollow noreferrer">Azure Pipeline's <strong>Kub... | HXK | <p>I don't have azure environment, but I can show events on pods</p>
<pre><code>master $ kubectl get events --field-selector involvedObject.kind=Pod
LAST SEEN TYPE REASON OBJECT MESSAGE
<unknown> Normal Scheduled pod/nginx Successfully assigned default/nginx to node01
5m13s Normal ... | BMW |
<p>By default, image-gc-high-threshold and image-gc-low-threshold values are 90 and 80% respectively.</p>
<p>We want to change them to 80 and 70, How we can change the Kubernetes image garbage collection threshold values.</p>
| Rahul Khengare | <p>Changing the garbage collection thresholds can be done using switches on the <code>kubelet</code>.</p>
<p>From <a href="https://kubernetes.io/docs/admin/kubelet/" rel="nofollow noreferrer">the docs</a></p>
<pre><code>--image-gc-high-threshold int32 The percent of disk usage after which image garbage collection ... | coreypobrien |
<p>With the rise of containers, Kuberenetes, 12 Factor etc, it has become easier to replicate an identical environment across dev, staging and production. However, what there appears to be no common standard to domain name conventions.</p>
<p>As far as I can see it, there are two ways of doing it:</p>
<ul>
<li>Use su... | vpetersson | <blockquote>
<p>There are only two hard things in Computer Science: cache invalidation
and naming things.</p>
<p>-- Phil Karlton</p>
</blockquote>
<p>Depends on the company size.</p>
<p>Small businesses usually go for dashes and get the wildcard certificate.
So they would have <code>dev.example.com, test.exa... | Marcus Maxwell |
<p>I have a couple Charts which all need access to the same Kubernetes Secret. My initial plan was to create a Chart just for those Secrets but it seems <a href="https://github.com/helm/helm/issues/4670" rel="nofollow noreferrer">Helm doesn't like that</a>. I am thinking this must be a common problem and am wondering w... | adelbertc | <p>Best practice is, don't save any sensitive secrets in kubernetes clusters. kubernetes secret is <strong>encode</strong>, not <strong>encrypt</strong>. </p>
<p>You can reference the secret via aws ssm/secrets manager, hashicorp Vault or other similars. </p>
<p><a href="https://github.com/aws-samples/aws-workshop-fo... | BMW |
<p>AKS- Can't log into one of the worker nodes (VM). I assigned the public IP as per <a href="https://gist.github.com/tsaarni/624d5406e442f08fe11083169c059a68" rel="nofollow noreferrer">https://gist.github.com/tsaarni/624d5406e442f08fe11083169c059a68</a> but still no luck. I get the error below:</p>
<blockquote>
<p>Joh... | codeRelix | <p>if you create AKS from Azure portal, you can specify the user name of VM.</p>
<p>at that case, user name is not <strong>azureuser</strong> any more</p>
<p>you can find out the user name and public key from Azure portal</p>
<p><a href="https://i.stack.imgur.com/GTelq.jpg" rel="nofollow noreferrer"><img src="https://i... | SILENCE |
<p>I've built a docker image based on <a href="https://hub.docker.com/_/httpd" rel="nofollow noreferrer">httpd:2.4</a>. In my k8s deployment I've defined the following <code>securityContext</code>:</p>
<pre><code>securityContext:
privileged: false
runAsNonRoot: true
runAsUser: 431
allowPrivilegeEscalation: fal... | Mike S | <p>Run the apache on a port greater than 1024. </p>
<p>Ports below 1024 are privileged ports only available to the root user.</p>
<p>As you will have some ingress load balancer before that, it shouldn't matter :-)</p>
| flob |
<p>I understand that files / folders can be copied into a container using the command:</p>
<pre><code>kubectl cp /tmp/foo_dir <some-pod>:/tmp/bar_dir
</code></pre>
<p>However, I am looking to do this in a yaml file</p>
<p>How would I go about doing this? (Assuming that I am using a deployment for the container... | Kyle Blue | <p>The way you are going is wrong direction. Kubernetes does this with serveral ways.</p>
<p>first, think about configmap</p>
<p><a href="https://kubernetes.io/docs/tasks/configure-pod-container/configure-pod-configmap" rel="noreferrer">https://kubernetes.io/docs/tasks/configure-pod-container/configure-pod-configmap<... | BMW |
<p>I want to be able to mount an unknown number of config files in /etc/configs</p>
<p>I have added some files to the configmap using:</p>
<blockquote>
<p>kubectl create configmap etc-configs --from-file=/tmp/etc-config</p>
</blockquote>
<p>The number of files and file names are never going to be known and I would like... | Johan Ryberg | <p>You can mount the ConfigMap as a special volume into your container.</p>
<p>In this case, the mount folder will show each of the keys as a file in the mount folder and the files will have the map values as content.</p>
<p>From the <a href="https://kubernetes.io/docs/tasks/configure-pod-container/configure-pod-config... | sola |
<p>I am trying to deploy an app to Kubernetes cluster via Helm charts. Every time I try to deploy the app I get </p>
<blockquote>
<p>"Liveness probe failed: Get <a href="http://172.17.0.7:80/" rel="nofollow noreferrer">http://172.17.0.7:80/</a>: dial tcp
172.17.0.7:80: connect: connection refused" and "Readiness p... | Javista | <p>Since I can pull the image I did a try</p>
<pre><code>$ docker run -d nikovlyubomir/docker-spring-boot:latest
9ac42a1228a610ae424217f9a2b93cabfe1d3141fe49e0665cc71cb8b2e3e0fd
</code></pre>
<p>I got logs</p>
<pre><code>$ docker logs 9ac
...
2020-03-08 02:02:30.552 INFO 1 --- [ main] o.s.b.w.embedded.to... | BMW |
<p>I'm providing an external-facing REST GET API service in a kubernetes pod on AWS EKS. I had configured an ALB Ingress for this service which enforces Cognito user pool authentication. Cognito is configured with <code>Authorization code grant</code> with the <code>openid</code> OAuth scope enabled.</p>
<p>If I invoke... | Kristof Jozsa | <p>Quoting AWS support on this topic: "the Bearer token can not be used instead of the session cookie because in a flow involving bearer token would lead to generating the session cookie".</p>
<p>So unfortunately this usecase is not possible to implemented as of today.</p>
| Kristof Jozsa |
<p>I am using a inital container(k8s version:v1.15.2) to initial skywalking(6.5.0) jar file before container startup.But I could not found the file and directory the intial container create,this is my initial container define:</p>
<pre><code>"initContainers": [
{
"name": "init-agent",
"image": "r... | Dolphin | <p>So you should go throught this document first</p>
<p><a href="https://kubernetes.io/docs/concepts/storage/volumes/#hostpath" rel="nofollow noreferrer">https://kubernetes.io/docs/concepts/storage/volumes/#hostpath</a></p>
<p>use <code>hostPath</code> as sample</p>
<pre><code> volumes:
- name: agent
hostPath... | BMW |
<p>I have setup kubernetes cluster in Ubuntu 16.04 with a master and a worker. I deployed application and created NodePort service as below.</p>
<pre class="lang-yaml prettyprint-override"><code>apiVersion: apps/v1 # for versions before 1.9.0 use apps/v1beta2
kind: Deployment
metadata:
name: hello-app-deployment
spec... | Prasad | <p>finally, it worked it was with ports for weave wasn't open in firewall as mentioned in <a href="https://github.com/kubernetes/kops/issues/1311" rel="nofollow noreferrer">this</a></p>
<p>also deleted weave deployment in kubernetes, removed /var/lib/weave/weave-netdata.db and deployed weave again, it worked.</p>
| Prasad |
<p>How to constraint a K8s Job to a maximum amount of memory? I've tried the spec below, similar to a pod, but it's not recognized as a valid descriptor:</p>
<pre><code>apiVersion: batch/v1
kind: Job
metadata:
name: countdown
spec:
template:
metadata:
name: countdown
spec:
containers:
- ... | pditommaso | <p>I didn't see any error in your job yaml file</p>
<pre><code>$ kk apply -f job.yaml
job.batch/countdown created
$ kk get pod
NAME READY STATUS RESTARTS AGE
countdown-5dckl 0/1 Completed 0 95s
</code></pre>
| BMW |
<p>I have a micro service scaled out across several pods in a Google Cloud Kubernetes Engine. Being in a multi-cloud-shop, we have our logging/monitoring/telemetry in Azure Application Insights.
Our data should be kept inside Europe, so our GCP Kubernetes cluster is set up with </p>
<pre><code>Master zone: europe-west... | audunsol | <p>the Azure Application Insights are fooling you, because the external IP was registered by Google in California, not considering that these are used by data-centers distributed all over the globe. also have a GCE instance deployed to Frankfurt am Main, while the IP appears as if it would be Mountain View. <a href="ht... | Martin Zeitler |
<p>Kubernetes already provides a way to manage configuration with <code>ConfigMap</code>.</p>
<p>However, I have a question/problem here.</p>
<p>If I have multiple applications with different needs deployed in Kubernetes, all these deployments might share and access some common config variables. Is it possible for Co... | edwin | <p>There are two ways to do that. </p>
<ul>
<li><strong>Kustomize</strong> - Customization of kubernetes YAML configurations (developed as kubernetes sigs, and had been integrated into <code>kubectl</code> command line). But currently it isn't mature enough if compare with <code>helm</code> chart</li>
</ul>
<p><a hr... | BMW |
<p>I'm attempting to read the contents of a Kubernetes Secret using <code>kube-rs</code>. The secret contains a key named "apiKey".</p>
<p>I seem to be able to pull the secret from the kube-apiserver (debug logging shows the correct contents of the secret) but I can't get to the value itself as it's returned ... | Harry | <p>I faced the same issue. I saw that it had some serialization traits at <a href="https://docs.rs/k8s-openapi/0.13.1/src/k8s_openapi/lib.rs.html#482-506" rel="nofollow noreferrer">https://docs.rs/k8s-openapi/0.13.1/src/k8s_openapi/lib.rs.html#482-506</a>, so I resorted to using the <code>serde_json</code> crate which ... | digitalfoo |
<p>I'm currently running through the secure deployment guide for CockroachDB on Kubernetes and while it works exactly as expected, but I'm searching for ways to streamline/automate the deployment. I'm using <code>Configs</code> to deploy, and I would honestly just like to be able to automate the final step (after <cod... | tparrott | <p>take a look on <a href="https://kubernetes.io/docs/concepts/workloads/controllers/jobs-run-to-completion/" rel="nofollow noreferrer">kubernetes jos</a></p>
<pre><code>apiVersion: batch/v1
kind: Job
metadata:
name: pi
spec:
template:
spec:
containers:
- name: pi
image: perl
comman... | BMW |
<p>I was reading about <a href="https://kubernetes.io/docs/concepts/configuration/pod-priority-preemption/" rel="nofollow noreferrer"><strong>Pod Priority and Preemption</strong></a>, I had a question in my mind. </p>
<p>Lets say A is higher priority pod and B is lower one. B is already running , A came along and now ... | Talha Irfan | <p>Answer is Yes.</p>
<blockquote>
<p>If a pending Pod has inter-pod affinity to one or more of the lower-priority Pods on the Node, the inter-Pod affinity rule cannot be satisfied in the absence of those lower-priority Pods. In this case, the scheduler does not preempt any Pods on the Node. Instead, it looks for an... | BMW |
<p>I'm trying to configure SSL certificates in kubernetes with cert-manager, istio ingress and LetsEncrypt. I have installed istio with helm, cert-manager, created ClusterIssuer and then I'm trying to create a Certificate. The acme challenge can't be validated, i'm trying to do it with http01 and can't figure it out ho... | Raducu Ilie Radu | <p>Istio ingress has been deprecated, you can use the Ingress Gateway with the DNS challenge. </p>
<p>Define a generic public ingress gateway:</p>
<pre><code>apiVersion: networking.istio.io/v1alpha3
kind: Gateway
metadata:
name: public-gateway
namespace: istio-system
spec:
selector:
istio: ingressgateway
... | Stefan P. |
<p>I'm fairly novice in GCP and would like to ask a question:</p>
<p>I have two private clusters in the same region with internal LB (all in one VPC), currently pods from both clusters are able to communicate with each other over HTTP.</p>
<p>As far as I understand from the documentation - internal LB is a regional p... | Medvednic | <p>since these are different <a href="https://cloud.google.com/vpc/docs/vpc#ip-ranges" rel="nofollow noreferrer">IP ranges</a> (at least in auto mode), it may not help that it is global VPC - when this should be the case, you'd have to add a <a href="https://cloud.google.com/vpn/docs/how-to/creating-route-based-vpns" r... | Martin Zeitler |
<h2>Problem</h2>
<p>I am trying to implement a Horizontal Pod Autoscaler (HPA) on my AKS cluster. However, I'm unable to retrieve the GPU metrics (auto-generated by Azure) that my HPA requires to scale.</p>
<h2>Example</h2>
<p>As a reference, see <a href="https://learn.microsoft.com/en-us/azure/aks/tutorial-kubernetes-... | KarFan-FS | <p>I managed to do this recently (just this week). I'll outline my solution and all the gotchas, in case that helps.</p>
<p>Starting with an AKS cluster, I installed the following components in order to harvest the GPU metrics:</p>
<ol>
<li>nvidia-device-plugin - to make GPU metrics collectable</li>
<li>dcgm-exporter -... | ndtreviv |
<p>I'm trying to set up my mosquitto server inside a Kubernetes cluster and somehow I'm getting the following error and I can't figure out why.
Could someone help me?</p>
<p><strong>Error:</strong></p>
<pre><code>1551171948: mosquitto version 1.4.10 (build date Wed, 13 Feb 2019 00:45:38 +0000) starting
1551171948: Co... | raven | <p>The problem is with the listener on port 1883, this can be determined because the log hasn't got to the 9001 listener yet.</p>
<p>The problem is most likely because mosquitto can not resolve the IP address of the hostname <code>mosquitto</code>. When passing a hostname the name must resolve to a valid IP address. T... | hardillb |
<p>I am trying to create a custom template for a coder.com installation on a self hosted kubernetes cluster.</p>
<p>When I try to crate a new workspace from the template, I get the following error.</p>
<pre><code>Error: namespaces is forbidden: User "system:serviceaccount:coder:coder" cannot create resource &... | PrestonDocks | <p>This was the solution to my problem.</p>
<pre><code># a cluster role that allows creating namespaces
apiVersion: rbac.authorization.k8s.io/v1
kind: ClusterRole
metadata:
name: coder-create-namespace
rules:
- apiGroups: [""]
resources:
- namespaces
verbs:
- create
- get
... | PrestonDocks |
<p>using a standard istio deployment in a kubernetes cluster I am trying to add an initContainer to my pod deployment, which does additional database setup.</p>
<p>Using the cluster IP of the database doesn't work either. But I can connect to the database from my computer using port-forwarding.</p>
<p>This container ... | Janos Veres | <p>You can't access services inside the mesh without the Envoy sidecar, your init container runs alone with no sidecars. In order to reach the DB service from an init container you need to expose the DB with a ClusterIP service that has a different name to the Istio Virtual Service of that DB. </p>
<p>You could create... | Stefan P. |
<p>So I currently have a self-managed certificate, but I want to switch to a google-managed certificate. The google docs for it say to keep the old certificate active while the new one is provisioned. When I try to create a google-managed certificate for the same ingress IP, I get the following error: <code>Invalid val... | Peter R | <p>This can happen if 2 load balancers are sharing the same IP address (<a href="https://github.com/GoogleCloudPlatform/k8s-multicluster-ingress/blob/master/troubleshooting.md" rel="nofollow noreferrer">source</a>). most likely you would have to detach that IP - or add another IP and then swap, once the certificate had... | Martin Zeitler |
<p>I see <a href="https://github.com/dgkanatsios/CKAD-exercises/blob/master/d.configuration.md#create-and-display-a-configmap-from-a-file-giving-the-key-special" rel="nofollow noreferrer">here</a> a syntax like this:</p>
<pre><code>kubectl create cm configmap4 --from-file=special=config4.txt
</code></pre>
<p>I did no... | Farshid | <p>It appears from generating the YAML that this middle key mean all the keys that are being loaded from the file to be nested inside the mentioned key (special keyword in the question example).</p>
<p>It appears like this:</p>
<pre><code>apiVersion: v1
data:
special: |
var3=val3
var4=val4
kind: ConfigMap
m... | Farshid |
<p>When we were deploying active-mq in azure kubernetes service(aks), where active-mq data folder mounted on azure managed disk as a persistent volume claim. Below is the yaml used for deployment.
<strong>ActiveMQ Image used</strong>: rmohr/activemq
Kubernetes Version: v1.15.7</p>
<pre><code>apiVersion: extensions/v1b... | Gowri Shankar | <p>Its a warning from activemq web admin console. Jetty which hosts web console is unable to create temp directory.</p>
<pre><code>WARN | Failed startup of context o.e.j.w.WebAppContext@517566b{/admin,file:/opt/apache-activemq-5.15.6/webapps/admin/,null}
java.lang.IllegalStateException: Parent for temp dir not configu... | Dhananjay |
<p>I am building a service which creates on demand node red instance on Kubernetes. This service needs to have custom authentication, and some other service specific data in a JSON file.</p>
<p>Every instance of node red will have a Persistent Volume associated with it, so one way I though of doing this was to attach t... | ROHIT SHARMA | <p>The better approach is not to use a PV for flow storage, but to use a <a href="https://nodered.org/docs/api/storage/" rel="nofollow noreferrer">Storage Plugin</a> to save flows in a central database. There are several already in existence using DBs like MongoDB</p>
<p>You can extend the existing Node-RED container t... | hardillb |
<p>I have deployed kube-state-metrics into kube-system namespace and in the same cluster we are having prometheus-operator running I've written the below service monitor file for sending metrics to prometheus but it is not working. Please find the files below.</p>
<p>Servicemonitor.yaml</p>
<pre><code>apiVersion: monit... | Dasari Sai Kumar | <p>ServiceMonitor's selector>matchLabels should match with "Service"'s labels. Check if your service has correct label.</p>
| Arda |
<p>When 1 of my 6 pods connected to the MQTT in AWS IoT Core another pod will also try to connect with the same clientId in the env config of the node server. This will lead to the disconnection and reconnection to the new pod. This event happens continuously, and the topic <code>$aws/events/presence/connected/#</code>... | Vũ Thành An | <p>Can you not just leave the <code>clientId</code> value empty and let the client assign a random one?</p>
| hardillb |
<p>Our setup:</p>
<p>We are using kubernetes in GCP.
We have pods that write logs to a shared volume, with a sidecar container that sucks up our logs for our logging system.
We cannot just use stdout instead for this process.</p>
<p>Some of these pods are long lived and are filling up disk space because of no log rot... | Tyler Zale | <p>We ended up writing our own daemonset to properly collect the logs from the nodes instead of the container level. We then stopped writing to shared volumes from the containers and logged to stdout only.</p>
<p>We used fluentd to the logs around.</p>
<p><a href="https://github.com/splunk/splunk-connect-for-kubernet... | Tyler Zale |
<p>I have successfully built Docker images and ran them in a Docker swarm. When I attempt to build an image and run it with Docker Desktop's Kubernetes cluster:</p>
<pre><code>docker build -t myimage -f myDockerFile .
</code></pre>
<p>(the above successfully creates an image in the docker local registry)</p>
<pre><... | JakeJ | <p>I just had the exact same problem. Boils down to the <code>imagePullPolicy</code>:</p>
<pre><code>PC:~$ kubectl explain deployment.spec.template.spec.containers.imagePullPolicy
KIND: Deployment
VERSION: extensions/v1beta1
FIELD: imagePullPolicy <string>
DESCRIPTION:
Image pull policy. One of A... | Lucas |
<p>When i run</p>
<pre><code>oc import-image centos:7 --confirm true
</code></pre>
<p>I am getting</p>
<pre><code>The import completed with errors.
Name: centos
Namespace: pd-kube-ci
Created: Less than a second ago
Labels: <none>
Annotations: ... | Lucas | <p>Turns out it was a mis-configuration in our <code>openshift_https_proxy</code> ansible var. Specifically we had:</p>
<pre><code>openshift_https_proxy=https://proxy.mycompany.com:8443
</code></pre>
<p>And we should have had</p>
<pre><code>openshift_https_proxy=http://proxy.mycompany.com:8443
</code></pre>
<p>To ... | Lucas |
<p>I'm using Kubernetes 1.11 on Digital Ocean, when I try to use kubectl top node I get this error:</p>
<pre><code>Error from server (NotFound): the server could not find the requested resource (get services http:heapster:)
</code></pre>
<p>but as stated in the doc, heapster is deprecated and no longer required from ... | FakeAccount | <p>If you are running a newer version of Kubernetes and still receiving this error, there is probably a problem with your installation.</p>
<p>Please note that to install metrics server on kubernetes, you should first clone it by typing:</p>
<pre><code>git clone https://github.com/kodekloudhub/kubernetes-metrics-serv... | Farshid |
<p>I have a dotnet application, which is not working as non-root user even though I am exposing it on port 5000, greater then the 1024 requirement. </p>
<pre><code>WORKDIR /app
EXPOSE 5000
COPY app $local_artifact_path
RUN chown www-data:www-data /app /app/*
RUN chmod 777 /app
USER www-data
ENTRYPOINT dotnet $app_e... | Taseer Ahmed | <p>In my case the <code>ASPNETCORE_URLS</code> setting in environment variables or <code>appsettings.json</code> was set to <code>http://+:80</code>.</p>
<p>Changing it to <code>http://+:5000</code> worked. Make sure you change your Docker port bindings as well, or load balancer settings if using AWS.</p>
| Mathias Lykkegaard Lorenzen |
<p>I have newbie question, I could not find the answer.</p>
<p>Let`s assume that I have 2 pods, each on different service in kubernetes. One pod must have set HTTP_PROXY.</p>
<p>When I make internal HTTP request beetwen services from proxy-pod to no-proxy-pod it won`t work, becouse proxy cannot reach internal IPs.</p>
... | xbubus | <p>You probably want to set the <code>NO_PROXY</code> environment variable to the list of hosts that should not use the proxy.</p>
<p>See this SuperUser question/answer for more details</p>
<p><a href="https://superuser.com/questions/944958/are-http-proxy-https-proxy-and-no-proxy-environment-variables-standard">https:/... | hardillb |
<p>Trying to figure out how to authenticate with the storage API from within a GKE cluster.</p>
<p>Code:</p>
<pre><code>Storage storage = StorageOptions.newBuilder()
.setCredentials(ServiceAccountCredentials.getApplicationDefault())
.setProjectId(gcpProjectId)
.build().getService();
</code></pre>
<p><code>getAppl... | Moritz Schmitz v. Hülst | <p>The answer, in part, aside from the annotation syntax, is that, just like me, you probably didn't look closely enough at this part in the documentation:</p>
<pre><code> gcloud iam service-accounts add-iam-policy-binding \
--role roles/iam.workloadIdentityUser \
--member "serviceAccount:PROJECT_ID.svc.id.... | Nathan McKaskle |
<p>I'm new to Istio and learning from the official website examples. The one I can't understand is <a href="https://istio.io/docs/tasks/security/authn-policy/#globally-enabling-istio-mutual-tls" rel="nofollow noreferrer">globally enabling Istio mutual TLS</a>.</p>
<p>I can run the example with the yaml code present on... | leo | <p>You should wait for 1-2 minutes before the policies will be fully enforced. </p>
| Vadim Eisenberg |
<p>I am using the latest Kube cookbook for deploying Kubernetes cluster in my environment using Chef Here is my recipe based on the Kube cookbook available in the <a href="https://supermarket.chef.io/cookbooks/kube" rel="nofollow noreferrer">chef supermarket</a></p>
<pre><code># Etcd
etcd_service 'default' do
action... | Hassnain Alvi | <p>You need to use the v5.0.0 version of that cookbook which has support for Chef Infra Client 16:</p>
<p><a href="https://github.com/aespinosa/cookbook-kube/commit/f95626f6ce00b9f8c9cf94fbcb87dfffb74d00c2" rel="nofollow noreferrer">https://github.com/aespinosa/cookbook-kube/commit/f95626f6ce00b9f8c9cf94fbcb87dfffb74d0... | lamont |
<p>We have an Airflow (Celery executor) setup that can run tasks on our K8s cluster. The tasks that use KubernetesPodOperator can access K8s secrets <a href="https://airflow.apache.org/docs/apache-airflow-providers-cncf-kubernetes/stable/operators.html#how-to-use-cluster-configmaps-secrets-and-volumes-with-pod" rel="no... | SergiyKolesnikov | <p>You can map the secrets as volumes ot variables into your Worker Pods and they will be available for all tasks - either as specific directory or as environment variables.</p>
<p>You just have to modify the Helm Chart (or whatever deployment you use) to use those.</p>
| Jarek Potiuk |
<p>I have a MiniKube that is running and I deploy Airflow via docker-compose this way:</p>
<pre><code>---
version: '3'
x-airflow-common:
&airflow-common
# In order to add custom dependencies or upgrade provider packages you can use your extended image.
# Comment the image line, place your Dockerfile in the di... | val | <p>Using Docker Compose to run KubernetesExecutor seems like a bad idea.</p>
<p>Why would you want to do it?</p>
<p>It makes a lot more sense to use the official Helm Chart - it's easier to manage and configure, you can easily deploy it to your minikube and it will work out-of-the-box with KubernetesExecutor.</p>
<p><a... | Jarek Potiuk |
<p>I've been runnning into what should be a simple issue with my airflow scheduler. Every couple of weeks, the scheduler becomes <code>Evicted</code>. When I run a describe on the pod, the issue is because <code>The node was low on resource: ephemeral-storage. Container scheduler was using 14386916Ki, which exceeds its... | JaMo | <p>I believe Ephemeral Storage is not Airflow's question but more of the configuration of your K8S cluster.</p>
<p>Assuming we are talking about OpenShift' ephemeral storage:</p>
<p><a href="https://docs.openshift.com/container-platform/4.9/storage/understanding-ephemeral-storage.html" rel="nofollow noreferrer">https:/... | Jarek Potiuk |
<p>Behind the enterprise proxy,</p>
<p>what is the proper setting for kubernetes (and docker)?</p>
<ol>
<li>when set the http_proxy, https_proxy, no_proxy</li>
</ol>
<p><code>export http_proxy="http://1.2.3.4:8080"</code></p>
<p>or</p>
<p><code>export http_proxy=http://1.2.3.4:8080</code></p>
<p>or</p>
<p><code>... | hokwang | <p>We always include the scheme in our environment variables.</p>
<p>/etc/profile.d/proxy.sh:</p>
<pre><code>#!/bin/bash
export http_proxy=http://<proxy>:3128
export https_proxy=$http_proxy
export no_proxy=169.254.169.254,localhost,127.0.0.1
export HTTP_PROXY=$http_proxy
export HTTPS_PROXY=$https_proxy
export N... | Valdis R |
<p>I have a mutual TLS enabled Istio mesh. My setup is as follows</p>
<p><a href="https://i.stack.imgur.com/Vcxa4.png" rel="noreferrer"><img src="https://i.stack.imgur.com/Vcxa4.png" alt="enter image description here"></a></p>
<ol>
<li>A service running inside a pod (Service container + envoy)</li>
<li>An envoy gatew... | Pasan W. | <p>The problem is probably as follows: <em>istio-ingressgateway</em> initiates mTLS to <em>hr--gateway-service</em> on port 80, but <em>hr--gateway-service</em> expects plain HTTP connections.</p>
<p>There are multiple solutions:</p>
<ol>
<li>Define a DestinationRule to instruct clients to disable mTLS on calls to <e... | Vadim Eisenberg |
<p>I'm trying to deploy Airflow on kubernetes (on Azure Kubernetes Service) with the celery Executor. However, once a task is done, I get the following error while trying to access its logs:</p>
<pre><code>*** Log file does not exist: /opt/airflow/logs/maintenance/clean_events/2021-08-23T14:46:18.953030+00:00/1.log
***... | Papotitu | <p>You need to have the same webserver secret configured for both webserver and workers: <a href="https://airflow.apache.org/docs/apache-airflow/stable/configurations-ref.html#secret-key" rel="nofollow noreferrer">https://airflow.apache.org/docs/apache-airflow/stable/configurations-ref.html#secret-key</a></p>
<p>It's b... | Jarek Potiuk |
<p>My objective is to be able to deploy airflow on Kubernetes using a custom image (placed in ECR. The reason I want to use this custom Image is because I want to deploy another tool (<a href="https://github.com/airflow-helm/charts/blob/main/charts/airflow/values.yaml#L9" rel="nofollow noreferrer">dbt</a>) with airflow... | alt-f4 | <p>The original image seems to have "dumb-init" binary in, so it should work. However, if you use "imagePullPolicy: IfNotPresent" then Kubernetes might cache the image and even if you re-upload a new image to ECR it might not be pulled (though I believe for latest it should be, unless some custom co... | Jarek Potiuk |
<p>We are now on our journey to break our monolith (on-prem pkg (rpm/ova)) into services (dockers).</p>
<p>In the process we are evaluation envoy/istio as our communication and security layer, it looks great when running as sidecar in k8s, or each service on a separate machie.</p>
<p>As we are going to deliver severa... | user1447703 | <p>You can <a href="https://istio.io/latest/docs/examples/virtual-machines/" rel="nofollow noreferrer">run part of your services on Kubernetes and part on VMs</a>.</p>
| Vadim Eisenberg |
<p>I'm installing jupyterhub on k8s using <a href="https://z2jh.jupyter.org/en/stable/jupyterhub/installation.html#install-jupyterhub" rel="nofollow noreferrer">helm</a>.</p>
<pre><code>helm upgrade --cleanup-on-fail --install jupyterhub jupyterhub-2.0.0/jupyterhub/ --namespace my-NS --create-namespace --version=2.0.0 ... | veeresh patil | <p>Disable the pre-pull hook:</p>
<p><a href="https://z2jh.jupyter.org/en/latest/administrator/optimization.html#pulling-images-before-users-arrive" rel="nofollow noreferrer">https://z2jh.jupyter.org/en/latest/administrator/optimization.html#pulling-images-before-users-arrive</a></p>
<p>prePuller:
hook:
enabled: false<... | Mike Barry |
<p>I currently have airflow running in a Kubernetes cluster in Azure using the helm chart for Apache airflow. I am able to use the API from the VM where I port forward the web server, using the endpoint: http://localhost:8080/api/v1/dags/test_trigger/dagRuns</p>
<p>Can anyone point me in the right direction for how I c... | adan11 | <p>There is a short chapter in Airflow Helm Chart's Production Guide:</p>
<p><a href="https://airflow.apache.org/docs/helm-chart/stable/production-guide.html#accessing-the-airflow-ui" rel="nofollow noreferrer">https://airflow.apache.org/docs/helm-chart/stable/production-guide.html#accessing-the-airflow-ui</a></p>
<p>It... | Jarek Potiuk |
<p>The syntax for adding a dependency to a helm 3 chart looks like this (inside of chart.yaml).<br>
How can you specify a release name if you need multiple instances of a dependency?</p>
<pre class="lang-yaml prettyprint-override"><code>apiVersion: v2
name: shared
description: Ingress Controller and Certificate Manage... | Stephen | <p>After 5 more minutes of searching I found that there's an <code>alias</code> field that can be added, like so:</p>
<pre class="lang-yaml prettyprint-override"><code>dependencies:
- name: cert-manager
alias: first-one
version: ~0.13
repository: https://charts.jetstack.io
- name: cert-manager
alia... | Stephen |
<p>I am working on Airflow 1.10.</p>
<p>I have problem with running commands on KubernetesPodOperator, where entire command is evaluated during DAG runtime.</p>
<p>I am generating command in DAG runtime as some of command's arguments depends on parameters passed by user.</p>
<p>As I read from documentation
KubernetesPo... | domandinho | <p>The problem is that JINJA template returns the template as string by default.</p>
<p>In recent Airflow, however (As of Airlfow 2.1.0) you can render the templates as native python objects:</p>
<p><a href="https://airflow.apache.org/docs/apache-airflow/stable/concepts/operators.html#rendering-fields-as-native-python... | Jarek Potiuk |
<p>I would like to deploy Airflow locally on Minikube and have a local folder mounted for DAGs handling.</p>
<p>Airflow is deployed like this:</p>
<pre><code>helm install $AIRFLOW_NAME apache-airflow/airflow \
--values values.yml \
--set logs.persistence.enabled=true \
--namespace $AIRFLOW_NAMESPACE \
... | val | <p>Assuming that you have some dags in /path/dags already, you should mount your dags folder to scheduler not to webserver (if you are using Airflow 2). Scheduler is the one to parse dags, webserver only displays them based on information stored in the DB so it does not actually need DAGs (it used to need it Airflow 1.... | Jarek Potiuk |
<p>I am currently using the KubernetesPodOperator to run a Pod on a Kubernetes cluster. I am getting the below error:</p>
<blockquote>
<p>kubernetes.client.rest.ApiException: (403) Reason: Forbidden</p>
<p>HTTP response headers: HTTPHeaderDict({'Audit-Id': '',
'Cache-Control': 'no-cache, private', 'Content-Type':
'appl... | adan11 | <p>You can't really. You need to assign and create the roles when you deploy airflow, otherwise that would mean that you have huge security risk because deployed application would be able to give more permissions.</p>
<p>This can be done in multiple ways "automatically" if your intention was to somewhat autom... | Jarek Potiuk |
<p>I'm quite new in docker and VPNs so I don't know what should be the best way to achieve this.</p>
<p>Contex:
I use airflow in Google Cloud to schedule some task. These tasks are dockerized so each task is the execution of a docker container with a script (Using KubernetesPodOperator)</p>
<p>For this use case I need ... | Miguel Angel Alvarez Rodriguez | <p>I think what you saw is good advice.</p>
<p>There are a number of projects that show how it could be done - one example here: <a href="https://gitlab.com/dealako/k8s-sidecar-vpn" rel="nofollow noreferrer">https://gitlab.com/dealako/k8s-sidecar-vpn</a></p>
<p>Using sidecar for VPN connection is usually a good idea. I... | Jarek Potiuk |
<p>I have single node kubenertes cluster running on GKE. All the load is running on single node separated by namesapces.</p>
<p>now i would like to implement the auto-scaling. Is it possible i can scale mircoservices to new node but one pod is running My main node only.</p>
<p>what i am thinking </p>
<p>Main node : ... | Harsh Manvar | <p>I'm not sure that I understand your question correctly but if I do then you may try to use taints and tolerations (node affinity). Taints and tolerations work together to ensure that pods are not scheduled onto inappropriate nodes. All the details are available in the documentation <a href="https://kubernetes.io/doc... | Lachezar Balev |
<p>Here is my deploment template:</p>
<pre><code>apiVersion: extensions/v1beta1
kind: Deployment
metadata:
labels:
name: XXX
version: {{ xxx-version }}
deploy_time: "{{ xxx-time }}"
name: XXX
spec:
replicas: 1
revisionHistoryLimit : 0
strategy:
type : "RollingUpdate"
rollingUpdate:
... | karthikcru | <p>The key section in the documentation that's relevant to this issues is:</p>
<blockquote>
<p>Existing Replica Set controlling Pods whose labels match <code>.spec.selector</code>but whose template does not match <code>.spec.template</code> are scaled down. Eventually, the new Replica Set will be scaled to <code>.sp... | manojlds |
<p>my vm(virtual machine) have Multiple virtual network cards,so it has multiple ip,When I installed kubernetes, etcd was automatically installed and configured,and it automatically selected a default IP. but This IP is not what I want it to listen for. where and how can I configure the etcd to listen the right ip I wa... | Esc | <p>Judging by the error message it looks like you're using <code>kubeadm</code>. You need to add <code>extraArgs</code> to your etcd in <code>ClusterConfiguration</code>, something like (untested):</p>
<pre><code>apiVersion: kubeadm.k8s.io/v1beta1
kind: ClusterConfiguration
etcd:
local:
...
extraArgs:
a... | johnharris85 |
<p><strong>What I want to do:</strong></p>
<p>For my own educational purposes I'm trying to start a kube API server and register a kubelet as a node into it. I'm doing this exercise into a vagrant box which runs linux and a docker runtime. </p>
<p><strong>What I did so far is:</strong></p>
<ol>
<li>I've run a docker... | Lachezar Balev | <p>After a good amount of digging I've managed to make the kubelet register into the kube-api server which opens my way for further building of a small k8s cluster component by component.</p>
<p>The flag that I was looking for in the kubelet config is the following:</p>
<blockquote>
<p>--kubeconfig string</p>
<p>Path t... | Lachezar Balev |
<p>I was checking Kubernetes <a href="https://kubernetes.io/docs/concepts/containers/images/#image-pull-policy" rel="nofollow noreferrer">documentation</a> for pulling images. In that, I saw two policies IfNotPresent and Always. In "Always" its stated that</p>
<blockquote>
<p>If the kubelet has a container im... | Akshit Bansal | <p>When you use an image WITHOUT a tag, Kubernetes will assume that you want the latest version of the image, which is identified by the latest tag by default. If you have multiple versions of the same image in your repository with different tags, such as img1:1.0.0, img1:1.1.0, and img1:latest, Kubernetes will use the... | Viswesn |
<p>I have a question related to Kubernetes Ingress-nginx, I want to use <a href="http://nginx.org/en/docs/http/ngx_http_map_module.html" rel="nofollow noreferrer">ngx_http_map_module</a> to define a new attribute for <a href="https://kubernetes.github.io/ingress-nginx/user-guide/nginx-configuration/log-format/" rel="no... | Maven | <p><a href="https://stackoverflow.com/a/49440631">Related answer</a>: Surround the regex in double-quotes; Nginx uses <code>{</code> and <code>}</code> for defining blocks.</p>
<p>For example:</p>
<pre><code> map $uri $uri_category {
"~[0-9]{3,}" 'FOO';
}
server {
location / {
try_files $u... | Eric Fortis |
<p>I am trying to create EKS Fargate cluster and deploy example Spring Boot application with 1 endpoint, I successfully create stack with following CloudFormation script:</p>
<pre><code>---
AWSTemplateFormatVersion: '2010-09-09'
Description: 'AWS CloudFormation template for EKS Fargate managed Kubernetes cluster with e... | Jakub Zak | <p>I solved my issue, by following this <a href="https://repost.aws/knowledge-center/eks-alb-ingress-controller-fargate" rel="nofollow noreferrer">guide</a></p>
<p>I then exported resulting stack into my CloudFormation script.</p>
<p>Then to deploy my application I updated my kubernetes manifest to:</p>
<pre><code>---
... | Jakub Zak |
<p>currently I’m trying to get the the api server connected with my keycloak.</p>
<p>When I use the oidc-information from the user everything works fine, but the groups seem to be ignored
The apiserver is running with the parameter</p>
<pre><code> --oidc-ca-file=/etc/kubernetes/ssl/ca.pem
--oidc-client-id=ku... | Heiko | <pre><code>....
subjects:
- kind: User
name: "oidc:group1"
apiGroup: rbac.authorization.k8s.io
...
</code></pre>
<p>should be:</p>
<pre><code>....
subjects:
- kind: Group
name: "oidc:group1"
apiGroup: rbac.authorization.k8s.io
...
</code></pre>
| johnharris85 |
<p>I am new to Argo Workflows and following along with <a href="https://youtu.be/XySJb-WmL3Q?t=1247" rel="nofollow noreferrer">this tutorial</a>.</p>
<p>Following along with it, we are to create a service account and then attach the pre-existing <code>workflow-role</code> to the service account, like this:</p>
<pre cla... | Mike Williamson | <p>Actually, I think I got it, but if someone sees this, a confirmation would be nice.</p>
<p>I created a role file as follows:</p>
<pre class="lang-sh prettyprint-override"><code>role.yaml:
apiVersion: rbac.authorization.k8s.io/v1
kind: Role
metadata:
name: workflow
rules:
- apiGroups:
- ""
resources:... | Mike Williamson |
<p>In kubernetes you can set "readOnlyRootFilesystem: true" for a container, in order to make the container's file system read-only, thus making it more secure.</p>
<p>However, in my particular case, my application still needs to write some files, so I need to add some read-write volume mounts for some partic... | adrians | <p>Yep, having the main filesystem in the container as read-only with specific locations (for example logging or temporary files) as read-write will, in general, improve the overall security of your container.</p>
<p>An attacker trying to compromise your contained application from the outside, likely won't know which d... | Rory McCune |
<p>Currently, our CI/CD Environment is cloud based in Kubernetes.
Kubernetes Cloud Providers recently removed the docker deamon, due to performance advantages. For example Google Kubernetes Engine or IBM Cloud Kubernetes only feature an Containerd runtime, to <strong>run</strong> but not <strong>build</strong> containe... | LeonG | <p>Docker Registry provides an <a href="https://docs.docker.com/registry/spec/api/" rel="nofollow noreferrer">HTTP API</a>, so you could those methods to pull and push images. </p>
<p>There are several libraries providing an higher abstraction layer over it (<a href="https://github.com/heroku/docker-registry-client" r... | Gonzalo Matheu |
<p>I heard ElasticSearch is already changing its license to SSPL. Because of that, it will not be considered as an OSS (OpenSource Software) anymore.</p>
<p>Do you know of a better OSS as replacement for ElasticSearch?</p>
<p>Hope suggested OSS has an official image in dockerhub since I will be using it also in Kuberne... | lemont80 | <p>The <a href="https://opensearch.org/" rel="nofollow noreferrer">OpenSearch</a> alternative provided by AWS could be a correct possibility.
It's forked from Elasticsearch and provide the same <a href="https://aws.amazon.com/fr/blogs/aws/amazon-elasticsearch-service-is-now-amazon-opensearch-service-and-supports-opense... | YLR |
<p>I'm running into issues trying to deploy stateful mongodb replicaset with sidecar from cvallance while running istio 0.8, if I leave istio out of the mix everything works, but when istio is enabled mongo-sidecars can't find eachother and replicaset is not configured. Below is my mongo deployment and service.</p>
<p... | jelums | <p>istio does not support mutual TLS for statefulsets at least till V.1.0.2 </p>
| Paul Ma |
<p>I have deployed a simple dotnet core app into Kubernetes. The service which is exposed is as below </p>
<pre><code>apiVersion: v1
kind: Service
metadata:
creationTimestamp: "2020-01-17T18:07:23Z"
labels:
app.kubernetes.io/instance: expo-api
app.kubernetes.io/managed-by: Helm
app.kubernetes.io/name: ... | Joy | <p><strong>ORIGINAL</strong> :Thanks to @heyzling insight I found out the solution to it . I changed the app path into the code <code>startup.cs</code>. The issue was the Api originally was not expecting a route prefix for all controllers . Hence it was giving the error . So that I had to do a slight change in the <cod... | Joy |
<p>I'm trying to gey pods scheduled on the master node. Succesfully untainted the node</p>
<blockquote>
<p>kubectl taint node mymasternode
node-role.kubernetes.io/master:NoSchedule-</p>
<p>node/mymasternode untainted</p>
</blockquote>
<p>But then changing replicas to 4 in the deploy.yaml and apply it all the pods are s... | Serve Laurijssen | <p>To get pods scheduled on Control plane nodes which have a taint applied (which most Kubernetes distributions will do), you need to add a toleration to your manifests, as described in <a href="https://kubernetes.io/docs/concepts/scheduling-eviction/taint-and-toleration/" rel="nofollow noreferrer">their documentation... | Rory McCune |
<p>Is there any command to revert back to previous configuration on a resource?</p>
<p>For example, if I have a Service kind resource created declaratively, and then I change the ports manually, how can I discard live changes so the original definition that created the resource is reapplied?</p>
<p>Is there any track... | Whimusical | <p>Since you're asking explicitly about the <code>last-applied-configuration</code> annotation...</p>
<p>Very simple:</p>
<pre><code>kubectl apply view-last-applied deployment/foobar-module | kubectl apply -f -
</code></pre>
<p>Given that <code>apply</code> composes via stdin ever so flexibly — there's no dedicated <co... | ulidtko |
<p>I have a simple demo Flask application that is deployed to kubernetes using minikube. I am able to access the app using the Services. But I am not able to connect using ingress.</p>
<p><strong>Services.yaml</strong></p>
<pre><code>apiVersion: v1
kind: Service
metadata:
name: services-app-service
spec:
selector:
... | Rakesh | <p>The <strong>ingress</strong>, and <strong>ingress-dns</strong> addons are currently only supported on <strong>Linux</strong>. Currently not supported on windows.
<strong><a href="https://minikube.sigs.k8s.io/docs/drivers/docker/#known-issues" rel="nofollow noreferrer">MoreInfo</a></strong></p>
<p><a href="https://i.... | Rakesh |
<p>This is a bit of a silly setup, but here's what I'm looking at right now:</p>
<ul>
<li>I'm learning Kubernetes</li>
<li>I want to push custom code to my Kubernetes cluster, which means the code must be available as a Docker image available from <strong>some</strong> Docker repository (default is Docker Hub)</li>
<li... | stevendesu | <p>Probably the easiest way to solve your problem would be to use Docker's insecure-registry feature. The concern you mention about this in your post (that it would open you up to security risks later) probably won't apply as the feature works by specifying specific IP addresses or host names to trust.</p>
<p>For examp... | Rory McCune |
<p>While testing SSH from one container to another in a K8s environment, I'm getting this strange issue of "matching key found" but ended up with error "Failed publickey.."</p>
<p>Have tried with securityCapability of "SYS_CHROOT" and with privileged as true in pod and container.</p>
<p>ss... | Karthik Murugan | <p>After adding AUDIT_WRITE capability to the container, it started working. Apparently both SYS_CHROOT and AUDIT_WRITE are required for the container running sshd to work</p>
| Karthik Murugan |
<p>I've got a username and password, how do I authenticate kubectl with them?</p>
<p>Which command do I run?</p>
<p>I've read through: <a href="https://kubernetes.io/docs/reference/access-authn-authz/authorization/" rel="nofollow noreferrer">https://kubernetes.io/docs/reference/access-authn-authz/authorization/</a> a... | Chris Stryczynski | <p>Kubernetes provides a number of different authentication mechanisms. Providing a username and password directly to the cluster (as opposed to using an OIDC provider) would indicate that you're using Basic authentication, which hasn't been the default option for a number of releases.</p>
<p>The syntax you've listed... | Rory McCune |
<p>I am having issue to use grep with regular expression
I am trying to read and filter some logs on server</p>
<pre><code>kubectl logs -lname=ambassador --tail=40 | grep ACCESS | grep '" 200 ' | grep ' /api/entitlements '
</code></pre>
<p>so this returns some logs and it is fine but I need to search for all api inc... | Learner | <p>You may use <code>awk</code> to avoid multiple <code>grep</code> command and do all filters in one command:</p>
<pre><code>kubectl logs -lname=ambassador --tail=40 | awk '/ACCESS/ && /" 200 / && /entitlements/'
</code></pre>
<p><code>/substr/</code> searches for regex pattern <code>substr</code> in... | anubhava |
<p>I am setting up a <code>kind</code> cluster</p>
<pre><code>Creating cluster "kind" ...
✓ Ensuring node image (kindest/node:v1.22.1) 🖼
✓ Preparing nodes 📦 📦
✓ Writing configuration 📜
✓ Starting control-plane 🕹️
✓ Installing CNI 🔌
✓ Installing StorageClass 💾
✓ Joining worker nodes 🚜
✓... | pkaramol | <p>The problem you're seeing here isn't related to kind, instead it's the manifest you're trying to apply is using outdated API versions, which were removed in Kubernetes 1.22</p>
<p>Specifically the manifest is using the v1beta1 version of the customresourcedefinition object and validatingadmissionwebhook object</p>
<... | Rory McCune |
<p>I am new to cluster container management, and this question is the basis for all the freshers over here.</p>
<p>I read some documentation, but still, my understanding is not too clear, so any leads.. helping to understand?</p>
<ol>
<li>Somewhere it is mentioned, Minikube is used to run Kubernetes locally. So if we... | stackjohnny | <p>Presuming that your goal here is to run a set of containers over a number of different Raspberry Pi based nodes:</p>
<ul>
<li><p>Minikube isn't really appropriate. This starts a single virtual machine on a Windows, MacOS or Linux and installs a Kubernetes cluster into it. It's generally used by developers to quickl... | Rory McCune |
<p>I'm trying to deploy my NodeJS application to EKS and run 3 pods with exactly the same container.</p>
<p>Here's the error message:</p>
<pre><code>$ kubectl get pods
NAME READY STATUS RESTARTS AGE
cm-deployment-7c86bb474c-5txqq 0/1 Pending 0 ... | J.S.C | <p>My guess, without running the manifests you've got is that the image tag <code>1</code> on your image doesn't exist, so you're getting <code>ImagePullBackOff</code> which usually means that the container runtime can't find the image to pull .</p>
<p>Looking at the Docker Hub <a href="https://hub.docker.com/r/cjsjyh... | Rory McCune |
<p>I have a K8S service (app-filestash-testing) running like following:</p>
<pre><code>NAME TYPE CLUSTER-IP EXTERNAL-IP PORT(S) AGE
app-filestash-testing ClusterIP 10.111.128.18 <none> 10000/TCP 18h
kubernetes ClusterIP 10.96.0.1 <none>... | maantarng | <p>From: <a href="https://kubernetes.io/docs/concepts/services-networking/ingress/#what-is-ingress" rel="nofollow noreferrer">https://kubernetes.io/docs/concepts/services-networking/ingress/#what-is-ingress</a></p>
<blockquote>
<p>An Ingress does not expose arbitrary ports or protocols. Exposing services other than HTT... | Michael Leaney |
<p>I am running processes in Jupyter (lab) in a JupyterHub-created container running on Kubernetes.</p>
<p>The processes are too RAM-intensive, to the extent that the pod sometimes gets evicted due to an OOM.</p>
<p><strong>Without modifications to my code/algorithms etc., how can I in the general case tell Jupyter(Lab... | jtlz2 | <p>You can't actively control swap space.</p>
<p>In Kubernetes specifically, you just don't supply a memory limit for the Kubernetes pod.
That would at least not kill it because of OOM (out of memory). However, I doubt it would work because this will make the whole node go out of RAM, then swap and become extremely slo... | Thomas Jungblut |
<p>We're trying run a PostgreSQL in a minikube (1.18.1) Kubernetes (1.16.15) cluster so that the database is reset on every pod redeployment.</p>
<p>In our deployment template, we have:</p>
<pre class="lang-yaml prettyprint-override"><code>containers:
- name: mock-db
image: postgres:13
imagePullPolicy: "IfNo... | Raphael | <p>Here is what I missed:</p>
<ul>
<li>the init script failed and</li>
<li>the container immediately restarted.</li>
</ul>
<p>No problem with the volume, at all.</p>
| Raphael |
<p>I am trying to allow some users in my org to forward ports to our production namespace in Kubernetes. However, I don't want them to be able to forward ports to all services. I want to restrict access to only certain services. Is this possible?</p>
<pre><code>kind: ClusterRole
apiVersion: rbac.authorization.k8s.io/v... | VBoi | <p>I believe you can't. <a href="https://kubernetes.io/docs/reference/access-authn-authz/rbac/#referring-to-resources" rel="noreferrer">According to the docs</a></p>
<blockquote>
<p>Resources can also be referred to by name for certain requests through
the <code>resourceNames</code> list. When specified, requests ... | Jose Armesto |
<p>I have kubernetes cluster with installed Istio. I have two pods, for example, sleep1 and sleep2 (containers with installed curl). I want to configure istio to permit traffic from sleep1 to www.google.com and forbid traffic from sleep2 to www.google.com.</p>
<p>So, I created ServiceEntry:</p>
<pre><code>---
apiVers... | Gcinbax | <p>You can create different service accounts for <code>sleep1</code> and <code>sleep2</code>. Then you <a href="https://istio.io/docs/tasks/security/authz-http/#enforcing-service-level-access-control" rel="nofollow noreferrer">create an RBAC policy</a> to limit access to the <code>istio-egressgateway</code> policy, so ... | Vadim Eisenberg |
<p>I'm trying to accomplish a VERY common task for an application: </p>
<p>Assign a certificate and secure it with TLS/HTTPS.</p>
<p>I've spent nearly a day scouring thru documentation and trying multiple different tactics to get this working but nothing is working for me.</p>
<p>Initially I setup nginx-ingress on E... | Ken J | <p>I've replicated every step necessary to get up and running on EKS with a secure ingress. I hope this helps anybody else that wants to get their application on EKS quickly and securely.</p>
<p>To get up and running on EKS:</p>
<ol>
<li><p>Deploy EKS using the CloudFormation template <a href="https://gist.github.com... | Ken J |
<p>I setup my Kubernetes cluster using kops, and I did so from local machine. So my <code>.kube</code> directory is stored on my local machine, but I setup <code>kops</code> for state storage in <code>s3</code>.</p>
<p>I'm in the process of setting up my CI server now, and I want to run my <code>kubectl</code> command... | djt | <p>To run <code>kubectl</code> command, you will need the cluster's apiServer URL and related credentials for authentication. Those data are by convention stored in <code>~/.kube/config</code> file. You may also view it via <code>kubectl config view</code> command.</p>
<p>In order to run <code>kubectl</code> on your C... | Chaoyu |
<p>I am following <a href="https://cloud.google.com/run/docs/quickstarts/prebuilt-deploy-gke" rel="nofollow noreferrer">this</a> tutorial to perform a so called quickstart on <code>gcp</code>'s <code>cloud run</code> and experiment a bit with it.</p>
<p>Some delays and inconsistencies about announced and typical servi... | pkaramol | <p><a href="https://dzone.com/articles/the-three-http-routing-patterns-you-should-know" rel="nofollow noreferrer">Most proxies</a> that handle external traffic match requests based on the <code>Host</code> header. They use what's inside the <code>Host</code> header to decide which service send the request to. Without t... | Jose Armesto |
<p>I am trying to enable mTLS in my mesh that I have already working with istio's sidecars.
The problem I have is that I just get working connections up to one point, and then it fails to connect.</p>
<p>This is how the services are set up right now with my failing implementation of mTLS (simplified):</p>
<p><strong>... | codiaf | <p>General tips for debugging Istio service mesh:</p>
<ol>
<li>Check <a href="https://istio.io/docs/setup/additional-setup/requirements/" rel="nofollow noreferrer">the requirements for services and pods</a>.</li>
<li>Try a similar task to what you are trying to perform from the list of <a href="https://istio.io/docs/ta... | Vadim Eisenberg |
<p>I have been struggling to push a docker image to a Google Container Registry using fabric8 maven plugin on a Jenkins pipeline. I have checked every question on stackoverflow but none of them solved my problem.</p>
<p>This is my setup:</p>
<p>Kubernetes Cluster running on Google Kubernetes Engine. I have deployed a... | codependent | <p>you might be looking for the Jenkins <a href="https://wiki.jenkins.io/display/JENKINS/Google+Container+Registry+Auth+Plugin" rel="nofollow noreferrer">Google Container Registry Auth Plugin</a>.</p>
<p>another possible reason may be, that the user <code>jenkins-cr</code> does not have the required role <code>storage... | Martin Zeitler |
<p>I’m somewhat new to Kubernetes and not sure the standard way to do this. I’d like to have many instances of a single microservice, but with each of the containers parameterized slightly differently. (Perhaps an environment variable passed to the container that’s different for each instance, as specified in the conta... | vmayer | <p>There are definitely several ways of doing it. One popular option is to use <a href="https://helm.sh/" rel="nofollow noreferrer">Helm</a>. Helm lets you define kubernetes manifests using Go templates, and package them on a single unit called a Helm Chart. Later on you can install this Chart (install is what Helm cal... | Jose Armesto |
<p>We are using the default ingress gateway for istio. We would like to create two different ingress gateway for using private and public external load balancer.</p>
<p>Is there any way to achieve this?</p>
| Santhosh Kumar A | <p>See <a href="https://github.com/istio-ecosystem/multi-mesh-examples/tree/master/add_hoc_limited_trust#deploy-a-private-ingress-gateway-in-the-second-cluster" rel="nofollow noreferrer">this example</a>, step 3: <em>Deploy a private ingress gateway and mount the new secrets as data volumes by the following command</em... | Vadim Eisenberg |
<p>My application is deployed on a Kubernetes Cluster that runs on Google Cloud. I want to fetch logs written by my application using <a href="https://cloud.google.com/logging/docs/reference/v2/rest/v2/logs/list" rel="nofollow noreferrer">Stackdriver's REST APIs for logging</a>.</p>
<p>From the above documentation pag... | xennygrimmato | <p>you need to request per <a href="https://cloud.google.com/logging/docs/reference/v2/rest/v2/MonitoredResource" rel="nofollow noreferrer">MonitoredResource</a>, which permits instance names and alike... for GCE that would be <code>gce_instance</code> while for GKE it would be <code>container</code>. individual pods o... | Martin Zeitler |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.