prompt stringlengths 65 38.7k | response stringlengths 41 29.1k |
|---|---|
<p><code>kubectl</code> exposes commands that can be used to create a Service for an application and assigns an IP address to access it from internet.</p>
<p>As far as I understand, to access any application within Kubernetes cluster there should be a Service resource created and that should have an IP address which i... | <p>To start, it's useful to note and remember that in Kubernetes, <em>every</em> pod gets its own ip address from 10.*, that is usable only within the cluster. Now, the <code>port-forward</code> feature of kubectl simply tunnels the traffic from a specified port at your local host machine to the specified port on the s... |
<p>Having trouble getting a wordpress Kubertenes service to listen on my machine so that I can access it with my web browser. It just says "External IP" is pending. <strong>I'm using the Kubertenes configuration from Docker Edge v18.06 on Mac, with advanced Kube config enabled (not swarm).</strong></p>
<p>Following... | <p>For Docker for Mac, you should use your host's DNS name or IP address to access exposed services. The "external IP" field will never fill in here. (If you were in an environment like AWS or GCP where a LoadBalancer Kubernetes Service creates a cloud-hosted load balancer, the cloud provider integration would provid... |
<p>I deploy an <code>nginx ingress controller</code> to my cluster. This provisions a load balancer in my cloud provider (assume AWS or GCE). However, all traffic inside the cluster is routed by the controller based on my ingress rules and annotations.</p>
<p>What is then the purpose of having a load balancer in the c... | <p>You may have a High Availability (HA) Cluster with multiple masters, a Load Balancer is a easy and practical way to "enter" in your Kubernetes cluster, as your applications are supposed to be usable by your users (who are on a different net from your cluster).
So you need to have an entry point to your K8S cluster. ... |
<p>I have deployed a Kubernetes cluster to GCP. For this cluster, I added some deployments. Those deployments are using external resources that protected with security policy to reject connection from unallow IP address. </p>
<p>So, in order to pod to connect the external resource, I need manually allow the node (who ... | <p>Let's begin with the IPs that are assigned to Nodes:</p>
<ul>
<li>When we create a Kubernetes cluster, GCP in the backend creates compute engines machines with a specific internal and external IP address.</li>
<li>In your case, just go to the compute engine section of the Google Cloud Console and capture all the ex... |
<p>On kubernetes 1.5.2 all of sudden <strong>kubectl logs</strong> is showing error while other commands are working fine, so definitely there is no issue with cluster setup but possibly some sort of bug. Kindly advise if there is workaround to get the logs working.</p>
<pre><code>$ kubectl logs -f some-pod-name
</cod... | <p>In short, for me, the problem is caused by misconfigured proxy.</p>
<p>I came across this very same symptom last week. After poking around for some time This <a href="https://github.com/kubernetes/kubeadm/issues/211" rel="nofollow noreferrer">ISSUE</a> showed up. </p>
<p>For me, It's because I initialized the clus... |
<p>(Before I start, I'm using minikube v27 on Windows 10.)</p>
<p>I have created a deployment with the nginx 'hello world' container with a desired count of 2:</p>
<p><a href="https://i.stack.imgur.com/L46pe.png" rel="noreferrer"><img src="https://i.stack.imgur.com/L46pe.png" alt="pods before scaling up"></a></p>
<p... | <p>Pod deletion preference is based on a ordered series of checks, defined in code here:</p>
<p><a href="https://github.com/kubernetes/kubernetes/blob/release-1.11/pkg/controller/controller_utils.go#L737" rel="noreferrer">https://github.com/kubernetes/kubernetes/blob/release-1.11/pkg/controller/controller_utils.go#L73... |
<p>I have a config file named "pod.yaml" for making a pod like bellow:</p>
<p><code>
apiVersion: v1
kind: Pod
metadata:
name: myapp
labels:
app: myapp
spec:
containers:
- name: comet-app
image: gcr.io/my-project/my-app:v2
ports:
- containerPort: 5000
</code></p>
<p>and a co... | <p>The problem with <code>service.yaml</code> is that the selector is wrong. <a href="https://kubernetes.io/docs/concepts/services-networking/service/#defining-a-service" rel="nofollow noreferrer">How it works</a> is that a service by default routes traffic to pods with a certain label. Your pod has the label <code>app... |
<p>I am facing an error while deploying Airflow on Kubernetes (precisely this version of Airflow <a href="https://github.com/puckel/docker-airflow/blob/1.8.1/Dockerfile" rel="noreferrer">https://github.com/puckel/docker-airflow/blob/1.8.1/Dockerfile</a>) regarding writing permissions onto the filesystem.</p>
<p>The er... | <p>Since kubernetes version 1.9 and forth, volumeMounts behavior on secret, configMap, downwardAPI and projected have changed to Read-Only by default.</p>
<p>A workaround to the problem is to create an emtpyDir volume and copy the contents into it and execute/write whatever you need.</p>
<p>this is a small snippet to... |
<p>I have a K8s 1.7 cluster using <strong>vSphere</strong> as persistent storage provider. I have also deployed <strong>Prometheus</strong>, <strong>node_exporter</strong> and <strong>kube-state-metrics</strong>.<p>
I'm trying to find a way to monitor a persistent volume's usage using <strong>Prometheus</strong>. I hav... | <p>Starting from (v1.3.0-rc.0 / 2018-03-23) in the <strong>kube-state-metrics</strong>, two metrics that can convert <a href="https://github.com/kubernetes/kube-state-metrics/blob/641f44d26ccbad2272d5bf3e10e43efd41e7976d/pkg/collectors/persistentvolume.go#L128" rel="nofollow noreferrer">PersistentVolume</a> and <a href... |
<p>I am doing a test here and need to delivery a build, test and deploy pipeline using Jenkins and Kubernetes.</p>
<p>I am using a Mac and created a VM using VirtualBox with Ubuntu 18 and installed Jenkins there.</p>
<p>I installed Kubernetes (minukube) but when I try to start it I receive:</p>
<blockquote>
<p>"Th... | <p>I couldn't put a comment, cause I don't have enough permissions to do so.</p>
<p>This is not related to k8s, your issue most likely is with the virtualization in your PC, you may follow the error you got and try to enable to the VTx/AMD option in the boot.</p>
|
<p>I'm using a simple <code>ballerina</code> code to build my program (simple hello world) with <code>ballerinax/kubernetes</code> annotations. The service is being compiled succesfully and accessible via the specific bind port from local host.</p>
<p>When configuration a kubernetes deployment I'm specifying the image... | <p>Ballerina doesn't support gcloud docker registry yet, but it supports dockerhub.
Please refer <a href="https://github.com/ballerinax/kubernetes/tree/master/samples/sample6" rel="nofollow noreferrer">sample6</a> for more info. </p>
<p>Basically, you can export docker registry username and password as environment va... |
<p>I need to install a IPV6 haproxy docker in IBM Cloud Kubernetes service. All info I see is just about IPV4. I don't even know if IBM Kubernetes supports IPV6 so I can support IPV6 requests in my docker instance deployed in one of my cluster nodes.
Thanks for any help on this.</p>
| <p>IBM Cloud Kubernetes Service does not use IPV6 for cluster services.</p>
|
<p>I'm frequently installing multiple instances of an umbrella Helm chart across multiple namespaces for testing. I'd like to continue using the randomly generated names, but also be able to tear down multiple releases of the same chart in one command that doesn't need to change for each new release name.</p>
<p>So f... | <p>You could try:</p>
<p><code>helm delete $(helm ls | awk '$9 ~ /SEARCH/ { print $1 }')</code></p>
<p>Replacing <code>SEARCH</code> with whatever chart name pattern you want to use</p>
<p>It gets thrown off a little because awk is going to delimit on the spaces, which the timestamp has several of.</p>
<p>So what w... |
<p>I have a service and 4 pods which wordpress installed on each. This is my service configuration:</p>
<pre><code>apiVersion: v1
kind: Service
metadata:
name: my-service
spec:
ports:
- port: 31001
nodePort: 31001
targetPort: apache
protocol: TCP
selector:
app: wordpress
type: NodePort
</code... | <p>As @Meysam mentioned, Kubernetes service distributes the request to pods using "round robin" technology by default.</p>
<p>I would advise you (and all who will read this topic in the future) to read more information about <a href="https://kubernetes.io/docs/concepts/services-networking/service/" rel="nofol... |
<p>I'm looking for the best possible Kubernetes configuration to be able to run this command in a <strong>local Kubernetes environment</strong> (via Minikube)</p>
<pre><code>composer install
</code></pre>
<p>What I was hoping to do is something like the docker version:
This will spin up a container, run the composer ... | <p>You should build a custom Docker image containing your application’s code. The <code>composer install</code> command should be in your <code>Dockerfile</code>. When you build a new version of your application that you want to deploy, you (or, better, your CI system) need to <code>docker build</code> a new image, <... |
<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... | <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>
|
<p>I'm using Azure for my Continuous Deployment, My secret name is "<strong>cisecret</strong>" using</p>
<pre><code>kubectl create secret docker-registry cisecret --docker-username=XXXXX --docker-password=XXXXXXX --docker-email=SomeOne@outlook.com --docker-server=XXXXXXXXXX.azurecr.io
</code></pre>
<p>In my Visual St... | <p>I need to grant AKS access to ACR.</p>
<p>Please refer to the link <a href="https://github.com/MicrosoftDocs/azure-docs/blob/master/articles/container-registry/container-registry-auth-aks.md" rel="nofollow noreferrer">here</a></p>
|
<p>What is the recommended architecture for scheduled jobs in Kuberntes cluster?</p>
<p>Consider following situation:
You have some kind of job which you wish to run every ~ 24 hours and it takes around 2 hours to complete. Let it be for example a parser scraping info from some websites.</p>
<p>You want it to run in ... | <p>One way you can approach this is by creating a <a href="https://kubernetes.io/docs/concepts/workloads/controllers/cron-jobs/" rel="nofollow noreferrer">CronJob</a> object in Kubernetes:</p>
<pre><code>apiVersion: batch/v1beta1
kind: CronJob
metadata:
name: hello
spec:
schedule: "0 */24 * * *"
jobTemplate:
... |
<p>I have a kubernetes cluster spread across two zones, A and B. I am using nfs volumes for persistent storage. I have nfs volumes in both the zones. I am creating a stateful set of 2 replicas which will be spread across these zones (I used pod anti-affinity to achieve this). Now I want the pods in zone A to use the vo... | <p>You can try to bind <code>persistent volume claims (PVCs)</code> to <code>persistent volumes (PVs)</code> and split Kubernetes pods across your cluster between two zones using the special built-in label <code>failure-domain.beta.kubernetes.io/zone</code>. If you create volumes manually, it is possible to label them ... |
<p>In our GKE we have one service called <code>php-services</code>. It is defined like so:</p>
<pre><code>apiVersion: v1
kind: Service
metadata:
name: php-services
labels:
name: php-services
spec:
type: NodePort
ports:
- port: 80
selector:
name: php-services
</code></pre>
<p>I can access this serv... | <h2>EDIT TLDR</h2>
<p>GKE Loadbalancer <a href="https://cloud.google.com/load-balancing/docs/health-check-concepts" rel="noreferrer">only accepts HTTP status 200</a> while Kubernetes health checks accept <a href="https://kubernetes.io/docs/tasks/configure-pod-container/configure-liveness-readiness-probes/" rel="norefe... |
<p>I have pods who deployed to Kubernetes cluster (hosted with Google Cloud Kubernetes). Those pods are using some <code>secret</code>, which are plain text files. I added the secret to the <code>yaml</code> file and deployed the deployment. The application is working fine.</p>
<p>Now, let say that someone compromised... | <p>There are different levels of security and as @Vishal Biyani says in the comments, it sounds like you're looking for a level of security you'd get from a project like Sealed Secrets. </p>
<p>As you say, out of the box secrets doesn't give you encryption at the container level. But it does give controls on access th... |
<p>I'm implementing a custom resource controller using the watch API. It needs to create/delete objects in aws when objects are created/deleted in kubernetes.</p>
<p>When it starts up the watch, it receives a list of historic events. However, I noticed that if an object is created and then deleted, these events "cance... | <p>In case you need to synchronize states or list of existing objects in one system with objects in another system, you should be able to get the lists of objects on both systems, compare them, and deal with the difference. </p>
<p>If you rely only on watching instant events like CREATE and DELETE, you will end up wit... |
<p>I have kubernetes cluster working fine. I have one <code>master</code> node and 5 <code>worker</code> nodes, and all these are running pods. When all the nodes are on and if the kubernetes master goes down/ powered off, will the worker nodes keep working as normally.?</p>
<p>If <code>master</code> node is down and ... | <blockquote>
<p>When all the nodes are on and if the kubernetes master goes down/ powered off, will the worker nodes keep working as normally.?</p>
</blockquote>
<p>Yes, they will work in their last state.</p>
<blockquote>
<p>If <code>master</code> node is down and one of the <code>worker</code> node also goes do... |
<p>First of all, i'm not an expert, so bear with me. I managed to install and setup Rancher in my vcenter at home (got a baremetal setup for free, a bit old, but still ok). I have 3 nodes running well and i can also provision VMs in vmware with it. On top of it, i also added Kubernetes within Rancher. Now, my plan is t... | <p>The reason you might be struggling is because when using BareMetal, you don't have an external LoadBalancer provisioned. When using things like Traefik, you need to expose the ingress controller on a NodePort or something else.</p>
<p>If you're using baremetal, you have a couple of options for ingress into the clus... |
<p>Battling with Kubernetes manifest on Azure. I have a simple api app running on port <code>443 (https)</code>. I simply want to run and replicate this app 3 times within a kubernetes cluster with a load balancer.</p>
<p><strong>Kubernetes cluster:</strong></p>
<p><a href="https://i.stack.imgur.com/iEcVT.png" rel="... | <p>For your issue, I did the test with the load balancer follow the document <a href="https://learn.microsoft.com/en-us/azure/aks/kubernetes-walkthrough" rel="nofollow noreferrer">Deploy an Azure Kubernetes Service (AKS) cluster</a>.</p>
<p>This example only has one pod, so I scale up the pod in to 3 with the command ... |
<p>I've recently started using kubernetes and am now looking at how I can configure centralised logging. For the majority of the pods, the application itself logs straight to the GELF endpoint (logstash), however there are a number of "management" pods which I need to get the logs from too. </p>
<p>Previously when I w... | <p>Try to use <strong>fluentd</strong> with the <a href="https://github.com/fabric8io/fluent-plugin-kubernetes_metadata_filter" rel="nofollow noreferrer">Kubernetes metadata plugin</a> to extract local json-file docker logs and send to Graylog2.</p>
<p><code>tag_to_kubernetes_name_regexp</code> - the regular expressio... |
<p>I'm currently building a containerized Kubernetes Cluster.</p>
<p>When trying to get start the kubelet binary I get this fail </p>
<pre><code>server.go:233] failed to run Kubelet: could not detect clock speed from output: ""
</code></pre>
<p>I start the kubelet with</p>
<pre class="lang-js prettyprint-override">... | <p>The solution was adding a volume to link to the cgroup, so cadvisor had the required rights to read the required file.</p>
<pre><code>-v /cgroup:/sys/fs/cgroup:ro
</code></pre>
|
<p>I need to run two "instances" of an application, but they should access the same DB, and I need it to be run on my Kubernetes cluster, so I can provide multi-AZ access to users.</p>
<p>Is it possible to be achieved on Kubernetes? Do I need StatefulSets? And, more important, is it possible to manage the DB pod with ... | <blockquote>
<p>I need to run two "instances" of an application, but they should access the same DB, and I need it to be run on my Kubernetes cluster, so I can provide multi-AZ access to users.</p>
</blockquote>
<p>This really depends on what you mean by <em>instances</em>. The recommended way is to create a deploym... |
<p>I'm trying to connect one pod to another, but getting a connection refused error.</p>
<p>I only run:</p>
<ol>
<li><p>RavenDB Server</p>
<ul>
<li>Deployment which has:
<ul>
<li>ports:
<ul>
<li>containerPort:8080, protocol: TCP</li>
<li>containerPort:38888, protocol: TCP</li>
</ul></li>
</ul></li>
<li>Service:
... | <p>The issue appears to be your <code>PublicServerUrl</code> setting.</p>
<pre><code>--PublicServerUrl=http://localhost:8080 --PublicServerUrl.Tcp=tcp://localhost:38888
</code></pre>
<p>As per the RavenDB documentation:</p>
<blockquote>
<p>Set the URL to be accessible by clients and other nodes, regardless of whic... |
<p>I am working on Problem statement around Making Windows VM work on Kubernetes , I came across a VM orchestrator on kubernetes <a href="https://kubevirt.io" rel="nofollow noreferrer">https://kubevirt.io</a> . There documentation does not clearly say if it supports Windows ? Any other solution or advise on the same is... | <p>Yes, you can create VMs using different operating systems, including Windows.</p>
<h3>Reference:</h3>
<p><a href="http://superuser.openstack.org/articles/kubevirt-kata-containers-vm-use-case/" rel="nofollow noreferrer">http://superuser.openstack.org/articles/kubevirt-kata-containers-vm-use-case/</a></p>
|
<p>I tried to launch Istio on Google Kubernetes Engine using the Google Cloud Deployment Manager as described in the Istio <a href="https://istio.io/docs/setup/kubernetes/quick-start-gke-dm/" rel="nofollow noreferrer">Quick Start Guide</a>.
My goal is to have a cluster as small as possible for a few very lightweight mi... | <p>As per <a href="https://istio.io/docs/guides/bookinfo/" rel="nofollow noreferrer">this page</a></p>
<blockquote>
<p>If you use GKE, please ensure your cluster has at least 4 standard GKE nodes. If you use Minikube, please ensure you have at least 4GB RAM.</p>
</blockquote>
|
<p>I remember DNS records being cached locally on various linux distros in the past, but this appears to have changed over the years (<a href="https://stackoverflow.com/questions/11020027/dns-caching-in-linux">DNS caching in linux</a>). </p>
<p>Within our environment (non-K8S) we found a noticeable delay (1-2ms) for e... | <p>Since <code>Kubernetes 1.9+</code> was announced, <a href="https://coredns.io/" rel="nofollow noreferrer">CoreDNS</a> had been included in <code>kubeadm</code>, <code>minikube</code> tools, etc. as a default DNS server and replaced former <code>kube-dns</code> (which was based on <code>dnsmasq</code>). </p>
<p>It w... |
<p>I'm trying to create an horizontal pod autoscaling after installing Kubernetes with kubeadm.</p>
<p>The main symptom is that <code>kubectl get hpa</code> returns the CPU metric in the column <code>TARGETS</code> as "undefined":</p>
<pre><code>$ kubectl get hpa
NAME REFERENCE TARGETS M... | <p>there is an option to enable autscaling on cluster pool make sure to turn it on first.</p>
<p>and then apply your hpa, and don't forgot to set cpu, memory requests,limits on k8s controllers</p>
<p>one thing to note is if you have multiple containers on your pod, you should then to specify cpu, memory requests,limi... |
<p>I'm doing the kubernetes tutorial locally with minikube on osx. In <a href="https://kubernetes.io/docs/tutorials/kubernetes-basics/deploy-app/deploy-interactive/" rel="nofollow noreferrer">https://kubernetes.io/docs/tutorials/kubernetes-basics/deploy-app/deploy-interactive/</a> step 3, I get the error</p>
<pre><cod... | <p><a href="https://github.com/kubernetes/minikube" rel="nofollow noreferrer">Minikube</a> is a tool that makes it easy to run <a href="https://kubernetes.io" rel="nofollow noreferrer">Kubernetes</a> locally. </p>
<p>Minikube runs a single-node Kubernetes
cluster inside a VM on your laptop for users looking to try ou... |
<p>I've a running kubernetes(v1.11.1) cluster consisting of three nodes. I need to remove a node from the cluster properly. What should be the proper way to do that?
I've used kubeadm to create the cluster.</p>
| <p>Always drain the node before removing it:</p>
<pre><code>kubectl drain $NODE
</code></pre>
<p>Draining evicts every pod in the node and cordons it, so no new pods will be scheduled in it.</p>
<p>You can use these parameters to 'force' draining, overriding some restrictions:</p>
<pre><code>kubectl drain $NODE --f... |
<p>Can somebody explain why the following command shows that there have been no restarts but the age is 2 hours when it was started 17 days ago</p>
<pre><code>kubectl get pod -o wide
NAME READY STATUS RESTARTS AGE IP NODE
api-depl-nm-xxx 1/1 Running 0 ... | <p>There are two things that might happen:</p>
<ol>
<li><p>The deployment was updated or scaled:</p>
<ul>
<li>age of deployment does not change</li>
<li><p>new ReplicaSet is created, old ReplicaSet is deleted. You can check it by running </p>
<pre><code>$ kubectl describe deployment <deployment_name>
...
Eve... |
<p>I have a volume with a secret called config-volume. I want to have that file in the /home/code/config folder, which is where the rest of the configuration files are. For that, I mount it as this:</p>
<pre><code>volumeMounts:
- name: config-volumes
- mountPath: /home/code/config
</code></pre>
<p>The issue is th... | <p>You can do the following, taken from <a href="https://github.com/kubernetes/kubernetes/issues/44815#issuecomment-297077509" rel="noreferrer">this GitHub issue</a> </p>
<pre><code>containers:
- volumeMounts:
- name: config-volumes
mountPath: /home/code/config
subPath: config
volumes:
- name: config-volumes... |
<p>We need to enable some sysctl parameters in kubernetes. This should be achievable with the below annotation in the Deployment. </p>
<pre><code>annotations:
security.alpha.kubernetes.io/unsafe-sysctls: net.ipv4.ip_local_port_range="10240 65535"
</code></pre>
<p>When doing so the container fails to start with the ... | <p>A fix for this was merged back in May, you can see the PR here: <a href="https://github.com/kubernetes/kops/pull/5104/files" rel="nofollow noreferrer">https://github.com/kubernetes/kops/pull/5104/files</a></p>
<p>You'd enable it with:</p>
<pre><code>spec:
kubelet:
ExperimentalAllowedUnsafeSysctls:
- 'n... |
<p><strong>Problem</strong></p>
<hr>
<p>I am trying to make a client in Java using <code>gRPC</code>. I have been given access to a <code>kubernetes</code> namespace to test out the client. However, all I have is the certificate authority for the cluster and a bearer token.</p>
<pre><code>apiVersion: v1
clusters:
- ... | <p>Figured it out.</p>
<p>My company had a client certificate (<code>client.crt</code>) lying around that I was supposed to use instead of the <code>CA</code>. When I used that certificate instead with the proper override authority, the error went away.</p>
|
<p>I can get the ReplicaSet if given the <code>replica-set-name</code> using the api as below:</p>
<pre><code>GET /apis/apps/v1/namespaces/{namespace}/replicasets/{name}
</code></pre>
<p>But how can I get the ReplicaSet based on the deployment?</p>
<p>Any help is appreciated.</p>
<p>Thank you</p>
| <blockquote>
<p>But how can I get the ReplicaSet based on the deployment?</p>
</blockquote>
<p>With quite some gymnastics... If you inspect how <code>kubectl</code> does it (by executing <code>kubectl -n my-namespace describe deploy my-deployment --v=9</code>) you will see that it dos the following:</p>
<ul>
<li>fi... |
<p>I'm working on writing custom controller for our kubernetes cluster and that'll listen to node events and perform some operation on the node.I'm using kubernetes client-go library and able to capture kubernetes events whenever a node is attached or removed from the cluster. But is it possible to get AWS instance det... | <p>On a Kubernetes node in AWS, you'll have some things populated as part of the node labels and various other parts of the node's metadata:</p>
<pre><code>kubectl get nodes -o json | jq '.items[].metadata.labels'
{
"beta.kubernetes.io/arch": "amd64",
"beta.kubernetes.io/instance-type": "c5.large",
"beta.kubern... |
<p>Trying to move from Flink 1.3.2 to 1.5 We have cluster deployed with kubernetes. Everything works fine with 1.3.2 but I can not submit job with 1.5. When I am trying to do that I just see spinner spin around infinitely, same via REST api. I even can't submit wordcount example job.
Seems my taskmanagers can not conne... | <p>The issue with jobmanage connectivity. Jobmanager docker image cannot connect to "flink-jobmanager" (${JOB_MANAGER_RPC_ADDRESS}) address.</p>
<p><strong>Just use afilichkin/flink-k8s Docker instead of flink:latest</strong></p>
<p>I've fixed it by adding new host to jobmanager docker. You can see it in my github pr... |
<p>I have at least 4 config files for my service.</p>
<p>Like, application.properties, log config file, query file, ...</p>
<p>There are 4 config files which I am storing into kubernetes ConfigMaps and they are for different purposes. Currently, I am creating 4 configMaps for these 4 files and it becomes more work to... | <p>This is my personal opinion based on what I have learned so far and there may be different or easier or even better ways out there, so please take this answer with a pinch of salt.</p>
<p>Considering you have multiple services or projects, etc. And each of these projects has its own configuration files or environme... |
<p>If a node loses communication with the master, will it continue to run its workload in a self-healing way?</p>
<p>For instance, if the master is unavailable and a pod exceeds its cpu limit and is killed, will the node independently restart the pod because that pod has already been scheduled on the node?</p>
| <p>Yes. The local (node) supervisor looking after your pods is the <a href="https://kubernetes.io/docs/reference/command-line-tools-reference/kubelet/" rel="nofollow noreferrer">kubelet</a> and while you can't change things while the connection to the API server is not available, the pods already scheduled on the node ... |
<p>Our aim is to horizontally scale a .NET Core 2.0 Web API using Kubernetes. The Web API application will be served by Kestrel.</p>
<p>It looks like we can gracefully handle the termination of pods by configuring Kestrel's shutdown timeout so now we are looking into how to probe the application to determine readiness... | <p>I would recommend to perform health checks through separate endpoints.
In general, there are a number of good reasons for doing so, like:</p>
<ol>
<li>Checking that the application is live/ready or, more in general, in a healthy status is not necessarily the same as sending a user request to your web service. When ... |
<p>I have a microservice that needs to build a cache on a Redis server upon initialization, fetching data from a MongoDB instance outside the cluster.</p>
<p>Is it a bad practice to put the service and the Redis server in two separate containers on the same pod? Or should they be on different pods?</p>
| <p>They should be on different pods (and different deployments).</p>
<p>Two reasons for this: you probably want to share a single Redis cache across multiple copies of the service (their scaling properties are different); and you can deploy a prebuilt Redis system (via Helm) without needing to tightly integrate it wit... |
<p>We have a SpringBoot Web app docker container deployed in Kubernetes with 3 replicas. when the controller redirects to a different url within the same controller, we pass an object via the flashAttributes. When we run 1 pod, everything works. But when I scale to 3 pods, the object comes with all internal attributes ... | <p>Kubernetes can send multiple requests from a session to different pod within a deployment. That's why the data is lost because the data might in memory for one pod but another pod will not have that data at all. </p>
<p>To avoid this - you can either maintain the session cache in an external store like Redis or use... |
<p>I am looking for a way to delete PersistentVolumeClaims assigned to pods of a StatefulSet automatically when I scale down the number of instances. Is there a way to do this within k8s? I haven't found anything in the docs, yet.</p>
| <p>I suspect that a <a href="https://kubernetes.io/docs/reference/generated/kubernetes-api/v1.11/#lifecycle-v1-core" rel="nofollow noreferrer"><code>preStop</code> Lifecycle Handler</a> could submit a <code>Job</code> to clean up the PVC, assuming the Pod's <code>ServiceAccount</code> had the <code>Role</code> to do so... |
<p>From the kubernetes dashboard, I can see all my deployment, pod & replication is Green successfully deploy from the Continuous Deployment pipeline VSTS.</p>
<p>My issue is unable to view the site.
<a href="https://i.stack.imgur.com/xfw64.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/xfw64.p... | <p>You can access the identityapi with the public IP through a browser. If you cannot access the web, you should check the configuration of the identityapi. And then ssh into the Kubernets node to check if the identityapi service work well. Check the configuration of the service if it is the same as the Kubernets dash... |
<p>i am trying to migrate a docrized project to kubernetes, i have used Kompose to convert the project </p>
<p><code>kompose --file docker-compose.yml convert</code>, </p>
<p>when i run <code>kompose up</code> after migrating the files
i get this error </p>
<p><code>$ kompose up
WARN Unsupported env_file key - igno... | <p>Kubernetes kompose supports <code>env_file</code> conversion from <a href="https://docs.docker.com/compose/compose-file/" rel="nofollow noreferrer">Docker Compose 3.x</a> version as it's described in <a href="https://github.com/kubernetes/kompose/blob/master/docs/conversion.md" rel="nofollow noreferrer">Conversion m... |
<p>We’ve been planning for a long time to introduce <code>securityContext: runAsNonRoot: true</code> as a requirement to our pod configurations for a while now.</p>
<p>Testing this today I’ve learnt that since <code>v1.8.4</code> (I think) you also have to specify a particular UID for the user running the container, e... | <p>The Kubernetes Pod SecurityContext provides two options <code>runAsNonRoot</code> and <code>runAsUser</code> to enforce non root users. You can use both options separate from each other because they test for different configurations. </p>
<p>When you set <code>runAsNonRoot: true</code> you require that the contain... |
<p>there are two kinds of provisioner in kubernetes storageclass
one is:</p>
<blockquote>
<p>kind: StorageClass<br>
apiVersion: storage.k8s.io/v1<br>
metadata:<br>
name: hdd1<br>
provisioner: kubernetes.io/cinder<br>
parameters:<br>
type: HDD1 # change for your cloud volume type<br>
availability:... | <p><code>provisioner: kubernetes.io/cinder</code> default driver is described in <a href="https://kubernetes.io/docs/concepts/storage/storage-classes/#openstack-cinder" rel="nofollow noreferrer">official documentation.</a></p>
<p><code>provisioner: openstack.org/standalone-cinder</code> : a beta feature which was crea... |
<p>I have a Kubernetes cluster that runs a number of independent, discrete services. I want to use helm to deploy them, and I have made a helm chart for every individual resource.</p>
<p>However, now I want to be able to deploy the cluster as a single entity, but it is not clear to me how helm supports stitching toget... | <p>We also have similar scenarios wherein we have independent applications that we either need to deploy together to address features that span across them or individually deployed to address bugs.
We end up using helmfile (<a href="https://github.com/roboll/helmfile" rel="noreferrer">https://github.com/roboll/helmfile... |
<p>Currently per Microsoft documentation you can set a static IP address on the resource group of the kubernetes service. Problem with this is if you delete the resource group / cluster then the static IP address is also gone.</p>
<p><a href="https://learn.microsoft.com/en-us/azure/aks/static-ip" rel="nofollow norefe... | <p>As I know, there are two types of the public IP in Azure, such as dynamic and static. But whether it is static or dynamic, we cannot set a specific IP ourselves. The IP is randomly assigned by Azure. The types just describe the lifetime of the Public IP.</p>
<p>Just the IP included in the Vnet which we designed can... |
<p>I have a Kubernetes cluster that runs a number of independent, discrete services. I want to use helm to deploy them, and I have made a helm chart for every individual resource.</p>
<p>However, now I want to be able to deploy the cluster as a single entity, but it is not clear to me how helm supports stitching toget... | <p>Use <a href="https://helm.sh/docs/chart_template_guide/subcharts_and_globals/" rel="nofollow noreferrer">helm subcharts</a></p>
<p>You'd need to have something like a meta-chart, <code>myapps</code>. Then you'd add a <code>requirements.yaml</code> file like so:</p>
<pre><code># myapp/requirements.yaml
dependencies... |
<p>when I am trying to setup pod network using the following</p>
<pre><code>sudo kubectl apply -f https://docs.projectcalico.org/v3.1/getting-started/kubernetes/installation/hosted/rbac-kdd.yaml
</code></pre>
<p>I get this error, please help</p>
<pre><code>unable to recognize "https://docs.projectcalico.org/v3.1/get... | <p>Found that it's an issue with kubectl not being configured properly.</p>
<p>Fixed the issued by using the following commands for calico network(change accordingly for your network addon plugin)</p>
<pre><code>sudo kubeadm init --pod-network-cidr=192.168.0.0/16
mkdir -p $HOME/.kube
sudo cp -i /etc/kubernetes/admin.... |
<p>I have a cloud-native application, which is implemented using <code>Spring Cloud Netflix</code>.</p>
<p>So, in my application, I'm using <code>Eureka</code> service discovery to manage all instances of different services of the application. When each service instance wants to talk to another one, it uses <code>Eure... | <p>If you already have the application working then there's presumably more effort and risk in removing the netflix components than keeping them. There's an argument that if you could remove e.g. eureka then you wouldn't need to maintain it and it would be one less thing to upgrade. But that might not justify the effor... |
<p>I'm running a service in GKE and have an Ingress for setting up LTS.
I have tried by my self-signing certificates and I could access to my site through https protocol. It looks good.
Please notice that I have a static IP for Ingress and a domain name for it already.</p>
<p>But now I'm going to create a real-certifi... | <p>Let's go over each of your questions first:</p>
<blockquote>
<p>What's Pod's DNS, Pod's Ip and Service's Ip?</p>
</blockquote>
<p>Within the cluster, each pod has it's own internal IP address and DNS record. Same goes for the services. You can read up on DNS within Kubernetes <a href="https://kubernetes.io/docs/conc... |
<p>I have a gRPC service which listens on a port using a tcp listener. This service is Dockerized and eventually I want to run it in a Kubernetes cluster.</p>
<p>I was wondering what is the best way to implement <strong>liveness</strong> and <strong>readiness</strong> probes for checking the health of my service?</p>
... | <p>Previously I've run a separate http server inside the app, just for healthchecks (this was because AWS application load balancers only have http checking, I don't know about kube).</p>
<p>If you run the http server as a separate routine and the grpc server on the main goroutine then you should avoid the situation w... |
<p>Currently per Microsoft documentation you can set a static IP address on the resource group of the kubernetes service. Problem with this is if you delete the resource group / cluster then the static IP address is also gone.</p>
<p><a href="https://learn.microsoft.com/en-us/azure/aks/static-ip" rel="nofollow norefe... | <p>In the ARM deployment model, a Public IP Address (PIP) is an entity/resource all of its own. A PIP's are available as either dynamic or static. Dynamic is cheaper, static is more expensive as there is a finite amount of them in IPv4. </p>
<p>Yes, you can assign a PIP to AKS - see reference <a href="https://learn.mi... |
<p>I am fairly new to this, I don't know if I am heading in the right direction or not. I have a custom nginx.conf that works fine, I am now trying to build a docker image with it so that I can run it as a container in kuberentes. </p>
<p>Here is my nginx.conf</p>
<pre><code>user nginx;
worker_processes auto;
error_l... | <p>You must publish the port at runtime like this:
<code>docker run -p 8000:8000 image-id</code>.</p>
|
<p>LimitRange allows us to configure these properties per resource (memory, CPU):</p>
<ul>
<li><strong>Limit</strong>: default maximum ammount of the resource that will be provisioned.</li>
<li><strong>Request</strong>: default initial ammount of the resource that will be provisioned.</li>
</ul>
<p>However I just rea... | <p>I found the answer digging in <a href="https://kubernetes.io/docs/tasks/administer-cluster/manage-resources/memory-constraint-namespace/#motivation-for-minimum-and-maximum-memory-constraints" rel="noreferrer">the docs</a>. Limit and Request params are overridable by the pod configurations. Min and Max enforce the va... |
<p>They should able to communicate and update should visible to each other i mean mainly syncing. </p>
<blockquote>
<p>DiscoveryStrategyConfig strategyConfig = new DiscoveryStrategyConfig(factory);
Blockquote</p>
<p>// strategyConfig.addProperty("service-dns",
"my-serice-name.my-namespace.svc.cluster... | <p>Please check the followings:</p>
<h2>1. Discovery Strategy</h2>
<p>For Kubernetes you need to use the <code>HazelcastKubernetesDiscoveryStrategy</code> class. It can be defined in the XML configuration or in the code (as in your case).</p>
<h2>2. Labels</h2>
<p>Check that the service for your Hazelcast cluster has t... |
<p>I have a k8s service of type clusterIP.. i need to change the below configuration via CLI</p>
<ol>
<li>the http port to https port</li>
<li>the port number</li>
<li>the type to Load Balancer</li>
</ol>
<p>Is there a way to do it..?</p>
| <p>You can't remove the existing port, but you <em>can</em> add the HTTPs port and also change the type using <a href="https://kubernetes.io/docs/tasks/run-application/update-api-object-kubectl-patch/" rel="noreferrer">kubectl patch</a></p>
<p>Example:</p>
<pre><code>kubectl patch svc <my_service> -p '{"spec": ... |
<h1>The situation</h1>
<p>I have a kubernetes pod stuck in "Terminating" state that resists pod deletions</p>
<pre><code>NAME READY STATUS RESTARTS AGE
...
funny-turtle-myservice-xxx-yyy 1/1 Terminating 1 11d
...
</code></pre>
<p>Where <code>funny-turtle</code> is th... | <p>Try removing the finalizers from the pod:</p>
<pre><code>kubectl patch pod funny-turtle-myservice-xxx-yyy -p '{"metadata":{"finalizers":null}}'
</code></pre>
|
<p>I am fairly new to this, I don't know if I am heading in the right direction or not. I have a custom nginx.conf that works fine, I am now trying to build a docker image with it so that I can run it as a container in kuberentes. </p>
<p>Here is my nginx.conf</p>
<pre><code>user nginx;
worker_processes auto;
error_l... | <p>If your end goal is to run this in Kubernetes, your easiest path will be to put this config file into a <a href="https://kubernetes.io/docs/tasks/configure-pod-container/configure-pod-configmap/" rel="nofollow noreferrer">ConfigMap</a> and just configure your Deployment to run the standard nginx image. (In plain Do... |
<p>What is a Load Balancer? </p>
<blockquote>
<p>Load balancing improves the distribution of workloads across multiple
computing resources, such as computers, a computer cluster, network
links, central processing units, or disk drives</p>
</blockquote>
<h3>The NodePort</h3>
<p>NodePort is not load balancer. (... | <blockquote>
<p>NodePort is not load balancer. </p>
</blockquote>
<p>You're right about this in one way, yes it's not designed to be a load balancer.</p>
<blockquote>
<p>users still hits a single node i.e. the "Node" which is K8s's minion but a real Load Balancer, right?</p>
</blockquote>
<p>With NodePort, you <... |
<p>When I provision a Kubernetes cluster using kubeadm, I get my nodes tagged as "none". It's a known bug in Kubernetes and currently a PR is in progress.</p>
<p>However, I would like to know if there is an option to add a Role name manually for the node.</p>
<pre><code>root@ip-172-31-14-133:~# kubectl get no... | <p>This worked for me:</p>
<p><code>kubectl label node cb2.4xyz.couchbase.com node-role.kubernetes.io/worker=worker</code></p>
<pre><code>NAME STATUS ROLES AGE VERSION
cb2.4xyz.couchbase.com Ready custom,worker 35m v1.11.... |
<p>Where are these stored? Is there a recommended way to export them for analysis purposes?</p>
<p>I'm referring to the data from <code>kubectl get events</code>.</p>
| <blockquote>
<p>Where are these stored?</p>
</blockquote>
<p>If you run <code>kubectl get events --v=9</code> you will observe that there is actual api call behind it:</p>
<pre><code>GET /api/v1/namespaces/default/events?limit=500
</code></pre>
<p>You can use api to extract details as described in <a href="https:/... |
<p>I am running my docker containers with the help of kubernetes cluster on AWS EKS. Two of my docker containers are using shared volume and both of these containers are running inside two different pods. So I want a common volume which can be used by both the pods on aws.</p>
<p>I created an EFS volume and mounted. I... | <p>AWS EFS uses NFS type volume plugin, and As per
<a href="https://kubernetes.io/docs/concepts/storage/storage-classes/" rel="nofollow noreferrer">Kubernetes Storage Classes</a>
NFS volume plugin does not come with internal Provisioner like EBS.</p>
<p>So the steps will be:</p>
<ol>
<li>Create an external Provisio... |
<p>I created alert rules for pod memory utilisation, in Prometheus. Alerts are showing perfectly on my slack channel, but it do not contain the name of the pod so that difficult to understand which pod is having the issue . </p>
<p>It is Just showing <code>[FIRING:35] (POD_MEMORY_HIGH_UTILIZATION default/k8s warning)<... | <p>As mentioned in the <a href="https://engineering.infinityworks.com/slack-prometheus-alertmanager/" rel="nofollow noreferrer">article</a>, you should check the alert rules and update them if necessary. See an example:</p>
<pre><code>ALERT ElasticacheCPUUtilisation
IF aws_elasticache_cpuutilization_average > 80
... |
<p>I have a <strong>deployment.yaml</strong> containing deployment of <em>3 containers</em> + <em>LB service</em> and the <strong>cloudbuild.yaml</strong> containing <em>steps to build container images every time there's new commit to a certain branch on Bitbucket git repo</em>.</p>
<p>All is working fine except the f... | <p>Found a solution by using image tag or URI variables in deployment fine and substituting them with sed during build-time.</p>
<p><strong>deplyment.yaml</strong></p>
<pre><code>apiVersion: apps/v1
kind: Deployment
metadata:
namespace: dev
name: app
labels:
app: app
spec:
replicas: 3
selector:
matc... |
<p>I am learning a bit about ingress. It consists of 2 parts:</p>
<ul>
<li>Ingress resource: <em>"How do you want to route requests to the backing services?"</em></li>
<li>Ingress controller: <em>"Listens to Kubernetes API for Ingress resources."</em></li>
</ul>
<p>I've deployed an ingress controller in namespace cal... | <p>The ingress resource must be in the same namespace as the backend service. This can be any namespace doesn't need to be the same as the controller</p>
|
<p>I Have a pod that needs to connect to a Database located on GCE Vm's with the same subnet as the GKE nodes. I currently have a k8 Service and k8 Endpoint that the pod successfully connects to but the 10.128.0.2 cannot be routed. Im sure this pertains to a GCP firewall rule/route but I havn't had much luck.</p>
<p>s... | <p>At this point in time, services and endpoints are not routable; however pods are as explained in <a href="https://cloud.google.com/solutions/prep-kubernetes-engine-for-prod#communicating_within_the_same_cluster" rel="noreferrer">this article</a>. As @cohenjo mentioned, you should directly connect from the pod.</p>
... |
<p>We use local persistent storage as storage backend for SOLR pods. The pods are redundantly scheduled to multiple kubernetes nodes. If one of the nodes go down there are always enough instances on other nodes.</p>
<p>How can we drain these nodes (without "migrating" the SOLR pods to other nodes) in case we want to d... | <p>You can check out pod anti-affinity. </p>
<p><a href="https://kubernetes.io/docs/concepts/configuration/assign-pod-node/#affinity-and-anti-affinity" rel="nofollow noreferrer">https://kubernetes.io/docs/concepts/configuration/assign-pod-node/#affinity-and-anti-affinity</a></p>
<p>These constructs allow you to repel... |
<p>I have a Go server that is currently running with Kubernetes on AWS. The website sits under a route-53 and an ELB that manages the SSL termination.
Now, I want to support HTTP/2 in my web-server in order to push resources to the clients, and I saw that HTTP/2 requires that the web-server will use HTTPS. I have a few... | <p>The new ELB supports HTTP/2 (<a href="https://aws.amazon.com/blogs/aws/new-aws-application-load-balancer/" rel="nofollow noreferrer">https://aws.amazon.com/blogs/aws/new-aws-application-load-balancer/</a>) but not the Push attribute (<a href="https://docs.aws.amazon.com/elasticloadbalancing/latest/application/load-b... |
<p>I'm running into DNS issues on a GKE 1.10 kubernetes cluster. Occasionally pods start without any network connectivity. Restarting the pod tends to fix the issue.</p>
<p>Here's the result of the same few commands inside a container without network, and one with.</p>
<h2>BROKEN:</h2>
<pre><code>kc exec -it -n iot... | <p>Some steps to try:</p>
<p>1) ifconfig eth0 or whatever the primary interface is.
Is the interface up? Are the tx and rx packet counts increasing?</p>
<p>2)If interface is up, you can try tcpdump as you are running the nslookup command that you posted. See if the dns request packets are getting sent out. </p>
<p>3... |
<p>Is it possible to run commands on host from within a pod in kubernetes.</p>
<p>So for example, I have a pod running a python image which calculates the size of the os. But the command it uses runs inside the pod, not in the host. Is it possible to run the command on the host from pod.</p>
| <p>Actually a command run inside a pod is run on the host. It's a container (Docker), not a virtual machine.
That means when you execute something in the pod like retrieving the size of your RAM it will usually return the RAM of the whole machine.
If you want to get the "size of the os" and you mean the hard drive with... |
<p>I want to set up a pod and there are two containers running inside the pod, which try to access a mounted file /var/run/udspath.
In container serviceC, I need to change the file and group owner of /var/run/udspath, so I add a command into the yaml file. But it does not work. </p>
<p>kubectl apply does not complain,... | <p>More information would be helpful. Like what error are you getting. </p>
<p>Nevertheless, it really depends on what is defined in ServiceC's dockerfile entrypoint or cmd.</p>
<p>Mapping between docker and kubernetes:</p>
<p>Docker Entrypoint --> Pod command (The command run by the container)
Docker cmd --> Pod a... |
<p>I am deploying my Microservices on Kubernetes Cluster. Every Application has 4 replicas or PODS. For a REST API in 1 application, I want to track which POD addressed my request. e.g. my <code>/app/deploy(body contains app_id)</code> request is handled by <code>POD1</code>.</p>
<p>For the same, I have imported Kuber... | <p>You do not need Kubernetes Jar in your Java application. A simple <code>System.getenv("HOSTNAME")</code> will give you the name of your Pod. Works on all platform, and since Kubernetes version 1.6 at least.</p>
<p>More formally, you could use the following in your Kube spec (<a href="https://kubernetes.io/docs/task... |
<p>I'm using <code>Kubernetes</code> v1.8.14 on custom built <code>CoreOS</code> cluster:</p>
<pre><code>$ kubectl version --short
Client Version: v1.10.5
Server Version: v1.8.14+coreos.0
</code></pre>
<p>When trying to create the following <code>ClusterRole</code>:</p>
<pre><code>$ cat ClusterRole.yml
---
apiVers... | <p>There isn't enough information here to answer your question.</p>
<p>It sounds like you are running into privilege escalation prevention:
<a href="https://kubernetes.io/docs/reference/access-authn-authz/rbac/#privilege-escalation-prevention-and-bootstrapping" rel="nofollow noreferrer">https://kubernetes.io/docs/refe... |
<p>The <code>User Microservice</code> is deployed on kubernetes. </p>
<p>The <code>Order Microservice</code> is not deployed on kubernetes, but registered with Eureka.</p>
<p><strong><em>My questions:</em></strong></p>
<p>How can <code>Order Microservice</code> discover and access <code>User Microservice</code> thr... | <p>First lets take a look at the problem itself:
If you use an overlay network as Kubernetes CNI, the problem is that it creates an isolated Network thats not reachable from the outside (e.g. Flannel). If you have a network like that one solution would be to move the eureka server into kubernetes so eureka can reach t... |
<p>We are trying to create an ExternalName service for Kubernetes to hide URL linking to our Firebase:</p>
<pre><code>kind: Service
apiVersion: v1
metadata:
name: firebase
namespace: devel
spec:
type: ExternalName
externalName: firebase-project-123456.firebaseio.com
</code></pre>
<p>The service is created cor... | <p>You might be running into a virtual host issue. firebase-project-123456.firebaseio.com is a virtual host name which is then used to route your request to the correct backend. A Kubernetes external service is essentially a DNS CNAME, which forces a second DNS lookup for the actual host name.</p>
<p>See if this works... |
<p>I am using the <a href="https://console.bluemix.net/docs/cli/index.html#overview" rel="nofollow noreferrer">CLI for IBM Cloud</a> in my bash environment. Is there support for autocomplete, i.e., automatic completion of commands and their options?</p>
<p>I am especially interested in the commands for the Kubernetes ... | <p>Autocompletion is supported, but not that well-advertised. The instructions can be found in the <a href="https://console.bluemix.net/docs/cli/reference/bluemix_cli/enable_cli_autocompletion.html#enabling-shell-autocompletion-for-ibm-cloud-cli-linux-macos-only-" rel="nofollow noreferrer">IBM Cloud developer tools doc... |
<p>Is there a way to set a Galera root password with this script?</p>
<p><a href="https://github.com/kubernetes/kubernetes/tree/master/test/e2e/testing-manifests/statefulset/mysql-galera" rel="nofollow noreferrer">https://github.com/kubernetes/kubernetes/tree/master/test/e2e/testing-manifests/statefulset/mysql-galera<... | <p>You need to use <a href="https://kubernetes.io/docs/concepts/configuration/secret/" rel="nofollow noreferrer">secret</a>, for example:</p>
<pre><code>kubectl create secret generic mysql-pass --from-literal=MYSQL_ROOT_PASSWORD=YOUR_PASSWORD
</code></pre>
<p>and then use it as env:</p>
<pre><code> spec:
conta... |
<p>I am trying to implement CI/CD pipeline by using Kubernetes and Jenkins. I am planning to use Kubernetes HA Cluster having 3 master and 5 worker machine / node. </p>
<p>Now I am exploring about the implementation tutorials for CI/CD Pipeline. And also exploring about the Jenkins usage with Kubernetes HA Cluster. W... | <p>Jenkins has two parts. There's the master, which manages all the jobs, and the workers, which perform the jobs.</p>
<p>The Jenkins master supports many kinds of workers (slaves) via plugins - you can have stand alone nodes, Docker based slaves, Kubernetes scheduled Docker slaves, etc.</p>
<p>Where you run the Jenk... |
<p>I have a kubernetes setup in which one is <code>master</code> node and two <code>worker</code> nodes. After the deployment, which is a <code>daemonset</code>, it starts pods on both the <code>worker</code> nodes. These pods contain 2 containers. These containers have a python script running in them. The python scrip... | <p>You can access your cluster using kube api.</p>
<p><a href="https://kubernetes.io/docs/tasks/access-application-cluster/access-cluster/" rel="nofollow noreferrer">https://kubernetes.io/docs/tasks/access-application-cluster/access-cluster/</a></p>
<blockquote>
<p>Accessing the API from a Pod When accessing the AP... |
<p>How does Kubernetes knows what external cloud provider on it is running?</p>
<p>Is there any specific service running in Master which finds out if the Kubernetes Cluster running in AWS or Google Cloud?</p>
<p>Even if it is able to find out it is AWS or Google, from where does it take the credentials to create the ... | <p>When installing Kubernetes cloud provider flag, you must specify the <code>--cloud-provider=aws</code> flag on a variety of components. </p>
<p><strong><a href="https://kubernetes.io/docs/reference/command-line-tools-reference/kube-controller-manager/#options" rel="nofollow noreferrer">kube-controller-manager</a></... |
<p>I'm looking for a command like "gcloud config get-value project" that retrieves a project's name, but for a pod (it can retrieve any pod name that is running). I know you can get multiple pods with "kubectl get pods", but I would just like one pod name as the result.</p>
<p>I'm having to do this all the time: </p>
... | <p>There are many ways, here are some examples of solutions:</p>
<p><code>kubectl get pods -o name --no-headers=true </code></p>
<p><code>kubectl get pods -o=name --all-namespaces | grep kube-proxy</code></p>
<p><code>kubectl get pods -o go-template --template '{{range .items}}{{.metadata.name}}{{"\n"}}{{end}... |
<p>I'm trying to write a go template that extracts the value of the load balancer. Using <code>--go-template={{status.loadBalancer.ingress}}</code> returns <code>[map[hostname:GUID.us-west-2.elb.amazonaws.com]]%</code> When I add <code>.hostname</code> to the template I get an error saying, "can't evaluate field hostn... | <p>As you can see from the JSON, the ingress element is an array. You can use the <a href="https://golang.org/pkg/text/template/#hdr-Functions" rel="nofollow noreferrer">template function index</a> to grab this array element. </p>
<p>Try:</p>
<pre><code>kubectl get svc <name> -o=go-template --template='{{(index... |
<p>Hi I am working on kubernetes using AWS EKS. I have a problem with kompose file when I am converting the docker-compose file into kompose file i had aproble with the volume mount point and as well when I run the command the kompose up it is asking the username which credential should i provide.</p>
<p>this is my do... | <p>The better way to apply your configuration to Kubernetes cluster is to convert it, check YAML files, adjust them if necessary and then apply them using <code>kubectl</code>.</p>
<p>I tested the conversion using <code>kompose v1.16.0</code> on Mac and I had to remove the <code>mem_limit</code> option from the <code>... |
<p>I am trying to learn the implementation of CI/CD pipeline using Jenkins and Kubernetes for my Spring Boot microservice deployment.</p>
<p>I following the following links for references,</p>
<ol>
<li><a href="https://dzone.com/articles/easily-automate-your-cicd-pipeline-with-jenkins-he" rel="nofollow noreferrer">ht... | <p>You could work with your helm charts unpackaged, effectively deploying them from source. You don't <em>necessarily</em> have to package them and host them in a repo. You probably will want to package the charts and host them in a repo if you have multiple apps/teams consuming the charts and perhaps building their ow... |
<p>I'm trying to enable dashboard via nodeport service.
I have 3 VMs:</p>
<ul>
<li>192.168.100.31 - master</li>
<li>192.168.100.32 - minion</li>
<li>192.168.100.33 - minion (dashboard here)</li>
</ul>
<p>After applying:</p>
<pre><code>kubectl apply -f https://raw.githubusercontent.com/kubernetes/dashboard/master/src... | <p>Looks like you are using an <code>apiserver</code> type of request while accessing the <code>dashboard</code> service directly via NodePort Service.</p>
<p>Could you check the following links in your browser to access Kubernetes dashboard:</p>
<p><a href="https://192.168.100.31:32433/" rel="nofollow noreferrer">h... |
<p>In kubernetes we try to have a immutable deployment of our PHP code by deploying the php code in a prepackaged container.</p>
<p>By nature kubernetes volume replace the directory with an empty volume, but I would like to keep the data of the php container so we can share that with the nginx container which has a vh... | <p>Kubernetes hasn't mechanism like docker-compose to share some folder as volume. But you can create Persistent Volume (PV) and Persistent Volume Claim (PVC) and share your data between containers.
It is described in <a href="https://kubernetes.io/docs/tasks/configure-pod-container/configure-persistent-volume-storage/... |
<p>I am trying to install Kubernetes on Mesosphere DC/OS with only one private agent, using <a href="https://github.com/dcos/dcos-vagrant" rel="nofollow noreferrer">dcos-vagrant</a>.</p>
<p>However, the step for "kube-node-0", get stuck on "PREPARED" :</p>
<pre><code># dcos kubernetes plan show deploy
deploy (serial... | <p>The problem seems to be how much RAM you're requesting for the Kubernetes node. Apparently, the cluster has less than 10000MB of available RAM (as per screenshot, there's 4GiB used out of 10GiB). As a test, reduce that to 8000 and it should work.</p>
|
<p>I have a working redis pod with gcloud persistence disk.
Sometimes when deleting the pod the following error is thrown:</p>
<pre><code>AttachVolume.Attach failed for volume "redis-volume" : GCE persistent disk not found: diskName="redis-volume" zone="europe-west3-c"
</code></pre>
<p>In case of failure deleting the... | <p>I had the same problem that solved after separate the persistentvolume to the persistnetvolumeclaim.</p>
<p>The Deployment should use the claim.
<a href="https://www.youtube.com/watch?v=n06kKYS6LZE" rel="nofollow noreferrer">https://www.youtube.com/watch?v=n06kKYS6LZE</a></p>
|
<p>I've installed Kubernetes with docker-for-desktop.
Now I want to create a user (following RBAC principle). I'm using private certificates and want to sigh them against the <code>ca.crt</code> of the cluster.</p>
<p>For minikube this <code>ca.crt</code> was in <code>.minikube/ca.crt</code>but I can't find it in the ... | <p>By default, your HyperKit VM doesn't mount volumes locally in docker-for-desktop.</p>
<p>Your best bet is to copy the ca.crt manually to your machine using <code>kubectl cp</code>.</p>
<p>Example:</p>
<pre><code>kubectl cp kube-apiserver-docker-desktop:run/config/pki/ca.crt -n kube-system /tmp/ca.crt
</code></pre... |
<p>We're using <a href="https://www.spinnaker.io/reference/providers/kubernetes/" rel="noreferrer">Kubernetes 1.9</a> as our cloud provider for Spinnaker v1.6. </p>
<p>In this mode, <code>halyard</code> deploys all of the Spinnaker components - <code>orca</code>, <code>rosco</code>, <code>igor</code>, etc. - as Kubern... | <p>While its not documented <a href="https://www.spinnaker.io/reference/halyard/custom/#kubernetes" rel="noreferrer">here</a>, it does look like there is a <a href="https://github.com/spinnaker/halyard/blob/master/halyard-deploy/src/main/java/com/netflix/spinnaker/halyard/deploy/spinnaker/v1/service/KubernetesSettings.... |
<p>Using Ubuntu 18.04.</p>
<p>I am trying to install a kubernetes cluster on my local machine (localhost) using this guide (LXD + conjure-up kubernetes):</p>
<p><a href="https://kubernetes.io/docs/getting-started-guides/ubuntu/local/#before-you-begin" rel="noreferrer">https://kubernetes.io/docs/getting-started-guides... | <p>I wasn't able to reproduce your exact problem but i got <code>conjure-up</code> + <code>lxd</code> installed and in the end Kubernetes on my newly installed VirtualBox Ubuntu 18.04 (Desktop) VM. Hopefully this answer could help you somehow!</p>
<p>I looked through the kubernetes.io documentation page and that one l... |
<p>I have installed Apache Superset from its Helm Chart in a Google Cloud Kubernetes cluster. I need to <code>pip install</code> a package that is not installed when installing the Helm Chart. If I connect to the Kubernetes bash shell like this:</p>
<p><code>kubectl exec -it superset-4934njn23-nsnjd /bin/bash</code></... | <p>Docker file seems to be installing python3 package.
Try 'python3' or "pip3" instead of 'python'/'pip'</p>
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.