prompt
stringlengths
65
38.7k
response
stringlengths
41
29.1k
<p>I need to install Superset on GKE. I am following this guide <a href="https://howchoo.com/kubernetes/how-to-install-apache-superset-on-a-gke-kubernetes-cluster" rel="nofollow noreferrer">https://howchoo.com/kubernetes/how-to-install-apache-superset-on-a-gke-kubernetes-cluster</a> to do the same. It is suggested here...
<p>You can install <code>superset</code> using:</p> <pre class="lang-sh prettyprint-override"><code>helm install cloudposse-incubator/superset </code></pre> <p>Installing the chart:</p> <pre><code>helm repo rm cloudposse-incubator 2&gt;/dev/null helm repo add cloudposse-incubator https://charts.cloudposse.com/incubator...
<p>I'm facing a strange issue in my K8S cluster</p> <p>Basically I have 2 application:</p> <ul> <li>identity manager (WSO2 IS based but the issue is not related to WSO2)</li> <li>external SAML2 IDP that will manage X509 authentication</li> </ul> <p>I configured WSO2 in order to use this external SAML2 IDP</p> <p>When I...
<p>I guess I found the reason for this behaviour. Basically it's happening the following:</p> <ul> <li>a HTTP request is handled by my IAM by using SSL connection</li> <li>a redirect is made from my IAM to my X509 IAM living inside the saml K8S cluster.</li> </ul> <p>My X509 IAM ingress controller is configured in pass...
<p>I'm trying to setup a MySQL pod on Digital Ocean with Kubernetes.</p> <p>I kept getting this error:</p> <pre><code>Initializing database 2019-03-05T14:32:58.707421Z 0 [Warning] TIMESTAMP with implicit DEFAULT value is deprecated. Please use --explicit_defaults_for_timestamp server option (see documentation for mor...
<p>I had this issue with Kubernetes and MySQL 5.7 as well.</p> <p>Adding the suggestion from <a href="https://github.com/docker-library/mysql/issues/186#issuecomment-229480846" rel="noreferrer">yosifki</a> to my container's definition got things working.</p> <blockquote> <p>A new ext4 disk partition is not usually empt...
<p>I set up an EFK stack for gathering my different k8s pods logs based on <a href="https://mherman.org/blog/logging-in-kubernetes-with-elasticsearch-Kibana-fluentd/" rel="nofollow noreferrer">this tutorial</a> on a Microk8s single node cluster. Everything is up and working and I can connect kibanna to elasticsearch an...
<p>For posterity, I'm going to provide <a href="https://github.com/fluent/fluentd/issues/2407#issuecomment-747488004" rel="nofollow noreferrer">this solution</a>, which seems a lot more straight forward than anything else I've found:</p> <pre><code>env: - name: FLUENT_CONTAINER_TAIL_PARSER_TYPE value: /^(?&lt...
<p>I have a situation where I have a Kubernetes cluster that has access to a Postgres instance (which is not run in the Kubernetes cluster). The Postgres instance is not accessible from anywhere else.</p> <p>What I would like to do is connect with my Database tools locally. What I have found is <code>kubectl port-forwa...
<p>You can create service for your postgresql instance:</p> <pre class="lang-yaml prettyprint-override"><code>--- apiVersion: v1 kind: Service metadata: name: postgresql spec: ports: - port: 5432 --- apiVersion: v1 kind: Endpoints metadata: name: postgresql subsets: - addresses: - ip: ipAddressOfYour...
<p>how to completely uninstall minikube from ubuntu 20.04.</p> <p>i'm getting an error from my current minikube when starting :</p> <p><code>minikube start </code> gets <code>🐳 Preparing Kubernetes v1.20.0 on Docker 20.10.0 ...| ❌ Unable to load cached images: loading cached images: stat /home/feiz-nouri/.minikube/c...
<blockquote> <p>how to completely uninstall minikube from ubuntu 20.04</p> </blockquote> <p>First, run <code>minikube delete</code> to remove <strong>minikube VM</strong> (or container if run with <code>docker</code> driver), <strong>virtual network interfaces</strong> configured on the host machine and all other trace...
<p>On the host, everything in the mounted directory (<code>/opt/testpod</code>) is owned by uid=0 gid=0. I need those files to be owned by whatever the container decides, i.e. a different gid, to be able to write there. Resources I'm testing with:</p> <pre><code>--- apiVersion: v1 kind: PersistentVolume metadata: nam...
<p>The <code>hostpath</code> type PV doesn't support security context. You have to be root for the volume to be written in. It is described well in this <a href="https://github.com/kubernetes/minikube/issues/1990" rel="nofollow noreferrer">github issue</a> and this docs about <a href="https://unofficial-kubernetes....
<p>I've an application which use debezium-postgres connector to publish events on kafka from postgres. Application is working fine if kubernetes deployment strategy is Recreate. <strong>But Throwing exception on using RollingUpdate Deployment strategy</strong></p> <ul> <li>Exception <code>replication slot &quot;XXX&quo...
<p>You cannot start two WAL sender processes with the same replication slot.</p> <p>If you need two clients to run logical decoding, create two replication slots. Otherwise, make sure that any client who uses the replication slot is stopped before you connect.</p>
<p>I'm trying to understand the security implications for using self-signed certificates for a Kubernetes validating webhook.</p> <p>If I'm understanding correctly, the certificate is simply used to be able to serve the validating webhook server over https. When the Kubernetes api-server receives a request that matche...
<blockquote> <p>If I'm understanding correctly, the certificate is simply used to be able to serve the validating webhook server over https.</p> </blockquote> <p>Basically yes.</p> <blockquote> <p>If your validating webhook server lives on the Kubernetes cluster (is not external) then this traffic is all internal to a ...
<p>I'm kinda new to Kubernetes, and I would like to understand what is the purpose of Kube-proxy in Azure AKS/regular cluster. from what I understand, Kube-proxy is updated by the API cluster from the various deployments configurations, which then updates the IP-table stack in the Linux kernel that responsible for the ...
<p>Basically <em>kube-proxy</em> component runs on each node to provide network features. It is run as a Kubernetes <a href="https://kubernetes.io/docs/concepts/workloads/controllers/daemonset/" rel="nofollow noreferrer"><code>DaemonSet</code></a> and its configuration is stored on a Kubernetes <a href="https://kub...
<p>I'm trying to run a Spark jar on Kubernetes. I have built my own docker image using the template <code>spark-2.4.4-bin-hadoop2.7</code> and tried to run my yaml file with this docker image. </p> <p>I have got below error from driver log <code>/opt/entrypoint.sh</code>: </p> <pre><code>line 133: /sbin/tini: No such...
<p>Since, you are using alpine image, you have to use /sbin/tini</p> <p>NOTE: alpine has moved tini to /sbin/tini</p> <p>In file: <code>entrypoint.sh</code>:</p> <p>Do the following change</p> <pre class="lang-sh prettyprint-override"><code>exec /usr/bin/tini -s -- /usr/bin/spark-operator &quot;$@&quot; </code></pre> <...
<p>Pods come down to 0 but it doesnt spin up more than 1 pod. Even if more than 5mgs are there in the subscription Updated code as per suggestions.</p> <p>Added TriggerAuthentication and used connectionString as authentication. Tried to send around 25messages, but still pod is not scaling up.</p> <p>Only one pod is han...
<p>So, my working example of KEDA autoscaler with rabbitmq:</p> <pre><code>apiVersion: keda.k8s.io/v1alpha1 kind: ScaledObject metadata: name: job-export-autoscaler namespace: thor spec: scaleTargetRef: deploymentName: job-export pollingInterval: 5 # Time after each check minReplicaCount: 0 # Optional. ...
<p>I have implemented a web app using Nginx docker container on aws eks using ingress. Currently I'm creating the docker image with the docroot content and using Nginx to serve it. If in case my do root content is huge and I want to keep it outside the image how can I do it? Please share some examples.</p> <p>Here's th...
<p>you can mount the NFS or Cloud storage with the POD as option to server large content.</p> <p>here is one nice example : <a href="https://medium.com/grensesnittet/mounting-a-gcp-bucket-as-nfs-in-kubernetes-8f6d3faf4da3" rel="nofollow noreferrer">https://medium.com/grensesnittet/mounting-a-gcp-bucket-as-nfs-in-kubern...
<p>I have an image uploaded in DigitalOcean’s container registry. (Their version of docker HUB) <br/>Via command line, how do I create a Kubernetes deployment using this image?</p> <p>The full registry name is:</p> <pre><code>http://registry.digitalocean.com/myname/myimage </code></pre> <p>Running following command doe...
<p>You need to login to your private registry, create a secret from those credentials, and mount them in the deployment with <code>imagePullSecrets</code>, instructions here:</p> <p><a href="https://kubernetes.io/docs/tasks/configure-pod-container/pull-image-private-registry/" rel="nofollow noreferrer">https://kubernet...
<p>Hallo fellow K8s Users,</p> <p>I'm trying to understand whether the is a base request and\or limit per pod\container in k8s as they are today or if you know of a change in the future regarding that.</p> <p>I've seen this answer: <a href="https://stackoverflow.com/questions/57041111/what-is-the-default-memory-allocat...
<p>There isn't a default limit or request. In order to configure default resources you should create a LimitRange resource as described here: <a href="https://docs.openshift.com/container-platform/3.11/dev_guide/compute_resources.html#dev-viewing-limit-ranges" rel="nofollow noreferrer">https://docs.openshift.com/contai...
<p>I have created cert-manager on aks-engine using below command kubectl apply --validate=false -f <a href="https://github.com/jetstack/cert-manager/releases/download/v0.12.0/cert-manager.yaml" rel="nofollow noreferrer">https://github.com/jetstack/cert-manager/releases/download/v0.12.0/cert-manager.yaml</a></p> <p>my...
<p>I ran into the same error... I suspect that it's because I'm using a mix of private and public Azure DNS entries and the record needs to get added to the public entry so letsencrypt can see it, however, cert-manager performs a check that the TXT record is visible before asking letsencrypt to perform the validation.....
<p>Somebody, please, explain me (or direct to a detailed resource) why kubernetes uses this wrapper (pod) to work with containers. Every resource I go across just quotes same words - &quot;it is the smallest unit in k8s&quot;. What I am looking for is the reason for it from engineering perspective. I do understand that...
<p>The reason for this decision is simply because a Pod may contain more than one container, doing different things.</p> <p>First of all, A pod may have an init-container which is responsible to do some starting operations to ensure that the main container / containers work properly. I could have an init-container load...
<p>We are running a AKS Kubernetes cluster on Azure. I'm using the &quot;<a href="https://kubernetes.github.io/ingress-nginx/" rel="nofollow noreferrer">NGINX Ingress Controller</a>&quot; and &quot;<a href="https://cert-manager.io" rel="nofollow noreferrer">cert-manager</a>&quot; for routing and certificate generation ...
<p>It is expected behavior. By default Ingress controller creates self-signed certificate with CN indicating it's fake one. This is used when a request doesn't match to rules defined in Ingress. So when we access this URL from browser, it returns correct certificate but with openssl s_client without servername field, i...
<p>I have what seems like a straightforward PV and PVC:</p> <pre class="lang-yaml prettyprint-override"><code>apiVersion: v1 kind: PersistentVolumeClaim metadata: name: www-pvc spec: storageClassName: &quot;&quot; volumeName: www-pv accessModes: - ReadOnlyMany resources: requests: storage: 1Gi -...
<p>In Kubernetes documentation about <a href="https://kubernetes.io/docs/concepts/storage/persistent-volumes/" rel="nofollow noreferrer">Persistent Volumes</a> you can find information that :</p> <blockquote> <p>A <code>PersistentVolume</code> (PV) is a piece of storage in the cluster that has been provisioned by an ad...
<p>I'm trying to patch a deployment and remove its volumes using <code>patch_namespaced_deployment</code> (<a href="https://github.com/kubernetes-client/python" rel="nofollow noreferrer">https://github.com/kubernetes-client/python</a>) with the following arguments, but it's not working.</p> <pre><code>patch_namespaced_...
<p>What you're trying to do is called a strategic merge patch (<a href="https://kubernetes.io/docs/tasks/manage-kubernetes-objects/update-api-object-kubectl-patch/" rel="nofollow noreferrer">https://kubernetes.io/docs/tasks/manage-kubernetes-objects/update-api-object-kubectl-patch/</a>). As you can see in the documenta...
<p>I am unable to upload a file through a deployment YAML in Kubernetes.<br /> The deployment YAML</p> <pre class="lang-yaml prettyprint-override"><code>apiVersion: apps/v1 kind: Deployment metadata: name: test labels: app: test spec: replicas: 1 selector: matchLabels: app: test template: me...
<p>This is a community wiki asnwer. Feel free to expand it.</p> <p>That is a known issue with Docker on Windows. Right now it is not possible to correctly mount Windows directories as volumes.</p> <p>You could try some of the workarounds mentioned by @CodeWizard in <a href="https://github.com/kubernetes/kubernetes/issu...
<p>I'm not able to get a custom domain record working with an openshift cluster. I've read tons of articles, StackOverflow posts, and this youtube video <a href="https://www.youtube.com/watch?v=Y7syr9d5yrg" rel="nofollow noreferrer">https://www.youtube.com/watch?v=Y7syr9d5yrg</a>. All seem to &quot;almost&quot; be usef...
<p>Also, please note the instructions for custom DNS setup for a route on OpenShift v4 are a bit different and are not correctly displayed in the web console:</p> <p><a href="https://i.stack.imgur.com/SYNjN.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/SYNjN.png" alt="enter image description here" ...
<p>when running specific command from linux terminal command is the following:</p> <pre><code>/opt/front/arena/sbin/ads_start ads -db_server vmazfassql01 -db_name Test1 </code></pre> <p>In regular docker compose yaml file we define it like this:</p> <pre><code>ENTRYPOINT [&quot;/opt/front/arena/sbin/ads_start&quot;, ...
<p>I would try separating the args, following the documentation example (<a href="https://kubernetes.io/docs/tasks/inject-data-application/define-command-argument-container/#run-a-command-in-a-shell" rel="nofollow noreferrer">https://kubernetes.io/docs/tasks/inject-data-application/define-command-argument-container/#ru...
<p>I'm learning about Kubernetes and Kubeflow, and there's something that I want to do that I'm not finding any clear answer on the internet on if it's possible or the route I should take.</p> <p>When training my machine learning model, I want to use a large machine to train my models on the cloud, but after that, I on...
<p>One way to do this is to have two separate clusters. One large cluster for training and another smaller cluster for serving. You could use Kubeflow Pipelines on the larger cluster, train the model and then place the model file in distributed storage. On the smaller cluster you could just run <a href="https://github....
<p>I'm deploying a Spark Structured Streaming application to Google Kubernetes Engine and while accessing a bucket using <code>gs://</code> URI scheme I'm facing the following exception:</p> <pre><code>Exception in thread &quot;main&quot; java.lang.NullPointerException: projectId must not be null at com.google.clou...
<p>Based on your configuration I would suggest you to add the following property <code>fs.gs.project.id</code> as indicated <a href="https://github.com/GoogleCloudDataproc/hadoop-connectors/blob/c0552aa5cfb1fc3fef7a643a1c8957529cbd2909/gcs/INSTALL.md#configure-hadoop" rel="nofollow noreferrer">here</a>. As it is showed...
<p>I created a startup probe and made it so it would <em>always</em> fail. It should result in the pod getting killed and restarting, but it doesn't. I see one event of the startup probe failing <em>(and no events after that)</em>, but the pods show as <code>1/1 Running</code>. And when I run my Helm test, it passes!</...
<p>It wasn't failing because it turns out the <code>ping</code> command returns a <code>0</code> status even if the user/pass is wrong, as long as it can reach the server.</p> <p><a href="https://dev.mysql.com/doc/refman/8.0/en/mysqladmin.html" rel="nofollow noreferrer">MySql ping command</a></p> <blockquote> <p>Check ...
<p>I'm trying to install Sonarqube in Kubernetes environment which needs PostgresSQL. I'm using an external Postgres instance and I have the crednetials kv secret set in Vault. SonarQube helm chart creates an Environment variable in the container which takes the username and password for Postgres.</p> <p>How can I inje...
<p>There are 2 ways to inject vault secrets into the k8s pod as ENV vars.</p> <h1>1) Use the vault Agent Injector</h1> <p>A template should be created that exports a Vault secret as an environment variable.</p> <pre><code>spec: template: metadata: annotations: # Environment variable export template ...
<p>I have one pod which requires a persistent disk. I have 1 pod running on us-central1-a and if that zone goes down I want to migrate to another zone without data loss to another zone (us-central1-*).</p> <p>Is it possible to migrate a pod to another zone(where i know the disks exists) and use the regional disk for th...
<p>A regional Persistent Disk on Google Cloud is only available in <strong>two zones</strong>, so you must change your <code>StorageClass</code> to only two zones.</p> <p>See example StorageClass on <a href="https://cloud.google.com/solutions/using-kubernetes-engine-to-deploy-apps-with-regional-persistent-disks" rel="n...
<p>I am trying to create a configmap for a Grafana datasource, using an instance of Grafana from the Kube-Prometheus-Stack helm chart <a href="https://github.com/prometheus-community/helm-charts/tree/main/charts/kube-prometheus-stack" rel="noreferrer">https://github.com/prometheus-community/helm-charts/tree/main/charts...
<p>For you to load the data by grafana server component, you would need to set this in your metadata field <code>grafana_datasource: &quot;1&quot;</code>.</p> <p>For a configmap:</p> <pre><code>apiVersion: v1 kind: ConfigMap metadata: name: example-grafana-datasource labels: grafana_datasource: &quot;1&quot; ...
<p>I'm new to Kubernetes and was following some examples for setting contexts. Now I can't seem to get any objects on my server, or I'm talking to the wrong server. I see...</p> <pre><code>$ kubectl config view apiVersion: v1 clusters: - cluster: server: &quot;&quot; name: sandbox - cluster: certificate-autho...
<p>Your current context is <code>sandbox</code>, try changing the current-context with <a href="https://kubernetes.io/docs/reference/kubectl/cheatsheet/" rel="nofollow noreferrer">kubectl</a> or directly in <code>~/.kube/config</code>.</p> <pre class="lang-sh prettyprint-override"><code>$ kubectl config get-contexts $ ...
<p>I want to move all of my operations over to K8S for so long, but am still hesitant to that. This question will likely be broad, but bear with me. Let me first describe the existing system.</p> <p>I hosts a lot of different websites (&gt;30). A lot of that for my own experimentation, but some are for actual clients. ...
<p>read your question hats off to write down the whole stuff but half of the stuff is useless.</p> <p>Answers of your question :</p> <ol> <li><p>Can we add the same or multiple entries in DNS? example.com with A record multiple times possible?</p> </li> <li><p>You might require to set up a regional K8s cluster with reg...
<p><code>kubectl get pod pod_name -n namespace_name -o json</code> shows:</p> <pre><code>&quot;labels&quot;: { &quot;aadpodidbinding&quot;: &quot;sa-customerxyz-uat-msi&quot;, &quot;app&quot;: &quot;cloudsitemanager&quot;, &quot;customer&quot;: &quot;customerxyz&quot;, &quot;istio.io/rev&quot;: &quot;de...
<p>I had the same issue with running Istio + Kiali as Kiali was not showing the version. I tried adding the &quot;version&quot; label under the spec of the Deployment but it didn't work. After adding the &quot;version&quot; label for the POD's spec (.spec.template.metadata.labels) it started applying the &quot;version&...
<p>envoy container failing while startup with the below error</p> <pre><code>Configuration does not parse cleanly as v3. v2 configuration is deprecated and will be removed from Envoy at the start of Q1 2021: Unknown field in: {&quot;static_resources&quot;:{&quot;listeners&quot;:[{&quot;address&quot;:{&quot;socket_addre...
<p>The error message states that: <code>Configuration does not parse cleanly as v3. v2 configuration is deprecated and will be removed from Envoy at the start of Q1 2021</code>. The v2 xDS APIs are deprecated and will be removed form Envoy in Q1 2021, as per the <a href="https://github.com/envoyproxy/envoy/blob/a52ec8b...
<p>I recently installed <code>microk8s</code>, and enabled helm3 and dns addons on microk8s. Deployment from <code>stable/chart</code> works fine but any deployment from <code>bitnami/chart</code> fails.</p> <p><strong>OS:</strong> Ubuntu 20.04.1 LTS -- microk8s: 1.19/stable</p> <pre><code>microk8s.helm3 install my-re...
<p>There was a bug reported <a href="https://github.com/jenkinsci/helm-charts/issues/193" rel="noreferrer">here</a> and <a href="https://github.com/helm/helm/issues/7955" rel="noreferrer">here</a> which was caused by the conditional inclusion of <code>lookup</code> into the function map.</p> <p>A fix for it was merged ...
<p>Helm offers the option of listing <a href="https://helm.sh/docs/helm/helm_dependency_list/" rel="nofollow noreferrer">dependencies</a> for a chart when browsing through its files.</p> <p>So if I am above the folder of <code>my-chart</code>, I can perform</p> <pre><code>▶ helm dependency list my-chart NAME VERSION...
<p>No, you can retrieve this information only using documentation you provided. You should:</p> <ul> <li>Download the chart with <code>$ helm pull repo/name --untar</code> (skip this if you already have it)</li> <li>Go inside the chart directory</li> <li>Invoke command: <code>$ helm dependency list my-chart</code></li>...
<p>By default, any kubernetes pod on AWS EKS can assume the IAM role of the underlying node. That means all containers <a href="https://docs.aws.amazon.com/eks/latest/userguide/create-node-role.html" rel="noreferrer">immediately get access</a> to policies such as AmazonEKSWorkerNodePolicy and AmazonEC2ContainerRegistry...
<p>The two main things that could prevent it (if used together) and are described in the AWS documentation:</p> <ul> <li>IAM roles for service accounts as already pointed out by the OP.</li> <li><a href="https://docs.aws.amazon.com/eks/latest/userguide/best-practices-security.html" rel="noreferrer">Blocking access to i...
<p>I am trying to re-deploy jenkins pod on kubernetes.</p> <p>After I tried it, I am getting error and the pod is not initializing.</p> <p>After I describe the pod, I can see</p> <pre><code> Warning FailedScheduling 46s default-scheduler 0/12 nodes are available: 12 node(s) didn't match node selecto...
<p>please check the lables using <code>kubectl get nodes --show-labels</code> looks like your deployment has wrong labels</p>
<p>Imagine I have a workflow with 5 steps.</p> <p>Step 2 may or may not create a file as its output (which is then used as input to subsequent steps).</p> <ul> <li>If the file is created, I want to run the subsequent steps.</li> <li>If no file gets created in step 2, I want to mark the workflow as completed and not exe...
<p>By default, a step that exits with a non-zero exit code fails the workflow.</p> <p>I would suggest writing an <a href="https://github.com/argoproj/argo/blob/master/examples/output-parameter.yaml" rel="nofollow noreferrer">output parameter</a> to determine whether the workflow should continue.</p> <pre class="lang-ya...
<p>I have a Kubernetes cluster on Azure, where I use Helm to make it easier to manage micro-services and other tools on it, and Keycloak is one of them.</p> <p>I need to use magic link authenticator in one of my apps, I'm aware that I need to add an extension in my Keycloak chart, but I don't know how.</p> <p>In the im...
<p>To publish a theme with original image, first <a href="https://www.keycloak.org/docs/latest/server_development/#deploying-themes" rel="nofollow noreferrer">create an archive with the thema</a>.</p> <p>Create a file <code>custom-themes-values.yml</code> with a content:</p> <pre><code>extraInitContainers: | - name: ...
<p>I have a kustomize base that I'd like to re-use without editing it. Unfortunately, it creates a namespace I don't want to create. I'd like to simply remove that resource from consideration when compiling the manifests and add a resource for mine since I can't patch a namespace to change the name.</p> <p>Can this be ...
<p>You can omit the specific resource by using a delete directive of <a href="https://github.com/kubernetes/community/blob/master/contributors/devel/sig-api-machinery/strategic-merge-patch.md#delete-directive" rel="noreferrer">Strategic Merge Patch</a> like this.</p> <p>Folder structure</p> <pre><code>$ tree . . ├── ba...
<p>How to fix this? I am trying to get the version of kubectl but says server not found. I have already installed kubernetes in my PC.</p> <p><a href="https://i.stack.imgur.com/LjtYv.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/LjtYv.png" alt="enter image description here" /></a></p>
<p>You need to configure the KUBECONFIG which indicates the list of address and certs of k8s api servers, contexts and users.</p> <p>Once you configure it correctly, kubectl can reach to the server.</p> <p>The default path of kubeconfig is ~/.kube/config. Also you can specify it using environment variable <code>KUBECON...
<p>Sometimes k8s nodes are labelled as <code>k8s.infra/postgres=</code> . Is this a valid label for a node ?</p> <p>How do we use this kind of label whilst adding node affinities in our Deployment manifests ?</p> <pre><code> spec: affinity: nodeAffinity: requiredDuringSchedulingIgnoredDuringE...
<blockquote> <p>Sometimes k8s nodes are labelled as k8s.infra/postgres= . Is this a valid label for a node?</p> </blockquote> <p>Yes, it is a valid label. The type the key is a <code>string</code> and the value is also a <code>string</code> but the value can be empty <code>string</code>: <code>&quot;&quot;</code>.</p> ...
<p>I'm trying to add a node pool that can run Windows based containers. What I see in Azure portal is a disabled option to select Windows as the OS. The hint says: <code>Windows node pools require a Windows authentication profile</code>. I tried googling the possible solution but found nothing.</p> <p>How can I provide...
<p>Looks like there is an <a href="https://github.com/Azure/AKS/issues/1005" rel="nofollow noreferrer">open issue</a> regarding this situation.</p> <p>The problem is while creating the cluster for the first time, you didn't provide any <code>--windows-admin-password</code> and <code>--windows-admin-username</code>. The...
<p>I was a little confused with below command:</p> <pre><code>kubectl run busybox --image=busybox --restart=Never -o yaml --dry-run -- /bin/sh -c 'echo hello;sleep 3600' </code></pre> <p>YAML:</p> <pre><code>apiVersion: v1 kind: Pod metadata: creationTimestamp: null labels: run: busybox name: busybox spec:...
<p>When working with containers in Kubernetes, you should be careful not to mix up Kubenetes <code>command</code> and Docker <code>Cmd</code>.</p> <ul> <li>the <code>command</code> field in Kubernetes corresponds to the <code>EntryPoint</code> field in Docker</li> <li>the <code>args</code> field in Kubernetes correspon...
<p>The image below show the two pipelines that we have in my company to manage the life cycle of a model.</p> <p><a href="https://i.stack.imgur.com/IDY5L.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/IDY5L.png" alt="enter image description here" /></a></p> <ul> <li>The first pipeline, &quot;Applica...
<p>The most seamless way is to do a <a href="https://kubernetes.io/docs/tutorials/kubernetes-basics/update/update-intro/" rel="nofollow noreferrer">rolling update</a> via k8s/kubectl. This will require a new container, however, this is considered a best practice, as each container stays atomic and reproducible. Updatin...
<p>When I run <code>skaffold init</code> in my app directory it shows me:</p> <pre><code>one or more valid Kubernetes manifests are required to run skaffold </code></pre> <p>The content of the directory:</p> <p><a href="https://i.stack.imgur.com/LnTop.png" rel="noreferrer"><img src="https://i.stack.imgur.com/LnTop.png"...
<p>Yes, you need Kubernetes manifests in the same project. Typically a <a href="https://kubernetes.io/docs/concepts/workloads/controllers/deployment/" rel="noreferrer">Deployment</a>-manifest and perhaps Service and Ingress as well if you want.</p> <p>A Deployment-manifest can be generated with (using <code>&gt;</code>...
<p>I have a persistent volume.</p> <p>I want to force Kubernetes to recreate it, as the contents is corrupted. Alternatively, if there's a way to fix that, it would be a solution.</p> <p>I have checked that the persistent volume is working as expected using:</p> <pre><code>kubectl describe pv -n </code></pre> <p>And ...
<p>If you delete a persistent volume then kubernetes will not create a new one for you, you have to manually create a new one. Basically it is the simple answer of your question.</p> <p>But there are basically three options when you are done with your pv, you can delete the PVC object then depending on the PV reclaim p...
<p>I have a kubernetes pod that is staying in Pending state. When I describe the pod, I am not seeing why it fails to start, I can just see <code>Back-off restarting failed container</code>.</p> <p>This is what I can see when I describe the pod.</p> <p><code>kubectl describe po jenkins-68d5474964-slpkj -n infrastructur...
<p>Now you cannot get any logs by <code>kubectl logs pod_name</code> because the pod status is initializing. When you use <code>kubectl logs</code> command;</p> <ul> <li>If the pod has multiple containers, you have to specify the container name explicitly.</li> <li>If you have only one container, then no need to specif...
<p>I have been trying to run traefik v2.x in minikube to check it and how it routes request to needed service. I am failing to get access to my services at all. would be good to understand what I am doing wrong.</p> <ul> <li>minikube is running in VirtualBox VM</li> <li>VM box has lab IP address to which I want to sen...
<p>Your ClusterRole definition is a bit too thin:</p> <p><a href="https://github.com/vencrena-LT/traefik/blob/main/2_roles.yml" rel="nofollow noreferrer">https://github.com/vencrena-LT/traefik/blob/main/2_roles.yml</a></p> <p>You could try to follow the example here:</p> <p><a href="https://github.com/sleighzy/k3s-trae...
<p>I have a running <code>minikube</code> cluster. I can easily connect to it and apply changes using <code>kubectl</code>. But I want to run <code>kubectl</code> from a docker container. Here is the Dockerfile:</p> <pre><code>FROM alpine:latest RUN apk --no-cache add curl # Install and configure kubectl RUN curl -LO...
<p>I had to copy <code>~/.kube</code> and <code>~/.minikube</code> folders into the image. This is the new Dockerfile:</p> <pre><code>FROM alpine:latest RUN apk --no-cache add curl # Install and configure kubectl RUN curl -LO &quot;https://dl.k8s.io/release/$(curl -L -s https://dl.k8s.io/release/stable.txt)/bin/linux...
<p>I am trying to integrate CircleCi with gcloud Kubernetes engine.</p> <ol> <li>I created a service account with Kubernetes Engine Developer and Storage Admin roles.</li> <li>Created CircleCi yaml file and configured CI.</li> </ol> <p>Part of my yaml file includes:</p> <pre><code>docker: - image: google...
<p>This is an old thread, this is how this issue handled today in case using <strong>cloud build</strong> :</p> <p><strong>Granting Cloud Build access to GKE</strong></p> <p>To deploy the application in your Kubernetes cluster, Cloud Build needs the Kubernetes Engine Developer Identity and Access Management Role.</p> <...
<p>I know minikube should be used for local only, but i'd like to create a test environment for my applications.<br /> In order to do that, I wish to expose my applications running inside the minikube cluster to external access (from any device on public internet - like a 4G smartphone).</p> <p><strong>note :</strong> ...
<p><code>curl $(minikube ip):$NODE_PORT</code> : Now we can test that the app is exposed outside of the cluster using curl, the IP of the Node and the externally exposed port.</p> <p>For you : <code>curl 192.168.49.2:31613</code></p>
<p>I am trying to install the Elastic Cloud on Kubernetes (ECK) Kubernetes operator with the all-in-one.yaml file, as per the tutorial: <a href="https://www.elastic.co/guide/en/cloud-on-k8s/current/k8s-install-all-in-one.html" rel="nofollow noreferrer">https://www.elastic.co/guide/en/cloud-on-k8s/current/k8s-install-al...
<p>I managed to fix the issue by setting the proxy-body-size config map value in the system nginx config map to 8m.</p> <pre><code>proxy-body-size=8m Namespace=ingress-nginx Config Map=nginx-configuration </code></pre> <p>thank you @juan-carlos-alafita for providing the relevant links!</p> <p><a href="https://stackover...
<p>I have a spring boot application which has some end points, ex: product/version</p> <p>I deployed then the application to the K8s network and expose it out using Ingress as below: </p> <pre><code>apiVersion: extensions/v1beta1 kind: Ingress metadata: name: test-ingress annotations: nginx.ingress.kubernetes...
<p>I encountered a similar problem when using <code>Istio Ingress</code>. I solved it by using an Nginx proxy and setting <code>X-Forwarded-Host</code> and <code>X-Forwarded-Port</code> request headers in Nginx config file to let Swagger know the correct address.</p>
<p>I want to use <a href="https://www.kubeflow.org/" rel="nofollow noreferrer">Kubeflow</a> to check it out and see if it fits my projects. I want to deploy it locally as a development server so I can check it out, but I have Windows on my computer and Kubeflow only works on Linux. I'm not allowed to dual boot this com...
<p>As you thought you are right in case of using VM and that be easy to test it out.</p> <p>Instead of setting up Kubernetes on docker you can use Linux base container for development testing.</p> <p>There is linux container available name as LXC container. Docker is kind of application container while in simple words ...
<p>I am trying to achieve zero-downtime deployment on k8s. My deployment has one replica. The pod probes look like this:</p> <pre><code>apiVersion: apps/v1 kind: Deployment metadata: name: app namespace: ${KUBE_NAMESPACE} spec: selector: matchLabels: app: app replicas: 1 template: metadata: ...
<p>After digging around Google and doing some tests. I found it's not needed to manually replying 500 to probes after prestop.</p> <p>According to <a href="https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle/#pod-termination" rel="nofollow noreferrer">documentation</a></p> <blockquote> <p>At the same time ...
<p>What I want to achieve is to run the simplest echo server using <code>python</code> and <code>tornado</code>, code here:</p> <pre class="lang-py prettyprint-override"><code>#!/usr/bin/env python3 import tornado.ioloop import tornado.web from tornado.log import enable_pretty_logging class MainHandler(tornado.web.Req...
<p><a href="https://minikube.sigs.k8s.io/docs/start/" rel="nofollow noreferrer">Minikube</a> is a tool that spawn your single node Kubernetes cluster for development purposes on your machine (PC, Laptop, Server, etc.).</p> <p>It uses different <code>--drivers</code> to run Kubernetes (it can be deployed as <code>bare-m...
<p>I'm looking for a lightweight way to access the Kubernetes API from a Pod in a C# app.</p> <p>Kubernetes docs mention two ways of <a href="https://kubernetes.io/docs/tasks/access-application-cluster/access-cluster/#accessing-the-api-from-a-pod" rel="nofollow noreferrer">accessing the API from a Pod</a>:</p> <blockqu...
<blockquote> <p>Ideally, I'd like to just use WebClient</p> </blockquote> <p>The Kubernetes is a REST API, so this would work. As shown on <a href="https://kubernetes.io/docs/tasks/administer-cluster/access-cluster-api/#using-kubectl-proxy" rel="nofollow noreferrer">Directly accessing the REST API using kubectl proxy</...
<p>I would like to set the value <code>KubeletConfiguration.cpuCFSQuota = false</code> in the <code>config.yaml</code> passed to <code>kubeadm</code> when launching <code>minikube</code> to turn off CPU resource checking, but I have not managed to find the options to do this through the documentation here <a href="http...
<p>Using the <code>--extra-config=kubelet.</code> flag alongside <code>minikube start</code> is a good approach but you would also need to <a href="https://kubernetes.io/docs/tasks/administer-cluster/kubelet-config-file/" rel="nofollow noreferrer">Set Kubelet parameters via a config file</a>.</p> <p>As you already noti...
<p>I have a YAML file as like below which I have exported from an existing cluster:</p> <pre><code>apiVersion: v1 items: - apiVersion: v1 kind: ServiceAccount metadata: creationTimestamp: 2019-03-20T23:17:42Z name: default namespace: dev4 resourceVersion: &quot;80999&quot; selfLink: /api/v1/name...
<p>In this specific case this is correct but you need to be carefull with it since there is no consistent way to do this for all types of resources.</p> <p>Historically kubectl had --export flag that was generating yamls ready to apply, but it got depricated because of many bugs. Check out <a href="https://github.com/k...
<p>I know minikube should be used for local only, but i'd like to create a test environment for my applications.<br /> In order to do that, I wish to expose my applications running inside the minikube cluster to external access (from any device on public internet - like a 4G smartphone).</p> <p><strong>note :</strong> ...
<p><code>Minikube</code> as a development tool for a single node Kubernetes cluster provides inherent isolation layer between Kubernetes and the external devices (being specific the <strong>inbound</strong> traffic to your cluster from <code>LAN</code>/<code>WAN</code>).</p> <p>Different <a href="https://minikube.sigs....
<p>Am new to Kubernetes, my question is related to Google Cloud platform.</p> <p>Given a scenario we need to restart a kubernetes cluster and we have some services in Spring boot. As Spring boot services are like individual JVM's each and run like an independent process. Once the Kubernetes is restarted in order to res...
<p>I am not sure if I fully understood your question but I think the best approach for you would be to <code>Pack</code> your <code>Spring Boot app</code> to a <a href="https://www.docker.com/resources/what-container" rel="nofollow noreferrer">Docker container</a> and then use it on <code>GKE</code>.</p> <p>Good guide ...
<p>None of the pods resolve public domains or any internal pods. The resolv.conf points to an ip that doesn't belong to coredns</p> <pre><code>IP of coredns: 192.168.208.7 </code></pre> <pre><code>#cat etc/resolv.conf nameserver 10.96.0.10 search default.svc.cluster.local svc.cluster.local cluster.local ec2.internal op...
<p>There are several steps you should take when <a href="https://kubernetes.io/docs/tasks/administer-cluster/dns-debugging-resolution/" rel="nofollow noreferrer">Debugging DNS Resolution</a>:</p> <blockquote> <p>This page provides hints on diagnosing DNS problems.</p> </blockquote> <p>Try in that order:</p> <ul> <li><p...
<p>I followed this DigitalOcean guide <a href="https://www.digitalocean.com/community/tutorials/how-to-set-up-an-nginx-ingress-with-cert-manager-on-digitalocean-kubernetes" rel="nofollow noreferrer">https://www.digitalocean.com/community/tutorials/how-to-set-up-an-nginx-ingress-with-cert-manager-on-digitalocean-kuberne...
<p>Generating wildcard certificate with <code>cert-manager</code> (<code>letsencrypt</code>) requires the usage of <code>DNS-01</code> challenge instead of <code>HTTP-01</code> <a href="https://www.digitalocean.com/community/tutorials/how-to-set-up-an-nginx-ingress-with-cert-manager-on-digitalocean-kubernetes" rel="nof...
<p>When I deploy <a href="https://projectcontour.io/" rel="nofollow noreferrer">https://projectcontour.io/</a> ingress controller on my Digital Ocean K8S cluster, a load balancer gets created automatically.</p> <p>I consider to use Ansible as management tool for K8S to automate the deployment.</p> <p>After the followin...
<p>I haven't tested it, but I think you could try to do something like this:</p> <pre><code>- shell: if [[ $(kubectl get services envoy -n projectcontour --output jsonpath='{.status.loadBalancer.ingress[0]}') ]]; then exit 0; else exit 1; fi; register: wait_for_ext_ip until: wait_for_ext_ip.rc == 0 retries: 10 ...
<p>I have set up a simple two-node Kubernetes cluster using K3S. I have deployed a very simple web app, but when I try to access the web app, I just get a &quot;Gateway Timeout&quot;. I've tried to keep the set up as simple as possible, but I can't see where I'm going wrong. I've outlined my entire setup below, from st...
<p>The annotation on the Ingress is missing description of the entrypoint and the host:</p> <pre><code>apiVersion: networking.k8s.io/v1beta1 kind: Ingress metadata: name: web-test annotations: kubernetes.io/ingress.class: &quot;traefik&quot; traefik.ingress.kubernetes.io/router.entrypoints: http...
<p>I was trying out my cluster in EKS with managed node group. I am able to attach CSI to the cluster and able to create storageClass and persistentVolumeClaim, but when ever I try to deploy a deployment. The pods seems to be not associating with the specified nodes.</p> <p>the pod file</p> <pre><code>apiVersion: apps/...
<p>According to the AWS documentation IP addresses per network interface per instance type the <code>t2.micro</code> only has 2 Network Interfaces and 2 IPv4 addresses per interface.</p> <p><a href="https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/using-eni.html#AvailableIpPerENI" rel="nofollow noreferrer">https://d...
<p>I currently have a docker-compose setup for ASP.NET Core. However when moving to test the cluster in Kubernetes I ran into SSL issues with Kestrel. Originally with Docker/Docker-compose you can set up local SSL with</p> <pre class="lang-sh prettyprint-override"><code>dotnet dev-certs https -ep %USERPROFILE%\.aspnet\...
<p>Rather than deploying your .NET core container with https, you should deploy it with http and use nginx-ingress to provide https as described here: <a href="https://cert-manager.io/docs/tutorials/acme/nginx-ingress/" rel="nofollow noreferrer">https://cert-manager.io/docs/tutorials/acme/nginx-ingress/</a></p>
<p>We re-organise our namespaces in Kubernetes. We want to move our Persistent volume Claims created by a storageclass from one namespace to another.</p> <p>(Our backup tool don't help).</p>
<h2>Option 1: use a backup tool</h2> <p>The easiest and safest option to migrate a pvc/pv to a new namespace is to use a backup tool (like <a href="https://velero.io/docs/v1.5/restore-reference/#restoring-into-a-different-namespace" rel="nofollow noreferrer">velero</a>)</p> <h2>Option 2: no backup tool (by hand)</h2> <...
<p>I have a container (a machine learning application) which is capable of loading pre-trained ml-models stored in a persistent volume. I can ask the application to load a particular model by giving its name via its REST API.</p> <p>Now I want to scale up this application so that, I can load whatever the model, in any ...
<p>As you mentioned, the preferred way to achieve this is through multiple deployments and services.</p> <p>Unless created manually, replicasets are managed by the deployment and you won't be able to have a single deployment with multiple replicasets running different versions.</p> <p>It will definitely be easier for ...
<p>Is there any recommended approach to taking Heapdumps &amp; Threaddumps for a Spring Boot app running in a Pod on AKS?</p> <p>And how to download the dump afterwards to my desktop?</p>
<p>There are many ways to take a heapdump and threaddumps. The easiest way for a Spring Boot app should be the Actuator endpoint.</p> <p><a href="https://docs.spring.io/spring-boot/docs/current/actuator-api/htmlsingle/#heapdump" rel="nofollow noreferrer">https://docs.spring.io/spring-boot/docs/current/actuator-api/html...
<p>I am deploying a 2-node Kubernetes cluster on GCloud using kops with the following commands:</p> <pre><code>kops create cluster part1.k8s.local --zones europe-west3-a --node-count 2 --node-image ubuntu-os-cloud/ubuntu-2004-focal-v20210129 --node-size &quot;e2-standard-2&quot; --ssh-public-key ~/.ssh/id_rsa.pub --sta...
<p>The answer can be found here: <a href="https://github.com/kubernetes/kops/issues/10770" rel="nofollow noreferrer">https://github.com/kubernetes/kops/issues/10770</a></p>
<p>I try to use</p> <pre><code>kubectl get jobs -o custom-columns=TIMESTAMP:.metadata.creationTimestamp,NAME:.metadata.name </code></pre> <p>but can't find custom columns for 'ending at' and 'status'.</p> <p>Where can I find a columns list for kubectl get and describe job?</p>
<p>You can use the <code>status</code> section of the job to get the required details.</p> <p>The completion time is present at <code>.status.completionTime</code> and the status at <code>.status.conditions[].type</code>.</p> <pre><code>kubectl get jobs dummy-xxxx-xxxx -o custom-columns=TIMESTAMP:.metadata.creationTime...
<p>I have a remote privately managed Kubernetes cluster that I reach by going via an intermediary VM. To use kubectl from my machine I have setup an SSH tunnel that hops onto my VM and then onto my master node - this works fine.</p> <p>I am trying to configure Telepresence (<a href="https://www.telepresence.io/" rel="n...
<p>Telepresence 2 should support this better as it installs a sidecar container that makes it more resilient to interrupted connections. I would give the new version a try to see if you're still seeing timeout errors.</p> <p><a href="https://www.getambassador.io/docs/latest/telepresence/quick-start/" rel="nofollow nore...
<p>We are creating secrets for DB and mounting them as volume to POD, but when we update pod is not refreshing to pick up the new changes. but document says it does refresh automatically</p> <p><a href="https://kubernetes.io/docs/concepts/configuration/secret/" rel="nofollow noreferrer">https://kubernetes.io/docs/conc...
<p>Kubernetes does not itself support this feature at the moment and there is feature in the works (<a href="https://github.com/kubernetes/kubernetes/issues/22368" rel="nofollow noreferrer">https://github.com/kubernetes/kubernetes/issues/22368</a>).</p> <p>You can use custom solution available to achieve the same and o...
<p>Our users are allowed to access Kubernetes clusters only from the management station, there is no possibility to access the API directly from their laptops/workstations.</p> <p>Every user posses kubeconfig with relevant secrets belonging to this particular user. As the kubeconfig also contains the token used to aut...
<p>You could use bash process substitution to pass the entire <code>kubeconfig</code> to <code>kubectl</code> without saving it to a filesystem.</p> <p>Something like this works for CI systems:</p> <ol> <li>Base64-encode your <code>kubeconfig</code> and store it securely</li> </ol> <pre><code>export KUBECONFIG_DATA=$(c...
<p>I am currently moving from ECS to EKS and I'm confused over the divide between Helm and Terraform.</p> <p>We currently have a dedicate Terraform/Packer repo for our EKS cluster.</p> <p>We then have a repo for our app. The app requires an AWS RDS instance and SQS/SNS.</p> <p>My understanding is Helm doesn't support S...
<p>Helm is for installing applications on your EKS. SQS and RDS are not applications running on your container cluster, they are infrastructure. For those you can use Terraform, CloudFormation or CDK.</p> <p>You can find more examples on how to use the different tools here: <a href="https://www.eksworkshop.com/" rel="n...
<p>I installed <code>minikube</code> in <code>Windows 10</code> . I am able to start <code>minikube</code></p> <pre><code>**C:\WINDOWS\system32&gt;minikube start * minikube v1.15.1 on Microsoft Windows 10 Pro 10.0.18363 Build 18363 * Using the hyperv driver based on existing profile * Starting control plane node miniku...
<p>Minikube installs <code>kubectl</code> inside of itself.</p> <p>So to use the <code>kubectl</code> which you installed via minikube, you have to prepend the command arguments with <code>minikube kubectl --</code>. For example:</p> <pre class="lang-sh prettyprint-override"><code># the same as `kubectl version --clien...
<p>I have deployed the Bitnami helm chart of elasticsearch on the Kubernetes environment.</p> <p><a href="https://github.com/bitnami/charts/tree/master/bitnami/elasticsearch" rel="nofollow noreferrer">https://github.com/bitnami/charts/tree/master/bitnami/elasticsearch</a></p> <p>Unfortunately, I am getting the followin...
<p>You can't validate if your cluster is restricted with some security policy. In your situation someone (assuming administrator) has blocked the option to run privileged containers for you.</p> <p>Here's an example of how pod security policy blocks privileged containers:</p> <pre class="lang-yaml prettyprint-override"...
<p>I'm trying to use kubectl to wait for a service to get an external ip assigned. I've been trying to use the below just to get started</p> <pre><code>kubectl wait --for='jsonpath={.spec.externalTrafficPolicy==Cluster}' --timeout=30s --namespace cloud-endpoints svc/esp-echo </code></pre> <p>But I keep getting the belo...
<p>It is not possible to pass arbitrary <code>jsonpath</code> and there is already a <a href="https://github.com/kubernetes/kubernetes/issues/83094" rel="noreferrer">request for the feature</a>.</p> <p>However, you can use a bash script with some sleep and monitor the service using other <code>kubectl</code> commands:<...
<p>I have a Helm chart that uses Nginx chart as a dependency. Is it possible to specify different repo for pulling the image?</p> <p>My dependencies:</p> <pre><code>dependencies: - name: nginx-ingress version: &quot;3.15.2&quot; repository: &quot;https://kubernetes.github.io/ingress-nginx&quot; condition:...
<p>This is possible only if the chart has an option to do it.</p> <p>If you look at <a href="https://github.com/kubernetes/ingress-nginx/blob/master/charts/ingress-nginx/values.yaml" rel="nofollow noreferrer">the chart's <code>values.yaml</code> file</a> you can see that it has settings:</p> <pre class="lang-yaml prett...
<p>I created an AWS EKS Fargate cluster with the following Fargate profile</p> <pre><code>fargateProfiles: - name: fp-fluxcd selectors: - namespace: fluxcd </code></pre> <p>How do I either add (or change) the namespace so it looks like this?</p> <pre><code>fargateProfiles: - name: fp-fluxcd selectors:...
<p>As you can see in the <a href="https://docs.aws.amazon.com/eks/latest/userguide/fargate-profile.html" rel="nofollow noreferrer">AWS Fargate profile</a> documentation:</p> <blockquote> <p>Fargate profiles are immutable. However, you can create a new updated profile to replace an existing profile and then delete the o...
<p>I am upgrading K8s from 1.15 to 1.16. Before I do it, I must migrate my daemonsets, deployment, statefulset etc. to the apps/v1 version. But when I do it, I don't understand the K8s behaviour.</p> <p>Let's say, that we have a daemonset:</p> <pre><code>apiVersion: apps/v1beta2 kind: DaemonSet metadata: name: spot-i...
<p>I've reproduced your setup in GKE environment and after upgrading kubernetes version from 1.15 to 1.16 daemonset's <code>apiVersion</code> has changed to <code>apiVersion: apps/v1</code>.</p> <p>I've started with GKE version <code>1.15.12</code> and applied your configuration. Once successfully applied I've changed ...
<p>How can I connect to VM's running in GCP compute engine from Kubernetes pod? I have setup a proxy server in Compute Engine and I need to use that from within pods.</p> <p>This communication needs to be using internal IP. I have allowed firewall rules to allow all internal IP.</p> <p>Any suggestions on how to connect...
<p>You can create an internal load balancer in GCP and connect VM <strong>or</strong> you can use the VPC peering if in a different network.</p> <ul> <li>If your GKE and VM are in the same network you can use the internal IP of your VM to connect with.</li> </ul> <p>From inside of POD you can send <strong>curl</strong>...
<p>I have created kops cluster and getting below error when logging to the cluster.</p> <p>Error log :</p> <pre><code>*****INFO! KUBECONFIG env var set to /home/user/scripts/kube/kubeconfig.yaml INFO! Testing kubectl connection.... error: You must be logged in to the server (Unauthorized) ERROR! Test Failed, AWS role...
<p>with kops vs1.19 you need to add <code>--admin</code> or <code>--user</code> to update your kubernetes cluster and each time you log out of your server you have to export the cluster name and the storage bucket and then update the cluster again. this will work.</p>
<p>I have an HTTP application (Odoo). This app support install/updating modules(addons) dynamically.</p> <p>I would like to run this app in a Kubernetes cluster. And I would like to dynamically install/update the modules.</p> <p>I have 2 solutions for this problem. However, I was wondering if there are other solutions....
<p>You will probably be better off with your first solution. Specially if you already have all the toolchain to rebuild and deploy images. It will be easier for you to rollback to previous versions and also to troubleshoot (since you know exactly which version is running in each pod).</p> <p>There is an alternative sol...
<p>I have many deployments in my Kubernetes cluster. How does the pathway for a HTTP/1.x request looks like from a pod injected with linkerd to another pod without linkerd injected ?</p>
<p>The request will traverse the proxy in the source pod and will simply hit the destination pod directly. Shouldn't really affect anything, other than Linkerd won't be able to handle mTLS and you won't get client-side metrics on the destination.</p>
<p>I'm trying to understand what does <code>kubectl rollout status &lt;deployment name&gt;</code> do.</p> <p>I'm using k8s-node-api, and from this thread (<a href="https://github.com/kubernetes-client/javascript/issues/536" rel="nofollow noreferrer">https://github.com/kubernetes-client/javascript/issues/536</a>), the m...
<p>As we have discussed in comment section I have mentioned that to check any object and processes in Kubernetes you have to use kubectl - see: <a href="https://kubernetes.io/docs/reference/kubectl/overview/" rel="nofollow noreferrer">kubernetes.io/docs/reference/kubectl/overview</a>. Take a look how to execute proper ...
<p>I am running a Celery Executor and I'm trying to run some python script in the KubernetesPodOperator. Below are examples of what I have tried that didn't work. What am I doing wrong?</p> <p>Running sctipt</p> <pre><code>org_node = KubernetesPodOperator( namespace='default', image=&quot;python&quot;, cmds...
<p>The script <code>somescript.py</code> must be in <code>Docker image</code>.</p> <p><strong>Step-1</strong>: let's create a image <a href="https://docs.docker.com/develop/develop-images/dockerfile_best-practices/" rel="nofollow noreferrer">https://docs.docker.com/develop/develop-images/dockerfile_best-practices/</a>....
<p>I have a K8S cluster running in Azure AKS service.</p> <p>I want to enforce <strong>MustRunAsNonRoot</strong> policy. How to do it?</p> <p>The following policy is created:</p> <pre><code>apiVersion: policy/v1beta1 kind: PodSecurityPolicy metadata: name: restrict-root spec: privileged: false allowPrivilegeEscal...
<p>You shouldn't use <code>PodSecurityPolicy</code> on <strong>Azure AKS cluster</strong> as it has been set for deprecation as of May 31st, 2021 in favor of <a href="https://learn.microsoft.com/en-us/azure/aks/use-pod-security-on-azure-policy" rel="nofollow noreferrer">Azure Policy for AKS</a>. Check <a href="https://...
<p>I am planning to deploy HA database cluster on my kubernetes cluster. I am new to database and I am confused by the various database terms. I have decided on MariaDB and I have found two charts, <a href="https://artifacthub.io/packages/helm/bitnami/mariadb" rel="nofollow noreferrer">MariaDB</a> and <a href="https://...
<p>I'm not an expert so take my explanation with precaution (and double check it)</p> <p>The main difference between the MariaDB's Chart and the MariaDB Galera Cluster's Chart is that the first one will deploy the standard master-slave (or primary-secondary) database, while the second one is a resilient master-master (...
<p>Small question regarding Kubernetes and how one pod can talk to another pod (two pods in total) when they are in one same namespace, hopefully without a very complex solution.</p> <p>Setup: I have one pod A, called juliette-waiting-for-romeo-tocall, which exposes a rest endpoint <code>/romeo-please-call-me</code></p...
<p>More generally, pod-to-pod communication is documented by &quot;<a href="https://kubernetes.io/docs/concepts/cluster-administration/networking/" rel="nofollow noreferrer">Cluster Networking</a>&quot;</p> <blockquote> <p>Every Pod gets its own IP address.</p> <p>This means you do not need to explicitly create links b...
<p>I'm learning spark, and I'm get confused about running docker which contains spark code on <code>Kubernetes</code> cluster.</p> <ul> <li><p>I read that <code>spark</code> get utilized multiple nodes (servers) and it can run code on different nodes, in order to get complete jobs faster (and get used the memory of eac...
<p>When you run Spark on Kubernetes, you have a few ways to set things up. The most common way is to set Spark to run in client-mode.</p> <p>Basically Spark can run on Kubernetes on a Pod.. then the application itself, having the endpoints for the k8s masters, is able to <strong>spawn its own worker Pods</strong>, as l...
<p>I'm trying to create a k3s cluster at home using 3 raspberry pi 4. I've sweat a lot setting up the nginx-ingress + letsencrypt pods. Actually, it seems to work but I can't check it now.</p> <p>Now my problem is the following:</p> <p>I'm connected to internet using an ISP router (Livebox Orange).</p> <p>My 3 RPI are ...
<h2>For your current case:</h2> <p>You need to introduce a new k3s independent component in your network and that can be a reverse proxy like HAProxy, which can be set up to balance requests between 3 IPs.</p> <h2>Or:</h2> <p>#1 Rebuild your k3s cluster without Traefik and Service LoadBalancer:</p> <pre><code>curl -sfL...
<p>I have an alpine docker image to run my raw PHP website on an apache server(PHP 7.4) <code>EXPOSE 80</code>.<br> I want to run the image on Kubernetes(GKE) with an ingress controller.<br> I'm pushing the image with gcloud command to the google container registry.<br> Both the deployment and service have no errors an...
<p>I've run some tests on my GKE cluster. I've replicate your behavior using 2 hello world applications v1 and v2.</p> <h2>Scenario 1</h2> <p>HW 1</p> <pre><code> spec: containers: - name: hello1 image: gcr.io/google-samples/hello-app:1.0 imagePullPolicy: IfNotPresent ports: ...
<p>I need to get error pods above five days. The below commands is working well for the pods which is below five days. Could anyone please let me know on how to get pods which is above 5 days only. It should not show the error pods which is below 5 days.</p> <pre><code>kubectl get pods --all-namespaces --sort-by=.metad...
<p>I got two options for you:</p> <pre><code>kubectl get pods --sort-by=.metadata.creationTimestamp | awk 'match($5,/[6-9]d|[0-9][0-9]d|[0-9][0-9][0-9]d/) {print $0}' | grep -i error </code></pre> <p>or</p> <pre><code>kubectl get pods --field-selector=status.phase=Pending --sort-by=.metadata.creationTimestamp | awk 'ma...
<p>I'm running Jenkins using docker container and accessing it on localhost:8080 using following command:</p> <pre class="lang-sh prettyprint-override"><code>sudo docker run --name uditgauravtest11 -p 8085:8080 -v /var/run/docker.sock:/var/run/docker.sock uditgaurav/test:1 </code></pre> <p>Now I've accessed the Jenkins...
<p>ERROR: SEVERE: Failed to connect to http://localhost:8080/tcpSlaveAgentListener/: Connection refused (Connection refused)</p> <p>First, ensure your GKE cluster can connected to your Jenkins master host's 50000 TCP port.(telnet 12.12.12.12 50000)</p> <p>Your agent Failed to connect to the Jenkins master, if they not ...
<p>I want to share my non-empty local directory with kind cluster.</p> <p>Based on answer here: <a href="https://stackoverflow.com/questions/62694361/how-to-reference-a-local-volume-in-kind-kubernetes-in-docker">How to reference a local volume in Kind (kubernetes in docker)</a></p> <p>I tried few variations of the foll...
<p>Turns out these yaml configuration was just fine.</p> <p>The reason the directory was not showing up in the container was related with docker settings. And because &quot;kind is a tool for running local Kubernetes clusters using Docker container “nodes”&quot;, it matters.</p> <p>It seems docker restricts resource sh...
<p>I have developed a Camel route with Spring Boot. Now I want to trace the route using Jaeger. I tried <a href="https://github.com/apache/camel/tree/master/examples/camel-example-opentracing" rel="nofollow noreferrer">this example</a> to trace the route using <code>camel-opentracing</code> component, but I am unable t...
<p>Apache Camel doesn't provide an implementation of <a href="https://opentracing.io/" rel="nofollow noreferrer">OpenTracing</a>, so you have to add also an implementation to your dependencies. For example <a href="https://www.jaegertracing.io/" rel="nofollow noreferrer">Jaeger</a>.</p> <p><strong>Maven POM:</strong></...
<p>I'm studying helm3 and k8s (microk8s). While tryingi the following command:</p> <pre><code>helm install traefik traefik/traefik -n traefik --values traefik-values.yaml </code></pre> <p>and traefik-values.yaml has the following value:</p> <pre><code>additionalArguments: - &quot;--certificatesresolvers.letsencrypt....
<p>There's an <a href="https://github.com/traefik/traefik-helm-chart/issues/336" rel="noreferrer">open issue</a> on the Traefik helm chart <a href="https://github.com/traefik/traefik-helm-chart/issues/336#issuecomment-776163841" rel="noreferrer">where Jasper Ben</a> suggests a working solution:</p> <pre><code>hostNetwo...