Question
stringlengths
65
39.6k
QuestionAuthor
stringlengths
3
30
Answer
stringlengths
38
29.1k
AnswerAuthor
stringlengths
3
30
<p>I am running 3 mongodb pods and separate service and persistent volume claims for each pod. I want to do the Mongodb replication among the 3 pods. Login into 1st pod and gave the mongo command, then i configured hosts as <strong>podname.servicename.namespace.svc.cluster.local:27017</strong> for each pod.</p> <pre><...
BSG
<p>You must explicitly bind <code>mongod</code> to the non-loopback interface since mongo 3.6, according to <a href="https://docs.mongodb.com/manual/reference/configuration-options/#net.bindIp" rel="nofollow noreferrer">the fine manual</a></p> <p>You can test that theory yourself by exec-ing into <code>mongo-1.mongo.d...
mdaniel
<p>I'm trying to scale my docker containers with Minikube on Windows 10 Enterprise Edition. However, I'm running into a few conflicts with Hyper-V and VirtualBox. I know Dockers require Hyper-V to run properly while Minikube requires VirtualBox to run (shows an error if Hyper-V is enabled) </p> <pre><code>C:\WINDOWS\s...
Rking14
<blockquote> <p>I also tried running minikube with Hyper-V driver, but also get this error:</p> </blockquote> <p>There is an explicit warning about that HyperV and vswitch situation in their docs: <a href="https://github.com/kubernetes/minikube/blob/v0.28.2/docs/drivers.md#hyperv-driver" rel="nofollow noreferrer">ht...
mdaniel
<p>I have created and deployed an application on ICP 2.1. Have exposed NodePort as my service. Iam able to navigate to the url from the Nodeport. How do i go to a specific path on the url directly from the Nodeport. Iam using yaml file to create the deployment and service. Where should i specify the path??</p>
vidya
<blockquote> <p>How do i go to a specific path on the url directly from the Nodeport</p> </blockquote> <p>The short version is that you don't, since a <code>NodePort</code> is merely an exposure of an existing <code>port:</code> from a <code>Service</code>.</p> <p>The medium length version is that using an ingress ...
mdaniel
<p>I'm trying to setup Redis cluster in Kubernetes. The major requirement is that all of nodes from Redis cluster have to be available from outside of Kubernetes. So clients can connect every node directly. But I got no idea how to configure service that way. </p> <p>Basic config of cluster right now. It's ok for serv...
Shtlzut
<p>Given:</p> <pre><code> spec: hostNetwork: true containers: - name: redis-cluster ports: - containerPort: 6379 name: client </code></pre> <p>It appears that your <code>StatefulSet</code> is misconfigured, since if <code>hostNetwork</code> is <code>true</code>, you hav...
mdaniel
<p>I have this weird error plaguing me.</p> <p>I am trying to get an activemq pod running with a kubernetes stateful set, volume attached. </p> <p>The activemq is just a plain old vanila docker image, picked it from here <a href="https://hub.docker.com/r/rmohr/activemq/" rel="nofollow noreferrer">https://hub.docker.c...
virtuvious
<blockquote> <p>WARN | Failed startup of context o.e.j.w.WebAppContext@478ee483{/admin,file:/opt/apache-activemq-5.15.4/webapps/admin/,null}</p> <p>java.lang.IllegalStateException: Parent for temp dir not configured correctly: writeable=false</p> </blockquote> <p>Unless you altered the <code>activemq</code> use...
mdaniel
<p>I created an InitializerConfiguration that adds my initializer for pods.</p> <p>The documentation says to use a Deployment (<a href="https://kubernetes.io/docs/reference/access-authn-authz/extensible-admission-controllers/#configure-initializers-on-the-fly" rel="nofollow noreferrer">https://kubernetes.io/docs/refer...
cberner
<blockquote> <p>However, doing so results in my initializer Pod being stuck in "pending" because it's waiting for itself to initialize it</p> </blockquote> <p>But the docs say:</p> <blockquote> <p>You should first deploy the initializer controller and make sure that it is working properly before creating the <cod...
mdaniel
<p>I have a single node kubernetes deployment running on a home server, on which I have several services running. Since it's a small local network, I wanted to block off a portion of the local address range that the rest of my devices use for pod ips, and then route to them directly.</p> <p>For example, if I have a we...
Max Ehrlich
<p>I believe the answer to your question is to use the <a href="https://github.com/containernetworking/plugins#ipam-ip-address-allocation" rel="nofollow noreferrer">dhcp IPAM</a> plugin to <a href="https://github.com/containernetworking/cni#readme" rel="nofollow noreferrer">CNI</a>, but being mindful about Pod address ...
mdaniel
<p>I have installed Grafana from this git repo <a href="https://github.com/ibrahiem94/prometheus-kubernetes" rel="nofollow noreferrer">Grafana-Kubernates</a>. After the installation, Grafana web monitor link is available at <code>{aws LB}/api/v1/namespaces/monitoring/services/grafana/proxy</code>. But when I navigate t...
Ibrahim Mohamed
<blockquote> <p>how can I solve this?</p> </blockquote> <p>Exposing functionality outside of the cluster is designed to be done with either a <code>Service</code> of type <code>LoadBalancer</code>, where kubernetes will create the ELB on your behalf, or with an <code>ingress-controller</code> such that you only have...
mdaniel
<p>looking a guide to install kubernetes over AWS EC2 instances using kops <a href="https://medium.com/containermind/how-to-create-a-kubernetes-cluster-on-aws-in-few-minutes-89dda10354f4" rel="nofollow noreferrer">Link</a> I want to install a Kubernetes cluster, but I want assign Elastic IP at least to my control and e...
Miguel Conde
<blockquote> <p>I want to install a Kubernetes cluster, but I want assign Elastic IP at least to my control and etcd nodes</p> </blockquote> <p>The correct way, and the way almost every provisioning tool that I know of does this, is to use either an Elastic Load Balancer (ELB) or the new Network Load Balancer (NLB) ...
mdaniel
<p>I'm having trouble connecting to the kubernetes python client even though I'm following the examples <a href="https://github.com/kubernetes-client/python/blob/master/examples/example1.py" rel="noreferrer">here</a> in the api. </p> <p>Basically this line can't connect to the kubernetes client: </p> <pre><code>confi...
helloworld
<p>You don't want <code>config.load_kube_config()</code>, you want <a href="https://github.com/kubernetes-client/python/blob/6.0.0/examples/in_cluster_config.py#L21" rel="noreferrer"><code>config.load_incluster_config()</code></a></p> <p>If you need to distinguish between your setup and when it's running in a <code>Po...
mdaniel
<p>Running Ubuntu 18.04 </p> <p>kubectl : 1.10</p> <p>Google Cloud SDK 206.0.0 alpha 2018.06.18 app-engine-python 1.9.70 app-engine-python-extras 1.9.70 beta 2018.06.18 bq 2.0.34 core 2018.06.18 gsutil 4.32</p> <pre><code>helm init $HELM_HOME has been configured at /home/jam/snap/helm/common. Error: error installin...
hounded
<p><code>snap</code> is like docker in that I believe its filesystem and your filesystem intersect only in very controlled ways -- otherwise the isolation feature would be null and void. In docker, you can "volume mount" a directory from the host FS into the "guest" FS, so if snap permits such a thing: you'd want to ma...
mdaniel
<p>I have an ingress-nginx controller handling traffic to my Kubernetes cluster hosted on GKE. I set it up using helm installation instructions from docs:</p> <p><a href="https://kubernetes.github.io/ingress-nginx/" rel="noreferrer">Docs here</a></p> <p>For the most part everything is working, but if I try to set cac...
Murcielago
<p>Those <code>location</code> blocks are <a href="https://nginx.org/en/docs/http/ngx_http_core_module.html#location" rel="noreferrer">last and/or longest match wins</a>, and since the ingress <strong>itself</strong> is not serving any such content, the nginx relies on a <a href="https://nginx.org/en/docs/http/ngx_http...
mdaniel
<p>I am trying to build an API, which can send back my pods' resource usage. Looking at the <a href="https://i.stack.imgur.com/9wPbP.png" rel="nofollow noreferrer">resources being used by the pods</a>, I am not able to figure out the go-client API to send the request to. Any help will be very appreciated.</p>
Shibu
<ol> <li><p>I'm pretty sure the kuberetes-dashboard uses XHR to obtain that data, so you can make the same requests your browser does, provided your <code>serviceAccount</code> has the correct credentials to interrogate the kubernetes-dashboard API</p></li> <li><p>either way, that timeseries data surfaced by kubernetes...
mdaniel
<p>I have a deployment with a php image that connects with a redis deployment in the 6379 port.</p> <p>The problem is that the php application connects in the host 127.0.0.1 of its own pod, but the redis is in another pod (and have its own ClusterIP service). </p> <p>I can't change the app code, so I want to redirect...
mayconfsbrito
<p>kubernetes uses <a href="http://www.dest-unreach.org/socat/" rel="nofollow noreferrer"><code>socat</code></a> for doing port-forwarding from <code>kubectl</code>, so if they trust it that much, it seems reasonable you could trust it, too.</p> <p>Place it in a 2nd container that runs alongside your php container, ru...
mdaniel
<p>I have tried to install Kubernetes on 3 separate Ubuntu 16.04 machines, with poor results. On all three machines, the recommended installation, using snap and conjure-up did not work:</p> <pre><code>gknight@pz1:~$ sudo snap install conjure-up --classic [sudo] password for gknight: gknight@pz1:~$ sudo reboot gknigh...
Gene Knight
<blockquote> <p>remote 512mb KVM VPS</p> </blockquote> <p>That's almost certainly the problem, as I don't know of very much software nowadays that will run in that little memory. It matches your experience that the machine will start swapping like mad, driving the I/O pressure through the roof</p>
mdaniel
<p>I have kubernetes cluster which I created with <a href="https://github.com/kubernetes/kops" rel="nofollow noreferrer">kops</a> on AWS. I'm trying to use <a href="https://github.com/box/kube-applier" rel="nofollow noreferrer">kube-applier</a> to apply <code>yaml</code> configuration to my cluster: I created a deploym...
Kirill
<blockquote> <p>How can I grant permissions to kube-applier pod to apply configurations in other namespaces?</p> </blockquote> <p>Create, or find, a <code>ClusterRole</code> with the correct resource permissions, then bind the <code>ServiceAccount</code> to it using a <code>ClusterRoleBinding</code> like so</p> <pr...
mdaniel
<p>I have two different Minecraft server containers running, both set to use the default TCP port 25565. To keep things simple for laymen to connect, I would like to have a subdomain dedicated to each server, say mc1.example.com and mc2.example.com, such that they only put the address in and the client connects. </p> ...
user1943640
<blockquote> <p>This is also installed on bare metal - there is not a cloud L4 load balancer available, and a very limited pool of IP addresses (assume there are not enough to cover all the various Minecraft servers).</p> </blockquote> <p>If you don't have enough IP addresses, then MetalLB won't help you, since it i...
mdaniel
<p>I'm trying to deploy my Dockerized React app to Kubernetes. I believe I've dockerized it correctly, but i'm having trouble accessing the exposed pod.</p> <p>I don't have experience in Docker or Kubernetes, so any help would be appreciated.</p> <p>My React app is just static files (from npm run build) being served ...
user1596241
<p>The short version is that the Service is listening on the same TCP/IP port on every Node in your cluster (<code>34604</code>) as is shown in the output of <code>describe service</code>:</p> <pre><code>NodePort: &lt;unset&gt; 34604 </code></pre> <p>If you wish to access the application through a "n...
mdaniel
<p>I am trying using Kubernetes Java client for few use cases.</p> <p><a href="https://github.com/kubernetes-client/java" rel="nofollow noreferrer">https://github.com/kubernetes-client/java</a></p> <p>Our Kubernetes cluster is been implemented with OpenId authentication.</p> <p>Unfortunately, the Java client doesn't su...
user1578872
<p><a href="https://github.com/kubernetes-client/java/tree/client-java-parent-2.0.0-beta1/util/src/main/java/io/kubernetes/client/util/credentials" rel="nofollow noreferrer">Apparently not</a>, but by far the larger question is: what would you <em>expect</em> to happen with an <code>oidc</code> <code>auth-provider</cod...
mdaniel
<p>I started a pod in kubernetes cluster which can call kubernetes api via go-sdk (like in this example: <a href="https://github.com/kubernetes/client-go/tree/master/examples/in-cluster-client-configuration" rel="nofollow noreferrer">https://github.com/kubernetes/client-go/tree/master/examples/in-cluster-client-configu...
Kirill
<p>As yaml directly: no, not that I'm aware of. But if you increase the <code>kubectl</code> verbosity (<code>--v=100</code> or such), you'll see that the first thing <code>kubectl</code> does to your yaml file is convert it to json, and then <code>POST</code> <em>that</em> content to the API. So the spirit of the answ...
mdaniel
<p>I have a integration Kubernetes cluster in AWS, and I want to conduct end-to-end tests on that cluster. </p> <p>I currently use Deployments and Services.</p> <p>The proposed approach is to use Ingress and configure it to use cookie injection for ensuring access to web page that implements the following logic:</p> ...
Bartosz Zawadzki
<p>It sounds like either <a href="https://kubernetes.github.io/ingress-nginx/user-guide/nginx-configuration/annotations/#configuration-snippet" rel="nofollow noreferrer">configuration-snippet</a> or a full-blown <a href="https://kubernetes.github.io/ingress-nginx/user-guide/nginx-configuration/custom-template/" rel="no...
mdaniel
<p>Let's say I have a database with schema of v1, and an application which is tightly coupled to that schema of v1. i.e. SQLException is thrown if the records in the database don't match the entity classes.</p> <p>How should I deploy a change which alters the database schema, and deploys the application which having a...
aclowkay
<p>This problem actually isn't specific to kubernetes, it happens in any system with more than one server -- kubernetes just makes it more front-and-center because of how automatic the rollover is. The words "tightly coupled" in your question are a dead giveaway of the <em>real</em> problem here.</p> <p>That said, the...
mdaniel
<p>I have created a k8s cluster with RHEL7 with kubernetes packages GitVersion:"<strong>v1.8.1</strong>". I'm trying to deploy wordpress on my custom cluster. But pod creation is always stuck in ContainerCreating state.</p> <pre><code>phani@k8s-master]$ kubectl get pods --all-namespaces NAMESPACE NAME ...
phanikumar ch
<blockquote> <p>Failed create pod sandbox.</p> </blockquote> <p>... is almost always a <a href="https://github.com/containernetworking/cni#readme" rel="nofollow noreferrer">CNI</a> failure; I would check on the <em>node</em> that all the weave containers are happy, and that <code>/opt/cni/bin</code> is present (or i...
mdaniel
<p>I am new to the Kubernetes and especially using helm. I installed the charts and it works fine with default values. I want to the add smtp server setting in the values.yml file for the chart. I am confused on how to inject the values while installing the chart. This is the chart that I am using <a href="https://gith...
Anshul Tripathi
<p>The interaction between parent and child chart values is summarize very well in this SO answer: <a href="https://stackoverflow.com/questions/49580938/helm-overriding-chart-and-values-yaml-from-a-base-template-chart#49581516">helm overriding Chart and Values yaml from a base template chart</a></p> <p>There are two s...
mdaniel
<p>so I need to connect to the python kubernetes client through a pod. I've been trying to use <code>config.load_incluster_config()</code>, basically following the example from <a href="https://github.com/kubernetes-client/python/blob/master/examples/in_cluster_config.py" rel="noreferrer">here</a>. However it's throwin...
helloworld
<blockquote> <p>so I need to connect to that pod somehow through the python api</p> </blockquote> <p>I am pretty sure you misunderstood <a href="https://stackoverflow.com/a/51035715/225016">my answer</a>, and/or I misunderstood your question. One should only use <code>load_incluster_config</code> when ... in-cluster...
mdaniel
<p>I need to deploy GitLab with Helm on Kubernetes. I have the problem: PVC is Pending.</p> <p>I see <code>volume.alpha.kubernetes.io/storage-class: default</code> in PVC description, but I set value <code>gitlabDataStorageClass: gluster-heketi</code> in values.yaml. And I fine deploy simple nginx from article <a href...
Ivan
<p>Without a link to the actual helm you used, it's impossible for anyone to troubleshoot why the go-template isn't correctly consuming your <code>values.yaml</code>.</p> <blockquote> <p>I see <code>volume.alpha.kubernetes.io/storage-class: default</code> in PVC description, but I set value <code>gitlabDataStorageCl...
mdaniel
<p>From <a href="https://kubernetes.io/docs/tasks/administer-cluster/access-cluster-api/" rel="noreferrer">assess cluster api</a>, i know that the pod in the cluster can using the clusterIp service kubernetes.default.svc to access the api server, but i am curious about how it works. </p> <p>The pod in the cluster woul...
user2992389
<blockquote> <p>The pod in the cluster would only try to access the clusterip defined in the kubernetes.default.svc, the clusterip is nothing different with the other cluster ip except the svc's name.</p> </blockquote> <p>Absolutely correct</p> <blockquote> <p>So how can a http request to the specific clusterip b...
mdaniel
<p>I currently have kubectl v1.10.6 which I need to access my cluster, however I'm also trying to connect to a different cluster thats running on v1.5.</p> <p>How and whats the best practice in having multiple version of a package on my computer? I could downgrade my package to v1.5, but that would require me to upgra...
AlphaCR
<p>They're statically linked, and have no dependencies, so there's no need to use a dependency manager for them:</p> <pre><code>$ curl -sSfo /usr/local/bin/kubectl-1.9 \ https://storage.googleapis.com/kubernetes-release/release/v1.9.11/bin/linux/amd64/kubectl $ chmod 755 /usr/local/bin/kubectl-1.9 </code></pre>
mdaniel
<p>I use <a href="https://gist.github.com/ruzickap/c072cdfe480ca52bd32b6c4fcf8397a2" rel="nofollow noreferrer">https://gist.github.com/ruzickap/c072cdfe480ca52bd32b6c4fcf8397a2</a> for deploy kubernetes</p> <p>Need:</p> <pre><code># Create kubespray config file cat &gt; ~/.kubespray.yml &lt;&lt; EOF kubespray_git_rep...
Anton Patsev
<blockquote> <p>Can i use kubespray without kubespray_git_repo, kubespray_path ?</p> </blockquote> <p>Without question, yes; arguably it will <em>most often</em> be used without those things (I have actually never even heard of <code>kubespray prepare</code>):</p> <ol> <li><a href="https://github.com/kubernetes-inc...
mdaniel
<p>Using docker can simplify CI/CD but also introduce the complexity, not everybody able to hold the docker network though selecting open source solutions like Flannel, Calico. So why don't use host network in docker, or what lost if use host network in docker. I know the port conflict is one point, any others?</p>
Simon
<p>There are two parts to an answer to your question:</p> <ol> <li>Pods must have individual, cluster-routable, IP addresses and one should be <strong>very cautious</strong> about recycling them</li> <li>You can, if you wish, not use any software defined network (SDN)</li> </ol> <p>So with the first part, it is usual...
mdaniel
<p>I'm trying to deploy Postgres on my Kubernetes cluster and I have been successful to do this, but then I don't know how I can import my data which are in csv format. I already have the scripts which gets the path to data and create a database in a local instance of postgres, but when I deploy postgres on Kubernetes ...
Fatemeh Rouzbeh
<p>If you're using the <a href="https://hub.docker.com/_/postgres" rel="nofollow noreferrer">official docker image</a>, or an image that is derived from it but didn't destroy its entrypoint, then they have <a href="https://hub.docker.com/_/postgres#how-to-extend-this-image" rel="nofollow noreferrer">documentation about...
mdaniel
<p>Circleci and many other ci tools show real time logs during the job running. It like the <code>tail -f</code> in linux but it also show all the previous logs. </p> <p>I am trying to sync specific logs from kubernetes to s3 and then move the update to the browse it that possible?</p>
aisensiy
<blockquote> <p>I am trying to sync specific logs from kubernetes to s3 and then move the update to the browse it that possible?</p> </blockquote> <p>IMHO you would want to have a "tee" mechanism to divert the log streams to <em>each</em> destination, since those two destinations have vastly different access (and re...
mdaniel
<p>I have been running a pod for more than a week and there has been no restart since started. But, still I am unable to view the logs since it started and it only gives logs for the last two days. Is there any log rotation policy for the container and how to control the rotation like based on size or date?</p> <p>I t...
user1578872
<blockquote> <p>Is there any log rotation policy for the container and how to control the rotation like based on size or date</p> </blockquote> <p>The log rotation is controlled by the docker <code>--log-driver</code> and <code>--log-opts</code> (or their <a href="https://docs.docker.com/engine/reference/commandline...
mdaniel
<p>I am trying to get Ansible AWX installed on my Kubernetes cluster but the RabbitMQ container is throwing "Failed to get nodes from k8s" error.</p> <p><strong>Below are the version of platforms I am using</strong> </p> <pre><code>[node1 ~]# kubectl version Client Version: version.Info{Major:"1", Minor:"9", GitVersi...
kaylor
<p>I <em>believe</em> the solution is to omit <a href="https://github.com/ansible/awx/blob/1.0.6/installer/roles/kubernetes/templates/deployment.yml.j2#L40" rel="nofollow noreferrer">the explicit kubernetes host</a>. I can't think of any good reason one would need to <em>specify</em> the kubernetes api host from inside...
mdaniel
<p>I'm trying to install metricbeat helm chart to forward my kubernetes metrics to elasticsearch.</p> <p>Default configuration works but when I configure output to elasticsearch, the pod tell me </p> <blockquote> <blockquote> <p>Exiting: error unpacking config data: more than one namespace configured accessing ...
Leisen Chang
<p>According to <a href="https://www.elastic.co/guide/en/beats/metricbeat/6.x/file-output.html#_literal_enabled_literal_6" rel="noreferrer">the fine manual</a>, the property is actually <code>enabled:</code> not <code>enable:</code> so I would presume you actually want:</p> <pre><code>output.file: enabled: false </c...
mdaniel
<p>I have a Docker image which runs a python subprocess, which is a <code>node.js</code> server exposing an end point <code>/check</code>. The whole thing is put inside a Kubernetes pod and uses <code>/check</code> as the readinessProbe endpoint.</p> <p>Now at some point, I want to close this endpoint or force-fail al...
KeenSeeker99
<blockquote> <p>Is that possible at all? If not, what is the best alternative?</p> </blockquote> <p>I believe there are a few:</p> <ul> <li>remote address filtering</li> <li>magic headers</li> <li>a formal proxy container</li> </ul> <h3>remote address</h3> <p>Requests to <code>/check</code> coming from kubernetes...
mdaniel
<p>currently I recently switched our PostgreSQL cluster from a simple "bare-metal" (vms) workload to a containerised K8s cluster (also on vms).</p> <p>Currently we run <code>zalando-incubator/postgres-operator</code> and use Local Volume's with <code>volumeMode: FileSystem</code> the volume itself is a "simple" xfs vo...
Christian Schmitt
<blockquote> <p>Is there a way to tune the behavior</p> </blockquote> <p>Be cognizant of two things that <em>might</em> be impacting your in-cluster behavior: increased cache thrashing and the inherent problem of running concurrent containers on a Node. If you haven't already tried it, you may want to use taints and...
mdaniel
<p>I see a lot of traction for spark over kubernetes. Is it better over running spark on Hadoop? Both the approaches runs in distributive approach. Can someone help me understand the difference/comparision between running spark on kubernetes vs Hadoop ecosystem?</p> <p>Thanks</p>
Premchand
<blockquote> <p>Can someone help me understand the difference/comparision between running spark on kubernetes vs Hadoop ecosystem?</p> </blockquote> <p>Be forewarned this is a theoretical answer, because I don't run Spark anymore, and thus I haven't run Spark on kubernetes, but I have maintained both a Hadoop cluste...
mdaniel
<p>I have laravel image defined with Dockerfile like so...</p> <pre><code>FROM php:7.2-fpm # Copy composer.lock and composer.json COPY composer.lock composer.json /var/www/ # Set working directory WORKDIR /var/www # Install dependencies RUN apt-get update -y &amp;&amp; apt-get install -y openssl zip unzip git libpn...
karina
<blockquote> <p>But I don't want to use custom nginx,, instead I want to use nginx ingress from helm..</p> </blockquote> <p>I am pretty sure you are conflating two different nginx-es here: the ingress-controller's nginx is designed strictly for doing vhost upstream routing, and is only one of many ingress controller...
mdaniel
<p>I have a frontend application that works perfectly fine when I have just one instance of the application running in a kubernetes cluster. But when I scale up the deployment to have 3 replicas it shows a blank page on the first load and then after the refresh, it loads the page. As soon as I scale down the app to 1, ...
Anshul Tripathi
<blockquote> <p>I think the mismatch is causing the problem. Any Idea how to fix this mismatch issue so that the pods always have the same build?</p> </blockquote> <p>Yes, this is actually pretty common in a build where those resources change like that. You actually won't want to use the traditional rolling-update m...
mdaniel
<p>I have a docker image which is been deployed into kubernetes.</p> <p>The docker file is as follows.</p> <pre><code>FROM alpine/jdk1.8:latest RUN mkdir -p /opt/test/app COPY app.war /opt/test/app/app.war CMD java -jar /opt/test/app/app.war </code></pre> <p>This application uses hibernate and getting the below err...
user1578872
<blockquote> <p>loggerName="org.hibernate.orm.url" threadName="main" txnId="" HHH10000002: File or directory named by URL [file:/opt/test/app/app.war!/WEB-INF/classes] could not be found. URL will be ignored</p> </blockquote> <p>No, it's not a permission denied, it's using an incorrect URL scheme. <code>file://thin...
mdaniel
<p>I have a statefulset which has a nodeSelector:</p> <pre><code> nodeSelector: app: licensed </code></pre> <p>When I assign the node with <code>app: licensed</code>, I can see the pod is schedule on a specific node.</p> <p>But when I remove the label from the node, I don't see k8s remove the pod from that node. I...
Kintarō
<p>The thing you're looking for is likely <a href="https://kubernetes.io/docs/concepts/scheduling-eviction/taint-and-toleration/#taint-based-evictions" rel="nofollow noreferrer">taints and tolerations</a> if you want only designated things to run on designated Nodes. The <code>nodeSelector:</code> you used is used in t...
mdaniel
<p>I got my application working in docker-compose, then converted it using kompose. However, I have a problem when I want to get data from the back-end. I can no longer use my previous method because of the url.</p> <pre><code>@app.route("/") def home(): url = "http://backend:5000/" try: res = requests...
jor2
<p>The traditional way that is done is to use environment variables that are injected into your container's runtime. It is fine to have reasonable defaults so that local development can continue as it did before:</p> <pre class="lang-python prettyprint-override"><code> import os def home(): be_host = os.getenv(...
mdaniel
<p>Is there anyway to convert configuration files like xml to kubernetes configmap yaml file without using kubectl command ? Let’s say if I want to create xml files dynamically which in turn stored in git repo as configmap yaml and some operator can monitor for yaml changes and deploy it to the cluster.</p>
srikanth
<blockquote> <p>configuration files like xml to kubernetes configmap yaml file without using kubectl command</p> </blockquote> <p>Sure, because the only thing <code>kubectl</code> does with <code>yaml</code> is immediately convert it to <code>json</code> and then <code>POST</code> (or <code>PUT</code> or whatever) t...
mdaniel
<p>I'm writing an Ansible task to deploy GitLab in my k3s environment.</p> <p>According to the doc, I need to execute this to install GitLab using Helm:</p> <pre class="lang-sh prettyprint-override"><code>$ helm install gitlab gitlab/gitlab \ --set global.hosts.domain=DOMAIN \ --set certmanager-issuer.email=me@exam...
Binary Brain
<blockquote> <p>it seems that the GitLab helm chart requires --set parameters and fail with --values</p> </blockquote> <p>That is an erroneous assumption; what you are running into is that <code>--set</code> splits on <code>.</code> because otherwise providing fully-formed YAML on the command line would be painful</p> ...
mdaniel
<p>is it possible to deploy an ingress controller (nginx) without a public ip address? </p> <p>Thanks!</p>
sokolata
<blockquote> <p>is it possible to deploy an ingress controller (nginx) without a public ip address?</p> </blockquote> <p>Without question, yes, if the Ingress controller's <code>Service</code> is of <code>type: NodePort</code> then the Ingress controller's private IP address is <strong>every</strong> <code>Node</cod...
mdaniel
<p>It might be a question based on curiosity which couldn't find help on google.</p> <p>Consider this part of the yaml for a headless service:</p> <pre><code>ports: - port: abcd --&gt; this line </code></pre> <p>My doubt is when the cluster-ip for a headless service is already none (as it is a set of pods that it ...
Akash
<blockquote> <p>But then, do we really have a use-case for the port functionality of a headless service?</p> </blockquote> <p>IMHO, yes: because the very idea of a <code>Service</code> is not "a random IP address" -- otherwise it would be called <code>DHCPIPAddress</code>. The idea of a <code>Service</code> in kuber...
mdaniel
<p>Background: </p> <pre><code>$ kubectl get services -n ingress-nginx NAME TYPE CLUSTER-IP EXTERNAL-IP PORT(S) AGE ingress-nginx LoadBalancer 10.108.245.210 &lt;pending&gt; 80:30742/TCP,443:31028/TCP 41m $ kubectl cluster-info dump | grep LoadB...
rufus
<p>I would expect <code>grep -r cloud-provider= /etc/kubernetes/manifests</code> to either show you where the flag is being explicitly set to <code>--cloud-provider=</code> (that is, the empty value), or let you know that there is no such flag, in which case you'll need(?) to add them in three places:</p> <ul> <li><a ...
mdaniel
<p>Is it possible to take an image or a snapshot of container running inside pod using <code>kubectl</code>?</p> <p>Via <code>docker</code>, it is possible to use the <code>docker commit</code> command that creates an image of a container from which we can spawn more containers. I wanted to understand if there was some...
John
<p>No, partially because that's not in the kubernetes mental model of anything one would <em>wish</em> to do to a cluster, and partially because docker is not the only container runtime kubernetes uses. Every runtime one <em>could</em> use underneath kubernetes would need to support that operation, and I doubt they do....
mdaniel
<p>The <a href="https://kubernetes.io/docs/concepts/storage/volumes/" rel="nofollow noreferrer">documentation</a> doesn’t go into detail. I imagine I would at least need an iam role. </p>
mdornfe1
<p>This is the one used by kubespray, and is very likely indicative of a rational default:</p> <p><a href="https://github.com/kubernetes-incubator/kubespray/blob/v2.5.0/contrib/aws_iam/kubernetes-minion-policy.json" rel="nofollow noreferrer">https://github.com/kubernetes-incubator/kubespray/blob/v2.5.0/contrib/aws_iam...
mdaniel
<p>I have made some changes in order to fix a AWS related bug in Kubernetes and I would like to test this changes in AWS.</p> <p>I build Kubernetes locally using: <code>build/run.sh make</code> and then I tried to use kops setting as <code>kubernetesVersion</code> the output <code>_output/dockerized</code> but it does...
b1zzu
<blockquote> <p>Is there a simple way to deploy a local build kubernetes on AWS?</p> </blockquote> <p>If you already have an existing cluster running, then the answer is to either push your images to a common docker registry (either hub.docker.com, or ECR, or a locally hosted registry, or whatever), or to just cheat...
mdaniel
<p>Is there anything wrong with how I am trying to configure my Minikube cluster in a way the pods can access the PostgreSQL instance within the same machine?</p> <p>I've access the <code>/etc/hosts</code> within the Minikube cluster via <code>minikube ssh</code> and returns:</p> <pre><code>127.0.0.1 localhost 12...
David B
<blockquote> <p>I've access the /etc/hosts within the Minikube cluster via minikube ssh and returns</p> </blockquote> <p>That may be true, but for the same reason kubernetes does not expose the <code>/etc/hosts</code> of its Nodes, nor will minikube do the same thing. Kubernetes has its own DNS resolver, and thus its o...
mdaniel
<p>I setup a <strong>self-hosted</strong> registry on my machine to store the docker image files to test it thoroughly using <strong>minikube</strong> (lightweight Kubernetes implementation for local development).</p> <p>Though I'm able to successfully push &amp; pull repositories from local registry using <strong>doc...
Sunny Goel
<p>Well, I wouldn't expect <strong>your</strong> <code>localhost</code> to be the same as <code>localhost</code> from <code>minikube</code>'s point-of-view. Actually, I wouldn't expect your localhost to be the same localhost from <em>anything</em> in the kubernetes world's point-of-view.</p> <p>So, some practical thin...
mdaniel
<p>What is the max size allowed for Environment variable (pod->container->Env) in kubernetes, assuming base ubuntu containers? I am unable to find the relevant documentation. Question might seem stupid, but, I do need the info to make my design robust. </p>
AdmiralThrawn
<p>So at bare minimum there is some 1,048,576 byte limitation imposed:</p> <blockquote> <p>The ConfigMap "too-big" is invalid: []: Too long: must have at most 1048576 characters</p> </blockquote> <p>which I generated as:</p> <pre class="lang-sh prettyprint-override"><code>cat &gt; too-big.yml&lt;&lt;FOO apiVersion...
mdaniel
<p>Curious as to how configMaps can be referenced in PODs without appropriate serviceAccount and asscoiated RBAC rules ?</p> <p><strong>Sample POD Yaml mounting configMap</strong></p> <pre><code> - mountPath: /kubernetes-vault name: kubernetes-vault ................. ................. ...
Shashi
<blockquote> <p>doesn't access to configMap required appropriate ServiceAccount with access rules specified specifically for configMap access ?</p> </blockquote> <p>It will when a <code>ServiceAccount</code> is performing that action, yes, but <code>volumes:</code> are performed by a mixture of <code>kube-apiserver</co...
mdaniel
<p>I have a web application consisting of a few services - web, DB and a job queue/worker. I host everything on a single Google VM and my deployment process is very simple and naive:</p> <ul> <li>I manually install all services like the database on the VM </li> <li>a bash script scheduled by crontab polls a remote git...
kpax
<blockquote> <p>I wonder if docker-compose is a reasonable choice for a simple web application.</p> </blockquote> <p>It can be, sure, if the development time is best spent focused on the web application and <em>less</em> on the non-web stuff such as the job queue and database. The other asterisk is whether the devel...
mdaniel
<p>I am fresh to Kubernetes. </p> <p>My understanding of <code>secret</code> is that it encodes information by <code>base64</code>. And from the resources I have seen, it is claimed that <code>secret</code> could protect sensitive information. I do not get this. </p> <p>Besides encoding information with <code>base64<...
Quan Zhou
<p>The thing which protects a <code>Secret</code> is the fact that it is a distinct resource type in kubernetes, and thus can be subject to a different RBAC policy than a <code>ConfigMap</code>.</p> <p>If you are currently able to read <code>Secret</code>s in your cluster, that's because your <code>ClusterRoleBinding<...
mdaniel
<p>When using <code>kubectl run -ti</code> with an interactive terminal, I would like to be able to pass a few commands in the <code>kubectl run</code> command to be run before the interactive terminal comes up, commands like <code>apt install zip</code> for example. In this way, I do not need to wait for the interacti...
imriss
<p>You can use the shell's <code>exec</code> to hand control over from your initial &quot;outer&quot; bash, responsible for doing the initialization steps you want, over to a fresh one (fresh in the sense that it does not have <code>-c</code> and can optionally be a login shell) which runs after your pre-steps:</p> <pr...
mdaniel
<p>A docker container with a small Python app inside it is deployed to a Kubernetes cluster that has a <code>redis master</code> and a <code>redis slave</code> service running in the cluster. The Python app inside the Docker container is not able to connect to the <code>redis</code> across the cluster because the Pyth...
CodeMed
<blockquote> <p>What specific changes need to be made to the code below in order for the python app in app.py to be able to communicate successfully with the redis running in the same cluster?</p> </blockquote> <pre class="lang-py prettyprint-override"><code>redis = Redis(host="redis-master", db=0, socket_connect_ti...
mdaniel
<p>I'm attempting to add a file to the /etc/ directory on an AWX task/web container in kubernetes. I'm fairly new to helm and I'm not sure what I'm doing wrong.</p> <p>The only thing I've added to my helm chart is krb5 key in configmap and an additional volume and volume mount to both task and web container. The krb5....
Ian Clark
<p>You'll want to use the <a href="https://kubernetes.io/docs/reference/generated/kubernetes-api/v1.14/#volumemount-v1-core" rel="nofollow noreferrer"><code>subPath:</code></a> option to "reach into" that <code>-application-config-krb5</code> and mount only the one file:</p> <pre><code>- mountPath: /etc/krb5.conf na...
mdaniel
<p>What happened: Add &quot;USER 999:999&quot; in Dockerfile to add default uid and gid into container image, then start the container in Pod , its UID is 999, but its GID is 0.</p> <p>In container started by Docker the ID is correct</p> <pre><code>docker run --entrypoint /bin/bash -it test bash-5.0$ id uid=9999 gid=9...
Huang Shujun
<p>I realize this isn't what you asked, but since I don't know why the <code>USER</code> directive isn't honored, I'll point out that you have explicit influence over the UID and GID used by your Pod via the <a href="https://kubernetes.io/docs/reference/generated/kubernetes-api/v1.18/#podsecuritycontext-v1-core" rel="n...
mdaniel
<p>I'm new to Kubernetes and Rancher. I have builde node docker image with below commands:</p> <pre><code>FROM node:10 RUN mkdir -p /usr/src/app WORKDIR /usr/src/app COPY package.json /usr/src/app RUN npm cache clean RUN npm install COPY . /usr/src/app EXPOSE 3000 CMD ["npm","start"] </code></pre> <p>I have put docke...
Vikas Banage
<blockquote> <p>But when I'm trying with above IP and Port it's giving message : "This site can’t be reached"</p> </blockquote> <p>Correct, those <code>ClusterIP</code>s are "virtual," in that they exist only inside the cluster. The address you will want to use is <em>any</em> of the <code>Node</code>'s IP addresses...
mdaniel
<p>I'm kinda new to the kubernetes technology, sorry if I'm asking something really dumb. I've been trying to install orangehrm with helm, with no major problems actually and the http works fine but when I try to acces through the https url, it shows me the error of bad request.</p> <p>It's been installed with a modif...
agustinlare
<p>As best I can tell, you are terminating TLS at the Ingress controller, which is then proxying upstream as HTTP but <em>on port 443</em>; so you'll want to update your Ingress to say <code>servicePort: 80</code> not <code>:443</code></p> <p>If you really want to connect TLS all the way through to the Pod, you'll nee...
mdaniel
<p>I understand that we can expose the serive as loadbalancer. </p> <pre><code>kubectl expose deployment hello-world --type=LoadBalancer --name=my-service </code></pre> <pre><code>kubectl get services my-service NAME TYPE CLUSTER-IP EXTERNAL-IP PORT(S) AGE my-service LoadBalancer 1...
Sunil Gajula
<p>tl;dr = yes, but trying to edit the IP in that <code>Service</code> resource won't do what you expect -- it's just reporting the current state of the world to you</p> <blockquote> <p>Is it possible to replace the LoadBalancer Ingress with static IP? </p> </blockquote> <p>First, the LoadBalancer is whatever your ...
mdaniel
<p>I have a stateful set for MQ, exposed two ports 1414 for TCP and 9443 for HTTPS and created service of type Loadbalancer. 1414 for TCP is working fine, able to telnet from other PODs in the same cluster using service name/cluster IP..also able to connect 1414 from outside GKE cluster. </p> <p>But the problem is ...
Binix John
<blockquote> <p>The telnet is working fine when exec to the POD and test locally.. telnet 127.0.01 9443 ... Port forward is working fine and able to connect to the API. kubectl port-forward svc/mq-qmdtest 9443:9443</p> </blockquote> <p>Is almost certainly caused by the pod only listening on localhost; <code>por...
mdaniel
<p>I follow <a href="https://medium.freecodecamp.org/learn-kubernetes-in-under-3-hours-a-detailed-guide-to-orchestrating-containers-114ff420e882" rel="nofollow noreferrer">this</a> tutorial about Kubernetes.</p> <p>I got to the part, which guide me to run:</p> <pre><code>minikube service sa-frontend-lb </code></pre> ...
Yagel
<p>As one can see, it <em>is</em> attempting to launch a browser, but there are none installed that it recognizes, except for what I would <em>guess</em> is Chrome <em>(since one can see that "chromium" did not work out)</em>, and as the message indicates, it doesn't tolerate running as <code>root</code>.</p> <p>In th...
mdaniel
<p>I have created an HTTP server from the directory using this command:</p> <pre><code>python -c 'import BaseHTTPServer as bhs, SimpleHTTPServer as shs; bhs.HTTPServer(("0.0.0.0", 8089), shs.SimpleHTTPRequestHandler).serve_forever()' </code></pre> <p>I use Spark-K8s operator for the Spark application execution. As ma...
Cassie
<blockquote> <p>Basically, I have HTTP server which refers to specified host and port and I want to run this jar file using Spark on top of K8s. How can I define this host?</p> </blockquote> <p>The kubernetes way of doing that is via a <code>Service</code>, which by default creates a DNS entry of the form <code>serv...
mdaniel
<p>I am writing an automated test that will run everytime a cluster is created. As part of this test, I need to read the content of a file inside a pod and verify a specific string exists or not. How can I achieve this?</p> <p>Currently we are using Gem Train Kubernetes. It is capable of verifying that the pod exists ...
Faraz
<p>Using the mechanisms provided by <code>kubectl</code> are going to be the least amount of drama, but I have no idea what Gem Train Kubernetes is in order to speak to that specifically</p> <p>You can grep for the content in the Pod, if it has a shell and grep available:</p> <pre><code>kubectl exec $the_pod_name -- ...
mdaniel
<p>I setup a docker registry using the <a href="https://github.com/helm/charts/tree/master/stable/docker-registry" rel="nofollow noreferrer">official helm chart</a> on my k8s cluster. I tried configuring notifications for my registry as per <a href="https://docs.docker.com/registry/notifications/#configuration" rel="no...
Badri
<p>You missed the yaml character <code>[</code> in their docs (which I freely admit is a terrible example, given that <code>[</code> is often used in documentation as "placeholder goes here"), since in yaml it is the character that turns an item into a list -- just like in JSON, from which YAML draws its inspiration</p...
mdaniel
<p>I have installed kube v1.11, since heapster is depreciated I am using matrics-server. Kubectl top node command works.</p> <p>Kubernetes dashboard looking for heapster service. What is the steps to configure dashboard to use materics server services</p> <pre><code>2018/08/09 21:13:43 Metric client health check fail...
sfgroups
<p>This must be the week for asking that question; it seems that whatever is deploying heapster is omitting the <code>Service</code>, which one can fix <a href="https://stackoverflow.com/questions/51641057/how-to-get-the-resource-usage-of-a-pod-in-kubernetes/51645461#comment90363934_51645461">as described here</a> -- o...
mdaniel
<p>Hello I'm trying to create a containerized file-system management tool.</p> <p>Is there a way I can list files on my host nodes file-system from within my pod/container?</p>
A. Campagna
<p>Yes, if you have a <code>volumeMount</code> pointing to the <code>hostPath:</code> volume, although I can't say with high certainty it will do the right thing with regard to other bind mounts on the host:</p> <pre><code>spec: containers: - name: looker volumeMounts: - name: host mountPath: /host-f...
mdaniel
<p>When performing a new Rollout via the Rolling Upgrade strategy, I have found out that the main bottleneck in terms of duration is the creation of new nodes (by the Cluster Autoscaler) needed to accommodate for the simultaneous presence of old and new pods.</p> <p>Although tweaking a bit <code>.spec.strategy.rolling...
pkaramol
<p>If the cluster autoscaler is just acting on "simple" resource requests, such as CPU and memory, you could launch a couple of "warm-up" Pods at the beginning of your CI process, which will give the autoscaler a "head's up" that a new deployment is coming very soon.</p> <p>Something like <code>kubectl run expensive-s...
mdaniel
<p>We have a setup, where Metricbeat is deployed as a DaemonSet on a Kubernetes cluster (specifically -- AWS EKS).</p> <p>All seems to be functioning properly, but the <strong>kubelet</strong> connection.</p> <p>To clarify, the following module:</p> <pre><code>- module: kubernetes enabled: true metricsets: -...
ZenMaster
<p>Inject the Pod's Node's IP via the <code>valueFrom</code> provider in the <code>env:</code> list:</p> <pre><code>env: - name: HOST_IP valueFrom: fieldRef: status.hostIP </code></pre> <p>and then update the metricbeat config file to use the host's IP:</p> <pre><code>hosts: ["${HOST_IP}:10255"] </code></pre> ...
mdaniel
<p>I have setup Kubernetes 1.15.3 cluster on Centos 7 OS using systemd cgroupfs. on all my nodes syslog started logging this message frequently.</p> <p>How to fix this error message?</p> <p><code>kubelet: W0907 watcher.go:87 Error while processing event (&quot;/sys/fs/cgroup/memory/libcontainer_10010_systemd_test_defau...
sfgroups
<p>It's a <a href="https://github.com/kubernetes/kubernetes/issues/76531" rel="nofollow noreferrer">known issue</a> with a bad interaction with <code>runc</code>; someone observed it is actually <em>caused</em> by <a href="https://github.com/kubernetes/kubernetes/issues/76531#issuecomment-522286281" rel="nofollow noref...
mdaniel
<p>I have a playbook with kubectl command, when I want to run this command it cannot avoid quotes and understand this directory not exist</p> <pre><code>--- - hosts: localhost vars_files: - vars/main.yaml tasks: - shell: cmd: | kubect...
Bora Özkan
<p>You quoted the wrong characters; you want the <strong>interior</strong> quotes to be escaped, or sidestep that entire mess and use alternate characters for the outer from the inner:</p> <pre class="lang-yaml prettyprint-override"><code>- shell: | kubectl exec -i -n {{ namespace }} {{ pod_name }} -- bash -c 'cli...
mdaniel
<p>I deployed a kubernetes loadbalancer on google cloud.</p> <pre><code>$kubectl expose deployments nginx --port 80 --type LoadBalancer $kubectl get services NAME TYPE CLUSTER-IP EXTERNAL-IP PORT(S) AGE kubernetes ClusterIP 10.31.240.1 &lt;none&gt; 443/TCP 9m ngin...
drdot
<blockquote> <p>Notice the nginx port has 80 and 30787. What does these two ports mean?</p> </blockquote> <p>A <code>kubectl describe service nginx</code> would likely be more explanatory, but the tl;dr is that 80 is the port from inside the cluster, and 30787 is the <a href="https://kubernetes.io/docs/concepts/serv...
mdaniel
<p>I'm trying to deploy postgres/postgis on GKE, but I continue to get the permission error: <code>initdb: could not change permissions of directory "/var/lib/postgresql/data": Operation not permitted</code>. I've tried various fixes that I've researched but I've yet to get passed this error. Below is my deployment yam...
Mike
<p>While it is not exactly the same question, this "use an <code>initContainer:</code> to <code>chmod</code>" answer will interest you: <a href="https://stackoverflow.com/questions/51200115/chown-changing-ownership-of-data-db-operation-not-permitted/51203031#51203031">chown: changing ownership of &#39;/data/db&#39;: Op...
mdaniel
<p>In Kubernetes, I am having a directory permission problem. I am testing with a pod to create a bare-bones elasticsearch instance, built off of an ElasticSearch provided docker image. </p> <p>If I use a basic .yaml file to define the container, everything starts up. The problem happens when I attempt to replace a...
Scott S
<p>Your question is a tiny bit confusing about what is happening versus what you want to be happening, but in general that problem is a common one; that's why many setups use an <code>initContainer:</code> to change the ownership of freshly provisioned PersistentVolumes (<a href="https://github.com/bitnami/charts/blob/...
mdaniel
<p>Having trouble figuring out what is wrong. I have a remote kubernetes cluster up and have copied the config locally. I know it is correct because I have gotten other commands to work for me.</p> <p>The one I can't get to work is a deployment patch. My code:</p> <pre class="lang-golang prettyprint-override"><code>con...
L. Norman
<p>You have mixed up <a href="https://godoc.org/k8s.io/apimachinery/pkg/types#PatchType" rel="nofollow noreferrer"><code>JSONPatchType with MergePatchType</code></a>; <code>JSONPatchType</code> wants the input to be <a href="https://www.rfc-editor.org/rfc/rfc6902#section-4.3" rel="nofollow noreferrer">RFC 6902</a> form...
mdaniel
<p>I am using helm3 to deploy a PHP based application in kubernetes. I am using ingress controller with below version. I am getting below mentioned error. Even though there are secrets in desired namespace it is giving this error. When I do the deployment using "kubectl apply -f yaml", it works perfectly fine. Nginx co...
user3847894
<pre><code>nginx.ingress.kubernetes.io/backend-protocol: | "HTTPS" </code></pre> <p>Does not specify <code>HTTPS</code> as the <code>backend-protocol</code>, it specifies <code>"HTTPS"\n</code> as the <code>backned-protocol</code></p> <pre><code>nginx.ingress.kubernetes.io/backend-protocol: HTTPS </code></pre> <p>...
mdaniel
<p>I am getting started with Airflow and trying to use the KubernetesPodOperator, but I am having trouble with downloading images from private registries. I did some research but I couldn't find an answer to my problem.</p> <p>Putting it simply: can I use private images from DockerHub with the KubernetesPodOperator?</...
hscasn
<p>It looks like <a href="https://github.com/apache/incubator-airflow/blob/1.10.0rc4/airflow/contrib/kubernetes/pod_generator.py#L28" rel="nofollow noreferrer">pod_generator.PodGenerator</a> accepts some kind of object <code>kube_config</code> that <a href="https://github.com/apache/incubator-airflow/blob/1.10.0rc4/air...
mdaniel
<p>I have a kubernetes namespace that I want to leverage for Gitlab runners. I installed the runners following the <a href="https://docs.gitlab.com/ee/install/kubernetes/gitlab_runner_chart.html" rel="nofollow noreferrer">Helm Chart</a> instructions. The problem I am running into is that when the job container spins up...
mrspanishviking
<p>I would presume you'll need to specify a <code>values.yaml</code> to the <code>helm install</code> that points to your mirrored copy of the images it needs. So:</p> <ul> <li><a href="https://gitlab.com/charts/gitlab-runner/blob/1e329394f69b80003a43c503e7d11eb6463d008a/values.yaml#L4" rel="nofollow noreferrer">gitla...
mdaniel
<p>I have microK8S cluster, and expose the API server at my domain. The <code>server.crt</code> and <code>server.key</code> in <code>/var/snap/microk8s/1079/certs</code> need to be replaced with the ones that include my domain. Otherwise, as expected, i get the error: </p> <p><code>Unable to connect to the server: x5...
Vladimir Akopyan
<p>It looks like there is <a href="https://github.com/ubuntu/microk8s/issues/421#issuecomment-482105218" rel="nofollow noreferrer">an existing issue</a> that describes copying and modifying the <code>/var/snap/microk8s/current/certs/csr.conf.template</code> to include any extra IP or DNS entries for the generated certi...
mdaniel
<p>I've got a <strong>persistent volume</strong> currently bound to a <strong>deployment</strong>, I've set the <strong>replica count to 0</strong> which I was hoping would unbound the volume - so I could mount it on another pod but it remains in a <code>Bound</code> status.</p> <p>How can I copy the data from this? ...
Chris Stryczynski
<blockquote> <p>I've got a persistent volume currently bound to a deployment, I've set the replica count to 0 which I was hoping would unbound the volume - so I could mount it on another pod but it remains in a Bound status.</p> </blockquote> <p>"Bound" does not mean it is attached to a Node, nor to a Pod (which is ...
mdaniel
<p>While I've been learning about Kubernetes and Terraform I've been building a Node.js microservices example.</p> <p>It's all been going well so far and with a few commands I can provision a Kubernetes cluster and deploy a couple of Node.js microservices to it.</p> <p>The full example is available on GitHub: <a href...
Ashley Davis
<p>It's the following line that is incorrect:</p> <pre><code> name = "nodejs-micro-example-web" </code></pre> <p>because a Pod's name is unique within its namespace.</p> <p>You almost <strong>never</strong> want to deploy a standalone Pod, because kubernetes considers those as ephemeral. That's ordinarily not a p...
mdaniel
<p>Does Kubernetes have any strategy of picking which older version pods to be deleted during rolling update? I didn't find any existing documents describing this.</p>
zero_yu
<p>Pods are supposed to be ephemeral and disposable, and thus if you <em>do</em> care about their ordering, you'd want to use a <a href="https://kubernetes.io/docs/reference/generated/kubernetes-api/v1.17/#statefulsetspec-v1-apps" rel="nofollow noreferrer"><code>StatefulSet</code> with <code>podManagementPolicy:</code>...
mdaniel
<p>if I run <code>jx create cluster aws</code> -> it creates the cluster on aws without any issues but if I won't to specify some options like this:</p> <pre><code>jx create cluster aws --zones us-east-2b --nodes=2 --node-size=t2.micro --master-size=t2.micro </code></pre> <p>Then it fails constantly, whatever I tri...
Alexz
<p>I asked about this in a comment, but the actual <em>answer</em> appears to be that you are on a version of <code>jx</code> that doesn't match the documentation. Because this is my experience with a freshly downloaded binary:</p> <pre><code>$ ./jx create cluster aws --verbose=true --zones=us-west-2a,us-west-2b,us-we...
mdaniel
<p>I have a k8s service/deployment in a minikube cluster (name <code>amq</code> in <code>default</code> namespace:</p> <pre><code>D20181472:argo-k8s gms$ kubectl get svc --all-namespaces NAMESPACE NAME TYPE CLUSTER-IP EXTERNAL-IP PORT(S) AGE argo argo-ui ClusterIP ...
horcle_buzz
<blockquote> <p>I admittedly am not very knowledgable about the deep workings of DNS, so I am not sure why I can do a lookup and dig for the hostname, but not ping it.</p> </blockquote> <p>Because <code>Service</code> IP addresses are figments of your cluster's imagination, caused by either iptables or ipvs, and don...
mdaniel
<p>Silly question. Just setup a 4 node kubernetes cluster (one master node). The etcd pod is running in the kube-system. But I can not find the etcdctl in regular path. </p> <pre><code># find / -name etcdctl -print /var/lib/docker/overlay2/9c0f2f2ef864f3be6f4195cbcda59b712805fc1957204b97d36a9239e3adb1cf/diff/usr/l...
TJS
<p>If you are new to <code>docker</code>, what you have found is the volume mount for the etcd container, and inside that container is the <code>etcdctl</code> binary that is designed for use with the <code>etcd</code> binary inside the container.</p> <p>You will want to <code>docker exec</code> into the container so ...
mdaniel
<p>I'm trying to deploy GitLab on Kubernetes using minikube through <a href="https://docs.gitlab.com/ce/install/kubernetes/gitlab_chart.html#deployment-of-gitlab-to-kubernetes" rel="nofollow noreferrer">this</a> tutorial, but I don't know what values to put in the fields <code>global.hosts.domain</code>, <code>global.h...
Michael Pacheco
<blockquote> <p>I'm trying to deploy GitLab on Kubernetes using minikube through this tutorial, but I don't know what values to put in the fields <code>global.hosts.domain</code>, <code>global.hosts.externalIP</code> and <code>certmanager-issuer.email</code>.</p> </blockquote> <p>For the domain, you can likely use w...
mdaniel
<p>HI I know there's a way i can pull out a problematic node out of loadbalancer to troubleshoot. But how can i pull a pod out of service to troubleshoot. What tools or command can do it ?</p>
Gabriel Wu
<p>Change its labels so they no longer matches the <code>selector:</code> in the <code>Service</code>; we used to do that all the time. You can even put it back into rotation if you want to test a hypothesis. I don't recall exactly how quickly it takes effect, but I would guess "real quick" is a good approximation. :-)...
mdaniel
<p>I'm creating a pod through the <code>KubernetesPodOperator</code> in Airflow. This pod should mount a Google Cloud Storage to <code>/mnt/bucket</code> using <code>gcsfuse</code>. For this, the pod is required to be started with the <code>securityContext</code> parameter, such that it can become 'privileged'.</p> <p...
bartcode
<p>A mutating admission controller would allow you to do that: <a href="https://kubernetes.io/docs/reference/access-authn-authz/admission-controllers/#mutatingadmissionwebhook" rel="nofollow noreferrer">https://kubernetes.io/docs/reference/access-authn-authz/admission-controllers/#mutatingadmissionwebhook</a></p> <p>T...
mdaniel
<p>Please help me. I'm following this guide: <a href="https://pleasereleaseme.net/deploy-a-dockerized-asp-net-core-application-to-kubernetes-on-azure-using-a-vsts-ci-cd-pipeline-part-1/" rel="nofollow noreferrer">https://pleasereleaseme.net/deploy-a-dockerized-asp-net-core-application-to-kubernetes-on-azure-using-a-vst...
jravenger4
<p>The reason they are in Pending state is described in the message at the bottom of the <code>describe pod</code> output: <code>MatchNodeSelector</code>. That means Kubernetes didn't find a Node in your cluster that was able to fulfill the Node selection criteria specified in the PodSpec.</p> <p>Specifically, it's ve...
mdaniel
<p>I want to pass a certificate to the helm chart and currently I am passing using --set-file global.dbValues.dbcacertificate=./server.crt but instead i want to pass the file in values file of helm chart. The Values.yaml file reads</p> <pre><code>global: dbValues: dbcacertificate: &lt;Some Way to pass the .crt f...
Darshil Shah
<p>According to <a href="https://helm.sh/docs/chart_template_guide/accessing_files/#lines" rel="noreferrer">the relevant documentation</a>, one must pre-process a file that is external to the chart into a means that can be provided via <code>--set</code> or <code>--values</code>, since <code>.Files.Get</code> cannot re...
mdaniel
<p>I'm creating a pod through the <code>KubernetesPodOperator</code> in Airflow. This pod should mount a Google Cloud Storage to <code>/mnt/bucket</code> using <code>gcsfuse</code>. For this, the pod is required to be started with the <code>securityContext</code> parameter, such that it can become 'privileged'.</p> <p...
bartcode
<p>Separate from the Mutating Admission Controller, it's also possible to deploy a DaemonSet into your cluster that mounts <code>/mnt/bucket</code> onto the host filesystem, and the the Airflow pods would use <code>{"name": "bucket", "hostPath": {"path": "/mnt/bucket"}}</code> as their <code>volume:</code>, which -- as...
mdaniel
<p>I'm trying to replicate what we have set up in our bare-metal infrastructure using AWS. I'm admittedly not well-versed with K8S, but a colleague of mine had started to use it in AWS so I've been piggybacking on some of the work he's done. He's been able to answer most of my questions, but this one seems to have us a...
cue8chalk
<p>I believe you are getting bitten by <code>kubectl</code> trying to record the previous state of affairs in an <code>{"metadata":{"annotation":{"kubectl.kubernetes.io/last-applied-configuration": "GINORMOUS string"}}}</code> <a href="https://kubernetes.io/docs/tasks/manage-kubernetes-objects/declarative-config/#how-t...
mdaniel
<p>Is there a way to access the underlying host/node's process from Kubernetes pod in the same way like we access the host/node's filesystem by using <code>hostPath</code> volume mount?</p> <p>PS: I am trying to monitor the node process with the help of <code>auditbeat</code> deployed as a pod on Kubernetes.</p>
Rajat Badjatya
<p>I believe what you are looking for is <a href="https://kubernetes.io/docs/reference/generated/kubernetes-api/v1.17/#podspec-v1-core" rel="nofollow noreferrer"><code>hostPID: true</code> in the PodSpec</a>:</p> <pre class="lang-yaml prettyprint-override"><code>spec: hostPID: true containers: - name: show-init ...
mdaniel
<p>Can we use nginx ingress controller without loadbalancer? If so what are the measures that needs to be taken to setup the ingress controller?</p>
Shibily Shukoor
<blockquote> <p>Can we use nginx ingress controller without loadbalancer?</p> </blockquote> <p>Yes, of course</p> <blockquote> <p>If so what are the measures that needs to be taken to setup the ingress controller?</p> </blockquote> <p>To set it up? <code>helm</code> install it (or whatever mechanism you want), a...
mdaniel
<p>I'm trying to start a standard example SparkPi on a kubernetes cluster. Spark-submitt creates the pod and fails with error - "Error: Could not find or load main class org.apache.spark.examples.SparkPi".</p> <p>spark-submit</p> <pre><code>spark-submit \ --master k8s://https://k8s-cluster:6443 \ --deploy-mode cluste...
JDev
<p>I would suggest using <code>https://github.com/JWebDev/spark/raw/master/spark-examples_2.11-2.3.1.jar</code> since <code>/blob/</code> is the HTML view of an asset, whereas <code>/raw/</code> will 302-redirect to the actual storage URL for it</p>
mdaniel
<p>My goal is to create a Kubernetes role to limit kubectl exec access on pods under a specific deployment. I have a policy built below that successfully creates the role when the number &amp; names of my pods are all static. The problem is that my deployment horizontally autoscales so if a new pod is created then the ...
user3088470
<p>Foremost, why not remove <code>pod/exec</code> from all Pods in that <code>Role</code>, and then whitelist those which you <strong>do</strong> tolerate exec-ing into?</p> <p>That said, the thing you want is likely a custom controller which listens to Pod events in that Namespace and updates the RBAC <code>Role</cod...
mdaniel