prompt stringlengths 65 38.7k | response stringlengths 41 29.1k |
|---|---|
<p>Can I pass AWS creds to Kops CLI or programmatically? How to handle multiple AWS accounts?</p>
| <p>You can redefine the <code>KOPS_STATE_STORE</code> environment variable to point to different s3 buckets in different aws accounts. You'll also have to export <code>AWS_ACCESS_KEY_ID</code> and <code>AWS_SECRET_ACCESS_KEY</code> variables for the given s3 bucket's account authorization.</p>
<p>To make the switch eas... |
<p>I can specify a specific version of a chart by doing: <code>helm install --version <some_version> stable/<some_chart></code></p>
<p>But, how do I know which versions are available?</p>
| <h3>Short Answer</h3>
<p>You can list all available versions of a chart using the <code>search repo</code> functionality together with the <code>--versions</code> flag:</p>
<p><code>helm search repo <reponame>/<chartname> --versions</code></p>
<p>This requires that the repo was added previously and is up to... |
<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>
| <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... |
<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... | <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... |
<p>I have a testing Kubernetes cluster and I created elasticsearch on AWS which include Kibana for the log management.</p>
<p>Endpoint: <a href="https://search-this-is-my-es-wuktx5la4txs7avvo6ypuuyri.ca-central-1.es.amazonaws.com" rel="nofollow noreferrer">https://search-this-is-my-es-wuktx5la4txs7avvo6ypuuyri.ca-cent... | <p>I had a similar problem. Below are the full details of how I got it working.</p>
<p>Setup:</p>
<ul>
<li>AWS ES instance accessible via a VPC.</li>
<li>Using <a href="https://github.com/fluent/fluentd-kubernetes-daemonset/blob/master/fluentd-daemonset-elasticsearch.yaml" rel="nofollow noreferrer">this yaml file</a>... |
<p>I am trying to create add the nginx ingress controller to my kubernetes cluster. My current cluster has 3 nodes and they all have open firewall rules in between them. (Note: This is a bare metal cluster for educational purposes) </p>
<p>I have created a deployment with the following config</p>
<pre><code>apiVersio... | <p>I was having the same problem, but I did not want to add the <code>host</code> value.
To prevent the redirect HTTP to HTTPS by the default server like <a href="https://stackoverflow.com/a/49455779/4410404">David</a> mentioned, instead I added this annotation to the ingress and it fixed it for me: <code>nginx.ingre... |
<p>When creating an ingress resource in GCE using the Nginx ingress controller, the ingress resource is stuck on "Creating ingress". Any custom annotations appear to be lost, but I can access the URL defined by the ingress.</p>
<p>What could be causing this?</p>
<p><a href="https://i.stack.imgur.com/u3uLe.png" rel="n... | <p>This turned out to be because I was sending the annotation</p>
<pre><code>nginx.ingress.kubernetes.io/ssl-redirect: false
</code></pre>
<p>instead of </p>
<pre><code>nginx.ingress.kubernetes.io/ssl-redirect: "false"
</code></pre>
<p>According to <a href="https://github.com/kubernetes/ingress-nginx/issues/1990" r... |
<p>I'm attempting to get autoscaling set up using custom metrics.</p>
<p>Currently, I have:</p>
<ul>
<li><a href="https://github.com/coreos/prometheus-operator" rel="nofollow noreferrer">Prometheus Operator</a> running in the <code>monitoring</code> namespace.</li>
<li><a href="https://github.com/DirectXMan12/k8s-pro... | <p>Yes, <code>Deployment</code> which you want to scale should be in the same namespace with <code>HorizontalPodAutoscaler</code> object.</p>
<p>Here is an extract from the Kubernetes <a href="https://kubernetes.io/docs/concepts/overview/working-with-objects/namespaces/" rel="nofollow noreferrer" title="Kubernetes Nam... |
<p>We have a requirement to build custom docker images from base docker images with some additional packages/customization. These custom docker images need to be then deployment into kubernetes. We are exploring various tools to figure out on how docker build can be done in kubernetes cluster (without direct access to ... | <p><strong>1. Is it a good practice is build docker images in kubernetes cluster where other containers will be run/executed?
Are there any obvious challenges with kaniko?</strong></p>
<p>Yes, it is possible to build images inside <a href="https://kubernetes.io" rel="nofollow noreferrer">Kubernetes</a> containers, but... |
<p>I want to use the RestApi to update the deployment.
and I test it with postman, but always got 415 back.</p>
<hr>
<p>the info is as follows:</p>
<p><strong>type:</strong>
PATCH</p>
<p><strong>url:</strong> <a href="https://k8sClusterUrl:6443/apis/extensions/v1beta1/namespaces/ns/deployments/peer0" rel="nofollow ... | <p><code>415</code> is invalid media type.</p>
<p>In this case, you should be setting the media type as <code>application/json+patch+json</code> (you can see this in the documentation <a href="https://kubernetes.io/docs/reference/federation/extensions/v1beta1/operations/" rel="nofollow noreferrer">here</a>) </p>
|
<p>Most of my images that I deploy into Kubernetes has the common base (From) image. So, I have multiple applications deployed into multiple pods. How does the Docker layer cache work across multiple pods, as the From image is same for all the pods?</p>
| <p>See "<a href="https://kubernetes.io/docs/concepts/workloads/pods/pod-overview/#how-pods-manage-multiple-containers" rel="noreferrer">How Pods manage multiple Containers</a>"</p>
<blockquote>
<p>Pods are designed to support multiple cooperating processes (as containers) that form a cohesive unit of service.<br>
... |
<p>In Kubernetes <a href="https://kubernetes.io/docs/concepts/workloads/controllers/cron-jobs/" rel="noreferrer">cronjobs</a>, It is stated in the <a href="https://kubernetes.io/docs/concepts/workloads/controllers/cron-jobs/#cron-job-limitations" rel="noreferrer">limitations section</a> that </p>
<blockquote>
<p>Job... | <p>After investigating the code base of the <a href="https://github.com/kubernetes/kubernetes" rel="noreferrer">Kubernetes repo</a>, so this is how the CronJob controller works:</p>
<ol>
<li><p>The CronJob controller <a href="https://github.com/kubernetes/kubernetes/blob/392bf0adef478175b9cf0226b02820eb1820f797/pkg/con... |
<p>I have a node.js container running on kubernetes that handles websocket connections that will normally be kept open until the user quits. Now when I do a rolling update or when the deployment scales down, is there a way to stop the pod from being killed until the last user has disconnected? </p>
| <p>At the moment, Kubernetes does not support graceful connection closing. </p>
<p><code>terminationGracePeriodSeconds</code> only define the timer before the Pod termination. It doesn't take care of Pod connections. </p>
<p>The only way to deal with rolling updates is to adapt your application to be able to switch ... |
<p>According to this <a href="https://www.docker.com/kubernetes" rel="nofollow noreferrer">link</a> docker is supporting kubernetes on linux, mac and windows. I can't make out whether or not kubernetes is installed within docker like swarm is. So is it true that with a normal install of docker it will also install kube... | <p>I would not say it'll be installed but you'll get the chance to do it if you want to.</p>
<p><strong>Here's the about page:</strong></p>
<blockquote>
<p>Version 18.05.0-ce-win67 (18263)
Channel: edge
0c7f1aa</p>
</blockquote>
<p><strong>If you navigate to the Settings page (Docker CE for windows in my case)... |
<p>I have written Pre- and Post-upgrade hooks for my Helm chart, which will get invoked when I do a helm upgrade. My Pre-upgrade hook is supposed to write some information to a file in the shared persistent storage volume. Somehow, I dont see this file getting created though I am able to see the hook getting invoked.</... | <p>Looks like I needed to give the command differently:</p>
<pre><code>command: ["/bin/sh", "-c", "scripts/preUpgradeScript.sh","{{ .Values.pvc.shared_storage_path }}/{{ template "fullname" . }}"]
</code></pre>
|
<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>
| <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... |
<p>I have deployed Kubernetes using the link <a href="https://kubernetes.io/docs/tasks/tools/install-kubeadm/" rel="nofollow noreferrer">Kubernetes official page</a></p>
<p>I see that Kubernetes is deployed because in the end i got this</p>
<pre><code>Your Kubernetes master has initialized successfully!
To start usi... | <p>I figured out the issue it is because of the firewall in the machine I could join nodes to the cluster once I allowed traffic via port 6443. I didn't fix the issue with this post but for beginners use this <a href="https://www.google.com/url?q=http://www.bogotobogo.com/DevOps/DevOps-Kubernetes-III-Kubernetes-on-Linu... |
<p>I am trying to get Service <code>label selectors</code> through <a href="https://github.com/kubernetes-client/python" rel="nofollow noreferrer">Kubernetes Python Client</a>. I am using <a href="https://github.com/kubernetes-client/python/blob/master/kubernetes/docs/CoreV1Api.md#list_service_for_all_namespaces" rel="... | <p>You should be able to get the selector from a service object, and then use that to find all the pods that match the selector.</p>
<p>For example (I am hoping I don't have typos, and my python is rusty):</p>
<pre><code>services = v1.list_service_for_all_namespaces(watch=False)
for svc in services.items:
if svc.... |
<p>I am new to Kubernetes <code>NetworkPolicy</code> and the Network plugin <code>calico</code>.</p>
<p>I have successfully implemented <code>calico</code> in my Kubernetes cluster:</p>
<pre><code>[root@node1 ~]# kubectl get po --all-namespaces -o wide | grep calico
kube-system calico-kube-controllers-5d8b5bc986-... | <p>You can inspect calico-node containers logs across your Kubernetes cluster within this path <code>/var/log/calico</code>, or it can be modified via <code>--log-dir</code> parameter used in <code>calicoctl node run</code> command, as described in this <a href="https://docs.projectcalico.org/v1.5/usage/troubleshooting... |
<p>I am using <a href="https://github.com/fluent/fluentd-kubernetes-daemonset" rel="noreferrer">fluentd daemonset</a> to get kubernetes logs to Elasticsearch/Kibana which is working fine. Now the problem is that there are 3 4 application running in kubernetes which have different log pattern, these are running in pods ... | <p>Sure! check this ConfigMap, which I believe you have as well somewhere in your cluster:</p>
<pre><code>kind: ConfigMap
apiVersion: v1
metadata:
name: fluentd-es-config-debug
namespace: kube-system
labels:
addonmanager.kubernetes.io/mode: Reconcile
data:
system.conf: |-
<system>
root_dir ... |
<p>So, I would like to have <code>nginx</code> resolve hostnames for backends at request time. I expect to get <code>HTTP 502 Bad Gateway</code> when back-end service is down and I expect service response, when it's up.</p>
<p>I use <code>nginx:1.15-alpine</code> image for <code>nginx</code> and here is what I have i... | <p>It fails because you need to use the FQDN to Resolve the name.</p>
<p>Using just the hostname will usually work because in kubernetes the resolv.conf is configured with search domains so that you don't usually need to provide a service's FQDN.</p>
<p>However, specifying the FQDN is necessary when you tell nginx to... |
<p>I want to create a secret through kubectl api.
Below is the script, I am running but getting error in parsing yaml file.
Please help</p>
<pre><code> curl -vk \
-X POST \
-d @- \
-H "Authorization: Bearer $(cat token)" \
-H 'Accept: application/json' \
-H 'Content-Type: application/json' \
... | <p>I changed my JSON structure in which I added the curly brace which I missed in the end and one comma in the type key.</p>
<pre class="lang-sh prettyprint-override"><code>curl -vk \
-X POST \
-d @- \
-H "Authorization: Bearer $(cat token)" \
-H 'Accept: application/json' \
-H 'Content-Ty... |
<p>I am trying to get my hands dirty on Kubernetes. I am firing following command:</p>
<pre><code>kubectl get deployment
</code></pre>
<p>and I get the following headers in the output:</p>
<p><a href="https://i.stack.imgur.com/mX2TR.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/mX2TR.png" alt="k... | <p>The Deployment object specifies the desired state of your Deployment, and the Deployment Controller drives the current state of the system towards the desired state.</p>
<p>The <code>Desired</code> field specifies the number of replicas you asked for, while the <code>Current</code> field specifies the number of rep... |
<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... | <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... |
<p>I have service account name: <code>myservice</code> </p>
<pre><code>$ kubectl get serviceaccount
NAME SECRETS AGE
default 1 15d
myservice 1 15d
$ kubectl get serviceaccount myservice -o yaml
apiVersion: v1
kind: ServiceAccount
metadata:
creationTimestamp: 2018-06-13T12:41:18Z
... | <p>It seems you should create new myservice SA in development NS instead modifying existing SA in default namespace. Create new myservice in development NS, then remove one in default NS. The error cause the nonexistent myservice even is in development NS.</p>
|
<p>Is there a way to configure kube-proxy in GKE?</p>
<p>I can see the pods creating from the daemonset, but I cannot see the daemonset itself.</p>
<p>Thanks for your help.</p>
| <p>At the node level, the system is managed by Kubernetes K8s, whereas, at the master level, the system is <a href="https://cloud.google.com/kubernetes-engine/docs/concepts/kubernetes-engine-overview" rel="nofollow noreferrer">managed by GKE</a>. The <a href="https://cloud.google.com/kubernetes-engine/docs/concepts/clu... |
<p>I have set up a AWS kops cluster for Kubernetes, i have multiple microservices where in each application need to interact with one another.</p>
<p><strong>Scenario: My ta2carbon app tries to invoke a function in ta1carbon app through service(dns) name.</strong> </p>
<p><strong>Result: It is failing with timeout er... | <p>DNS resolves a doman name to an IP address, not an IP address + port. </p>
<p>There are two potential solutions:</p>
<ol>
<li><p>Modify your application source to issue API requests to <code>http://ta1carbon:3000</code></p></li>
<li><p>Set the <code>port</code> on your <code>ta1carbon</code> service to <code>80</c... |
<p>I have been trying to run tomcat container on port 5000 on cluster using kubernetes. But when i am using kubectl create -f tmocat_pod.yaml , it creates pod but docker ps does not give any output. Why is it so?</p>
<p>Ideally, when it is running a pod, it means it is running a container inside that pod and that cont... | <p>The docker containers should be running on the virtual machine. Since I only installed minikube on my local machine, I confirmed the following will bring what you want:</p>
<pre><code>minikub ssh
...
docker ps
</code></pre>
<p>Just try the kubernetes equivalent of <code>minikube ssh</code>.</p>
|
<p>I'm using minikube on windows 10 and trying to start it using Hyper-V.
Because I'm behind a corporate proxy and use CNTLM to avoid authentication. I added the http_proxy and https_proxy as docker env.</p>
<pre><code>minikube start --vm-driver hyperv --hyperv-virtual-switch "PrimaryVirtualSwitch" --docker-env http_p... | <p>Download <a href="http://cmder.net/" rel="nofollow noreferrer">cmder</a>, type bash to switch to bash, export http_proxy and https_proxy and run minikube start.
You can find more information about the related topic at <a href="https://github.com/kubernetes/minikube/issues/2425" rel="nofollow noreferrer">https://git... |
<p>I am using openshift with glusterfs as storage system. Dynamic provisioning works very well but always rounds the allocated capacity to the next GB value. E.g.: I request a volume of 400MB but a volume of 1GB is created.</p>
<p>Is this behavior configurable? I setup openshift via the advanced installation with open... | <p>It is how Kubernetes underneath works. Where you have static volumes defined, the allocation request is used to grab the best match available. So if there isn't one of the exact size, it will grab the next size up. It isn't able to split up a persistent volume and just give part of it to you. It also doesn't enforce... |
<p>When I follow <a href="http://kubernetes.io/docs/admin/multiple-schedulers/" rel="nofollow">these instructions</a> to create custom scheduler, the pods assigned to <code>my-scheduler</code> (<code>pod annotation-second-scheduler</code> in the example) keep status Pending and are never scheduled.</p>
<p>I think this... | <p>There are few issues with the instructions mentioned in <a href="https://kubernetes.io/docs/tasks/administer-cluster/configure-multiple-schedulers/" rel="nofollow noreferrer">https://kubernetes.io/docs/tasks/administer-cluster/configure-multiple-schedulers/</a> for local clusters that I created using the instruction... |
<p>I have a Kubernetes environment with a rabbitmq servirve who deploys 2 pods of rabbitmq.</p>
<p>I need to install a plugin on rabbitmq, (Delayed Message Plugin) but I don't like the "manual" way, so if the pod is deleted, I have to install the plugin again.</p>
<p>I want to know which is the recommended way of ach... | <p>You should mount the configuration for RabbitMQ from a config map.</p>
<p>For example:</p>
<p>The ConfigMap:</p>
<pre><code>apiVersion: v1
kind: ConfigMap
metadata:
name: rabbitmq-config
namespace: rabbitmq
data:
enabled_plugins: |
[rabbitmq_management,rabbitmq_peer_discovery_k8s].
rabbitmq.conf: |
... |
<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 > ~/.kubespray.yml << EOF
kubespray_git_rep... | <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... |
<p>I want to connect a docker container running locally to a service running on a Kubernetes cluster. To do so I have exposed a service through reserving some static IP addresses.</p>
<p>I have also saved those IP addresses in local DNS, in the <code>/etc/hosts/</code> file:</p>
<pre><code>123.123.123.12 host1
456.45... | <p>There's no difference doing this if the client is or isn't in Docker. However you have the <a href="https://kubernetes.io/docs/tasks/access-application-cluster/service-access-application-cluster/" rel="nofollow noreferrer">service exposed from Kubernetes</a>, you'd make the same connection to it from a process runn... |
<p>I'm running Kuberentes with a Minikube node on my machine. The pods are accessing each other by their .metadata.name, and I would like to have a custom domain to that name.</p>
<p>i.e. one pod accesses Elastic's machine by elasticsearch.blahblah.com</p>
<p>Thanks for any suggestions</p>
| <p>You should have DNS records for pods by default due to kube-DNS addon enabled by default in minikube.</p>
<p>To check kube-dns addon status use the below command:</p>
<p><code>kubectl get pod -n kube-system</code></p>
<p>Please find below how cluster add-on DNS server works:</p>
<p>An optional (though strongly r... |
<p>I was successfully able to setup the Kubernetes master .
I created the Kubernetes slave node by installing Docker and kubelet (using kubeadm) . After running the join command the slave node is joined to the cluster . I am able to verify that from master node . But the pods that are getting deployed in slave node is... | <p>In such cases I would usually start to troubleshoot cluster by checking the state of pods in kube-system namespace using the command:</p>
<pre><code>$ kubectl get pods --all-namespaces -o wide
</code></pre>
<p>There should be several pods related to networking, running on each node, e.g:</p>
<pre><code>NAMESPACE ... |
<p>Yesterday, <a href="https://github.com/naftulikay/katyperry" rel="noreferrer">I built a full-featured example</a> which uses Terraform to create a network and a GKE cluster in Google Cloud Platform. The whole thing runs in Vagrant on a CentOS 7 VM and installs both <code>gcloud</code>, <code>kubectl</code>, and <cod... | <p>After successfully reproducing the issue multiple times by destroying and recreating all the infrastructure, I found <a href="https://gitlab.com/charts/gitlab/merge_requests/227#note_68683418" rel="noreferrer">some arcane post on GitLab</a> that mentions <a href="https://github.com/kubernetes/kubernetes/issues/61943... |
<p>I am new to Kubernetes <code>NetworkPolicy</code> and the Network plugin <code>calico</code>.</p>
<p>I have successfully implemented <code>calico</code> in my Kubernetes cluster:</p>
<pre><code>[root@node1 ~]# kubectl get po --all-namespaces -o wide | grep calico
kube-system calico-kube-controllers-5d8b5bc986-... | <p>Kubernetes <code>NetworkPolicy</code> doesn't support logging, but Calico's native <code>NetworkPolicy</code> supports a "log" action that allows you to log packets to the system log.</p>
<p>Tigera's (<strong><em>disclaimer:</em></strong> I work for Tigera) commercial product, CNX, which is built on Calico offers a... |
<p>I have setup a kubernetes cluster with three nodes. All nodes are Linux centos machines.</p>
<p>I need persistent volume to store data and I am trying to achive this.</p>
<p>I was following this tutorial. But it only covers a one node cluster.
<a href="https://kubernetes.io/docs/tutorials/stateful-application/mys... | <p>You asked for best practices and from what I've found I think that the best option would be white-listing the IP addresses. Since you do not want to do that, there are also some workarounds <a href="https://stackoverflow.com/questions/43295344/kubernetes-dynamic-persistent-volume-provisioning-using-nfs?rq=1">answers... |
<p>I created 3 vbox VM for testing k8s. Each vm has 2 netwoks: Nat and internal.
K8s was initialized with:</p>
<pre><code>kubeadm init --apiserver-advertise-address 192.168.1.1 --service-cidr 192.168.1.0/24 --pod-network-cidr 192.168.1.0/24
</code></pre>
<p>192.168.1.0/24 is the internal network.
Nodes were joined by... | <p>As per error string in your logs:</p>
<blockquote>
<p>E0629 09:25:07.658039 1 main.go:280] Error registering network:
failed to acquire lease: node "kub2" pod cidr not assigned</p>
</blockquote>
<p>It seems you used subnet <code>192.168.1.0/24</code> which was fully distributed for master node creati... |
<p>I have a repository with a Kubernetes deployment YAML. Pipelines run on each commit that builds and pushes an image into our repository, versioned with the commit (eg. <code>my_project:bm4a83</code>). Then I'm updating the deployment image</p>
<p><code>kubectl set image deployment/my_deployment my_deployment=my_pro... | <blockquote>
<p>What's a sensible workflow for managing this? Am I missing something entirely?</p>
</blockquote>
<p>Some of the answer depends on the kind of risk you're trying to drive down with any process you have in place. If it's "the cluster was wiped out by a hurricane and I need to recover my descriptors," t... |
<p>What setting up a new Kubernetes endpoint and clicking "Verify Connection" the error message:
"The Kubconfig does not contain user field. Please check the kubeconfig. " - is always displayed. </p>
<p>Have tried multiple ways of outputting the config file to no avail. I've also copy and pasted many sample config fil... | <p>This is followed by <a href="https://github.com/TsuyoshiUshio/KubernetesTask/issues/35" rel="nofollow noreferrer">TsuyoshiUshio/KubernetesTask issue 35</a></p>
<blockquote>
<p>I try to reproduce, however, I can't do it.<br>
I'm not sure, however, I can guess it might the mismatch of the version of the cluster/k... |
<p>Are there any third party tools for Kubernetes UI? Such as to view pods on the main page or to edit the config of an object?</p>
| <p>We are using kubernetic (www.kubernetic.com) in order to see/scale/delete kubernetes resources. It still has some issues with displaying correct information but in general it's nice.</p>
|
<p>I have a Kubernetes cluster running in minikube, I want to filter out all Logstash pods via Kubernetes API. Kubernetes API documentation is a bit confusing, I did some research and found out that I can use something like this, but I have been unsuccessful so far:</p>
<pre><code>localhost:8000/api/v1/namespaces/defa... | <blockquote>
<p>any ideas how to retrieve this?</p>
</blockquote>
<p>Since labels are defined in <code><name>=<value></code> pairs you need to supply both, as described in <a href="https://kubernetes.io/docs/concepts/overview/working-with-objects/labels/" rel="noreferrer">the documentation</a> (see the <... |
<p>Has any one seen this error <code>Error: forwarding ports: error upgrading connection: Upgrade request required</code> in <strong>Kubernetes</strong></p>
| <p>I have seen this before and there were a couple of issues to address:</p>
<ol>
<li><p>The Nginx that was proxying requests did not contain the following
config (required for HTTP2 support):</p>
<pre><code>proxy_set_header Upgrade 'websocket';
proxy_set_header Connection 'Upgrade';
</code></pre></li>
<li><p>And we ... |
<p>I am trying to deploy an app to kubernetes cluster and I want to store data in <strong>Persistent Volume</strong>. However, I am very confused about two parameters in the setup. Can someone explains what is the different between <strong>volumes.hostPath</strong> and <strong>volumeMounts.mountPath</strong>? I read so... | <p>The mount path is always the destination inside the Pod a volume gets mounted to.</p>
<p>I think the documentation is pretty clear on what hostPath does:</p>
<blockquote>
<p>A hostPath volume mounts a file or directory from the host node’s
filesystem into your Pod. This is not something that most Pods will
n... |
<p>Our kubernetes cluster recently crashed because of etcd "database size exceeded".</p>
<p>We succeeded to put everything back on with a "simple" etcd cluster endpoints defrag (<a href="https://coreos.com/etcd/docs/latest/op-guide/maintenance.html" rel="nofollow noreferrer">see here</a>).</p>
<p>Unfortunately everyt... | <p>They seem to be <code>snapshots</code> of a given state of your etcd cluster over time.</p>
<p>Sounds like they can be rotated. At least according to this:</p>
<blockquote>
<p>etcdserver: purge old snap.db files #7967
<a href="https://github.com/coreos/etcd/pull/7967" rel="nofollow noreferrer">https://github.c... |
<p>I am using <code>kubeadm</code> to deploy single node kubernetes 1.11 cluster.
I am unable to find <code>servicemonitor</code> resources.</p>
<pre><code>➜ kube-prometheus git:(master) ✗ kubectl get servicemonitor
error: the server doesn't have a resource type "servicemonitor"
➜ kube-prometheus git:(master) ✗ kub... | <p>The <code>ServiceMonitor</code> resource not part of Kubernetes itself. It is a custom resource which is part of the Prometheus operator <a href="https://github.com/coreos/prometheus-operator#customresourcedefinitions" rel="noreferrer">as described here</a>.</p>
<p>Make sure that you have installed the Prometheus o... |
<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>
| <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... |
<p>Here's the full error <code>Unable to connect to the server: dial tcp [::1]:8080: connectex: No connection could be made because the target machine actively refused it.</code></p>
<p>Here's my Kubectl config view</p>
<pre><code>apiVersion: v1
clusters: []
contexts:
- context:
cluster: ""
user: ""
name: d... | <p>Check out "<a href="https://medium.com/@JockDaRock/minikube-on-windows-10-with-hyper-v-6ef0f4dc158c" rel="nofollow noreferrer">Minikube on Windows 10 with Hyper-V</a>" by <a href="https://twitter.com/JockDaRock" rel="nofollow noreferrer">Jock Reed</a></p>
<p>The command to run, from a Windows CMD console as Adminis... |
<p>NodePort
This way of accessing Dashboard is only recommended for development environments in a single node setup.</p>
<p>Edit kubernetes-dashboard service.</p>
<p>$ kubectl -n kube-system edit service kubernetes-dashboard
You should see yaml representation of the service. Change type: ClusterIP to type: NodePort a... | <p>you can change it like this</p>
<pre><code>kubectl patch svc kubernetes-dashboard --type='json' -p '[{"op":"replace","path":"/spec/type","value":"NodePort"}]'
</code></pre>
|
<p>I have an image pushed to Google Container Registry, named <code>gcr.io/$(PROJECT_ID)/img-name:46d49ab</code>.</p>
<p>In my replication controller I have:</p>
<pre><code>apiVersion: v1
kind: ReplicationController
metadata:
name: go-server-rc
spec:
replicas: 3
selector:
name: go-server
version: v8
t... | <p><a href="https://kubernetes.io/docs/concepts/containers/images/#updating-images" rel="nofollow noreferrer">It's possible</a> to use the <code>latest</code> tag to ensure Kubernetes pulls the image each time it runs. Every time you create a new image tag it with <code>latest</code> and push it to the container regist... |
<p>I'm trying to learn my way around Kubernetes with Google Cloud Platform. I have a small Vue-based application working locally with the following <code>Dockerfile</code> and <code>docker-compose.yml</code>. </p>
<p>Building and bringing up this project locally works great. However, when using <code>kompose up</code>... | <p>You need to delete the <code>volumes:</code> block in your <code>docker-compose.yml</code> file.</p>
<p>The <code>volumes:</code> block in your <code>docker-compose.yml</code> directs Docker to take the contents of your local directory and mount them into the container, which hides everything that you add in the <c... |
<p>I created a cluster with kubeadm (well it's just a single node / master for now) however I seem to be having issues with authenticating as the admin user.</p>
<pre><code>KUBECONFIG=/etc/kubernetes/kubelet.conf kubectl get sa
No resources found.
Error from server (Forbidden): serviceaccounts is forbidden: User "syst... | <p>Found it: <code>export KUBECONFIG=/etc/kubernetes/admin.conf</code></p>
|
<p>I want to create a role to service account with context.<br>
My goal is to be able to run <code>kubectl get pods</code> with the context of the service account. </p>
<p>To do it I need:</p>
<ol>
<li>Create service account</li>
<li>Create role</li>
<li>Create bind role</li>
<li>Create context</li>
</ol>
<p>I crea... | <p>It appears the cluster maybe missing from your <code>~/.kube/config</code> file. If it were a permissions issue, I would expect to see either <code>error: You must be logged in to the server (Unauthorized)</code> or <code>Error from server (Forbidden)</code>.</p>
<p>The error you are seeing <code>The connection to ... |
<p>I am deploying a Spring boot application to Kubernetes. My Docker file is as follows.</p>
<pre><code>FROM alpine-jdk1.8:latest
RUN mkdir -p /ext/app
COPY target/app-service.war /ext/app
ENV JAVA_OPTS="" \
APPLICATION_ARGS=""
CMD java ${JAVA_OPTS} -jar /ext/app/app-service.war ${APPLICATIO... | <p>That is a good approach for secrets, but less so <a href="https://kubernetes.io/docs/tasks/configure-pod-container/configure-pod-configmap/" rel="nofollow noreferrer">for configMaps</a>.</p>
<p>If your war application can rely on environment variable, a possible approach is to convert that configMap into an rc file... |
<p>I am running an <code>Ingress</code>, which supposed to connect to images inside my Pods. When I do <code>describe</code> it looks fine e.g.</p>
<pre><code>$ kubectl describe svc solar-demo
Name: solar-demo
Namespace: default
Labels: <none>
Annotations: kubectl.kubernetes... | <p>In annotations, the config was missing:</p>
<pre><code>nginx.org/server-snippet: "proxy_ssl_verify off;"
</code></pre>
|
<p>I've lost the original 'kubeadm join' command when I previously ran <code>kubeadm init</code>. </p>
<p>How can I retrieve this value again?</p>
| <pre><code>kubeadm token create --print-join-command
</code></pre>
|
<p>Vert.x and kubernetes go hand in and hand. If I am using istio as a service mesh will Zipkin's request tracing be able to track communication done via the event bus?</p>
<p>client ->[rest/http1]-> service-A ->[eventbus]-> service-B</p>
<p>Will istio be able to trace requests done over the eventbus?</p>
<p><a href... | <p>tracing in your example would work only for requests made to service-A via HTTP protocol. Istio at the moment traces only HTTP requests. </p>
<p>You can trace event bus messages manually by creating spans inside message producers and receivers.
IIRC vert.x event bus does not support headers per message:</p>
<p><a ... |
<p>We are running kubernetes in aws and We kept some files in one of the kubernetes nodes(I know it's bad idea to keep data in the host machine instead of separate volume). For some unknown reason, kubernetes node state became NotReady. When I used <strong>describe node</strong> command, I got status of Memory pressure... | <p>The node status NotReady causes the health check failed from master node during almost 3 minutes. If you already collect the journal log from the node host, you can investigate why the node service is not responsing. I experienced some NotReady issues, They have various causes, such as networking issue, lack of reso... |
<p>We have a number of different REST-based services running in Azure within a Kubernetes (version 1.9.6) cluster. </p>
<p>Two of the services, let's say A and B needs to communicate with each other using REST-calls. Typically, something like the following:</p>
<pre><code>Client calls A (original request)
A calls B... | <p>So I ran into this as well.</p>
<p>Basically there is some sort of network timeout that happens on AKS that cuts all connections out of a pod. As you mentioned this results in seemingly random errors that are difficult to trouble shoot since you only get to see them once (as hitting the same service again results ... |
<p>I've followed the instructions to create an EKS cluster in AWS using Terraform.</p>
<p><a href="https://www.terraform.io/docs/providers/aws/guides/eks-getting-started.html" rel="nofollow noreferrer">https://www.terraform.io/docs/providers/aws/guides/eks-getting-started.html</a></p>
<p>I've also copied the output f... | <p>Exec auth was added here: <a href="https://github.com/kubernetes/client-go/commit/19c591bac28a94ca793a2f18a0cf0f2e800fad04" rel="noreferrer">https://github.com/kubernetes/client-go/commit/19c591bac28a94ca793a2f18a0cf0f2e800fad04</a></p>
<p>This is what is utilized for custom authentication plugins and was published... |
<p>I have been following this guide - <a href="https://cloud.google.com/sql/docs/postgres/connect-kubernetes-engine" rel="nofollow noreferrer">Connecting from Kubernetes Engine</a></p>
<p>And having an errors after all:</p>
<pre><code>$ kubectl describe pod | grep Warning
Warning FailedMount 4m (x15 ove... | <pre><code>- name: POSTGRES_DB_PASSWORD
valueFrom:
secretKeyRef:
name: cloudsql-db-credentials
key: password
</code></pre>
<p>Here, you set the environment variable from secrets. According to the error: </p>
<pre><code> Warning Failed 2m kubelet, gke-bar-dev-... |
<p>I am trying to run KeyCloak on Kubernetes using PostgreSQL as a database.</p>
<p>The files I am referring to are on the <a href="https://github.com/peterzandbergen/keycloak-kubernetes" rel="nofollow noreferrer">peterzandbergen/keycloak-kubernetes</a> project on GitHub.</p>
<p>I used <code>kompose</code> to generate ... | <p>After some experimenting I found out that using the name <strong>postgres</strong> in the keycloak-deployment.yaml file </p>
<pre><code>- env:
- name: DB_ADDR
value: postgres
</code></pre>
<p>messes things up and results in a strange expansion. After replacing this part of the yaml file with:</p>
<pre><... |
<blockquote>
<p>I am trying to use Cypress to test a React application inside a Kubernetes Pod.
I made two Containers inside the Pod. One for React application and one for the > Cypress test tool
Docker specification of the application is :</p>
</blockquote>
<pre><code>FROM node:9-slim AS app
ENV PORT 3000
EXPO... | <p>I would recommend you to check application health.</p>
<p>Add the third container with Ubuntu to your pod:</p>
<pre><code>apiVersion: v1
kind: Pod
metadata:
name: productlib-pod
spec:
restartPolicy: Never
containers:
- name: app-container
image: steinko/app-productlib:1
- name: cypress-co... |
<p>I have a running jenkins pod and i am trying to execute following commands:</p>
<pre><code>sudo kubectl --kubeconfig /opt/jenkins_home/admin.conf apply -f /opt/jenkins_home/ab-kubernetes/ab-back.yml
</code></pre>
<p>It is giving following error:</p>
<p><strong>Error from server (NotFound): the server could not fi... | <p>The problem is in versions, try to use the old version of the client or upgrade the server. kubectl supports one version forward and backward skew:</p>
<p>From <a href="https://github.com/kubernetes/community/blob/master/contributors/design-proposals/release/versioning.md#supported-releases-and-component-skew" rel=... |
<p>I ran the following code in the python shell but it is not showing up the docker/kubernetes pod logs:</p>
<pre><code>import logging
logging.basicConfig(level=logging.INFO)
logging.info("Test")
</code></pre>
<p>This is a simplified version of what I am trying to do which is essentially run one-off scripts/commands ... | <p>As <a href="https://stackoverflow.com/users/225016/matthew-l-daniel">Matthew L Daniel</a> wrote, you can cheat by using additional tools as a workaround to send your logs to stdout.</p>
<p>Also, you can import library sys and stream logs to stdout by this lib. There is an example of code:</p>
<pre><code>import log... |
<p>I have a container running on Kubernetes where I would like to run a command from my local terminal. The working directory of the container based on its yaml file is at say <code>/opt/gopath/src/a/</code>. However, I would like to run the command at directory <code>/opt/gopath/src/b/</code>. Additionally, I also nee... | <p>In case of static variables, I would suggest using <a href="https://kubernetes.io/docs/tasks/configure-pod-container/configure-pod-configmap/#define-pod-environment-variables-using-configmap-data" rel="noreferrer">Config maps</a>.</p>
<p>Since you need to use temporary variables from a local shell, there is no need... |
<p>When I run <code>nslookup</code> on my docker container, I get this error </p>
<pre><code> nslookup 10.0.96.xx
nslookup: can't resolve '(null)': Name does not resolve
Name: 10.0.96.xx
Address 1: 10.0.96.xx
</code></pre>
<p>I've read that the problem comes from docker which injects this on the <code>reso... | <p>i found a solution to this issue . on your Pod remove this params </p>
<blockquote>
<p>nameserver options searches</p>
</blockquote>
<p>and add thie one </p>
<pre><code>spec:
dnsPolicy: Default
</code></pre>
<p>it will inherit directly the DNS configuration . </p>
<p>you will be able to ping a external ... |
<p>I created a service account and I want to give it permissions to list pods: <code>kubectl get pods</code>. </p>
<p>I have these settings for service account, role and rolebinding:</p>
<p><strong>ServiceAccount.yaml</strong>: </p>
<pre><code>apiVersion: v1
kind: ServiceAccount
metadata:
name: myservice3
</code... | <p>The Role.yaml needed to have also <code>list</code>: </p>
<pre><code>kind: Role
apiVersion: rbac.authorization.k8s.io/v1beta1
metadata:
namespace: default
name: my-role
rules:
- apiGroups: ["", "extensions", "apps"]
resources: ["pods"]
verbs: ["get", "list"]
</code></pre>
<p><code>get</code> is a permi... |
<p>I'm new to k8s, so some of my terminology might be off. But basically, I'm trying to deploy a simple web api: one load balancer in front of n pods (where right now, n=1). </p>
<p>However, when I try to visit the load balancer's IP address it doesn't show my web application. When I run kubectl get deployments, I get... | <p>Your problem is that the container image <code>tlk8s.azurecr.io/devicecloudwebapi:v1</code> is in a private container registry. See the events at the bottom of the following command:</p>
<pre><code>$ kubectl describe po -l=app=tl-api
</code></pre>
<p>The official Kubernetes docs describe how to resolve this issue,... |
<p>I am playing around with Spring Cloud Data Flow. I have successfully deployed SCDF on Kubernetes using the related <a href="https://docs.spring.io/spring-cloud-dataflow-server-kubernetes/docs/1.5.0.RELEASE/reference/htmlsingle/#_available_applications" rel="nofollow noreferrer">documentation</a>. When registering th... | <p>Artem's response is very relevant. I wanted to also share a few other approaches specific to security and OOTB apps.</p>
<ol>
<li><p>In 1.6 SNAPSHOTs, we have recently added support via <a href="https://github.com/spring-cloud/spring-cloud-deployer-kubernetes/issues/236" rel="nofollow noreferrer">spring-cloud/spring... |
<p>I can't seem to get a node to join the cluster. </p>
<pre><code>[discovery] Trying to connect to API Server "10.0.2.15:6443"
[discovery] Created cluster-info discovery client, requesting info from "https://10.0.2.15:6443"
I0702 11:09:08.268102 10342 round_trippers.go:386] curl -k -v -XGET -H "Accept: application... | <p>Both machines are virtual machines and 10.02.15 is the NAT ip - which is the same for both machines (they are independent)...</p>
<p>Sigh...</p>
<p>In the event it is helpful to someone else:</p>
<pre><code>iptables -t raw -A OUTPUT -p tcp --dport 6443 -j TRACE
iptables -t raw -A PREROUTING -p tcp --dport 6443 -j... |
<p>I am trying to produce to a kafka broker which is running inside the container launched by kubernetes. I am playing with <code>KAFKA_ADVERTISED_LISTENERES</code> and <code>KAFKA_LISTERNERS</code>.</p>
<p>I tried setting these two env variables <code>KAFKA_ADVERTISED_LISTENERES</code> = <code>PLAINTEXT://<host-ip... | <p>I'm assuming you have a Kubernetes service, whose selector links the ingress flow to your Kafka Broker, that is exposing the <code>nodePort</code> (as opposed to <code>clusterIP</code>).
<a href="https://kubernetes.io/docs/concepts/services-networking/service/" rel="nofollow noreferrer">https://kubernetes.io/docs/co... |
<p>I have a AWS <strong>LoadBalancer</strong> which created using <code>Kube</code>, <code>Kops</code> and <code>AWS</code>.
protocl type for the <strong>ELB</strong> is <strong>tcp</strong>. this work fine for <code>http</code> requests, means I can access my site with <strong><a href="http://testing.example.com" rel=... | <p>In the Listener configuration, you are forwarding the default HTTP port <code>80</code> to port <code>30987</code> on the back-end server. So this tells me that the back-end server is listening for HTTP requests on port <code>30987</code>.</p>
<p>You then added an SSL listener on the default port <code>443</code> b... |
<p>I am very new to OpenWhisk and have some difficulties in the setup.
The Ngnix Pod is running in a CrashLoopBackOff because of an error in the Pod.</p>
<pre><code>2018/07/02 16:14:27 [emerg] 1#1: host not found in resolver "kube-dns.kube-system" in /etc/nginx/nginx.conf:41
nginx: [emerg] host not found in resolver ... | <p>Are you using the "OpenWhisk Deployment on Kubernetes (<a href="https://github.com/apache/incubator-openwhisk-deploy-kube" rel="nofollow noreferrer">https://github.com/apache/incubator-openwhisk-deploy-kube</a>) project? </p>
<p>I suspect you may be hitting the Kubernetes bug described in the <a href="https://gith... |
<p><strong>Scenario:</strong></p>
<p>I need to build a web-app, from which I can run/sop/delete/etc. containers in a cluster. So I installed <code>Kubernetes</code> and tested the API from the console. Everything seems working and looks fine. </p>
<p>Following the Docs, they write about Docker, but do I need it neces... | <p>Technically, you need a <em>container runtime</em> which respects <a href="https://kubernetes.io/blog/2016/12/container-runtime-interface-cri-in-kubernetes/" rel="noreferrer">CRI (Container Runtime Interface)</a>.</p>
<p><a href="https://i.stack.imgur.com/Z7aPG.png" rel="noreferrer"><img src="https://i.stack.imgur.c... |
<p>I currently have multiple AWS accounts each with it's own Kubernetes cluster. Unfortunately, when the clusters were initially deployed using kops VPCs were created with overlapping CIDR blocks. This normally wouldn't be a problem as each cluster essentially existed in it's own universe.</p>
<p>Things have changed a... | <p>Your understanding is correct: with kops, you can't change CIDR blocks of an existing cluster; it's stuck in the VPC in which it was created, and <a href="https://aws.amazon.com/premiumsupport/knowledge-center/vpc-ip-address-range/" rel="nofollow noreferrer">you can't change the CIDR block of a VPC</a>:</p>
<blockq... |
<p>I'm initiating a kubernetes cluster with:</p>
<pre><code>kubeadm init --pod-network-cidr=192.168.1.0/16 --apiserver-advertise-address=192.168.0.33
</code></pre>
<p>I'm not too familiar with networking concepts or CIDR, how do I determine an appropriate value for the pod CIDR?</p>
<p>I previously used <code>10.244... | <p>Regarding CIDR (<code>Classless Inter-Domain Routing</code>): That is just a notation to define the subnet / range of IP addresses that you want to use in your network.</p>
<p>If you want to use <code>/16</code>, you must be planning the creation of a fairly big Kubernetes cluster since that will give you <code>>... |
<p>I'm trying to deploy a simple python app to Google Container Engine:</p>
<p>I have created a cluster then run <code>kubectl create -f deployment.yaml</code>
It has been created a deployment pod on my cluster. After that i have created a service as: <code>kubectl create -f deployment.yaml</code></p>
<blockquote>
<p>H... | <p>you can first check if the pod is working by <code>curl podip:port</code>, in your scenario, should be <code>curl podip:8080</code>; if not work well, you have to check if the precess is bind 8080 port in the image you are using.</p>
<p>if it work, then try with service by <code>curl svcip:svcport</code>, in your s... |
<p>Done according to <a href="https://kubernetes.io/docs/tasks/administer-cluster/setup-ha-etcd-with-kubeadm/" rel="nofollow noreferrer">this article</a>.</p>
<p>I installed Kubernetes. Then installed etcd cluster that works via HTTPS and listens to the localhost interface only (reachable from inside any Docker contai... | <p>I have no idea why they didn't surface the "cannot read the <code>-cert</code> file" error, but you specified <code>/etc/kubernetes/pki/etcd/server.crt</code> in the options but did not volume mount <code>/etc/kubernetes/pki</code> into the container. For obvious reasons, kubernetes will not <em>automatically</em> v... |
<p>Having my cluster up and running on AWS EKS, I'm finding trouble running <code>helm init</code> with the following error:</p>
<pre><code>$ helm init --service-account tiller --upgrade
Error: error installing: deployments.extensions is forbidden: User "system:anonymous" cannot create deployments.extensions in the na... | <p>I was running <code>helm</code> version 2.8.2 when obtaining this error, upgrading to v2.9.1 fixed this!</p>
|
<p>We are now on our journey to break our monolith (on-prem pkg (rpm/ova)) into services (dockers).</p>
<p>In the process we are evaluation envoy/istio as our communication and security layer, it looks great when running as sidecar in k8s, or each service on a separate machie.</p>
<p>As we are going to deliver severa... | <p>You can <a href="https://istio.io/latest/docs/examples/virtual-machines/" rel="nofollow noreferrer">run part of your services on Kubernetes and part on VMs</a>.</p>
|
<p>I have been trying to follow the getting started guide to EKS.
When I tried to call kubectl get service I got the message: error: You must be logged in to the server (Unauthorized)
Here is what I did:<br>
1. Created the EKS cluster.<br>
2. Created the config file as follows:</p>
<pre><code>apiVersion: v1
clusters:... | <blockquote>
<p>When an Amazon EKS cluster is created, the IAM entity (user or role) that creates the cluster is added to the Kubernetes RBAC authorization table as the administrator. Initially, only that IAM user can make calls to the Kubernetes API server using kubectl.</p>
</blockquote>
<p><a href="https://docs.aws.... |
<p>I'd like to know if I could set up that a pod restarts when a secret is changed?</p>
<p>I'm using openshift 3.7.</p>
| <p>There is currently no mechanism for this. You could mount the secret as a volume and watch the file for changes and kill the process when that happens, requiring you to bake in specific logic to your application. This is probably not the best idea.</p>
<p>Alternatively you could write a controller as a sidecar and ... |
<p>I am provisioning a Kubernetes cluster from scratch (reasons). Its a local setup inside VM, and everything is fine, except the <code>master</code> node is created as schedulable.</p>
<p>I have tried assigning the <code>master</code> label and appropriate taint to node by passing required arguments to kubelet binary ... | <p>Taints get us a possibility to mark a node in order to prevent scheduler from using it for certain Pods with a <code>NoSchedule</code> parameter, and they have special values which Kubernetes Scheduler uses on the planning step. Pods by default cannot be spawned on nodes with taints until you will add <code>tolerati... |
<p>I'm using
<a href="https://github.com/Yolean/kubernetes-kafka" rel="noreferrer">https://github.com/Yolean/kubernetes-kafka</a>
to run kubernetes on minikube
I exposed an outside port and successfully used producers and consumers from outside the cluster</p>
<pre><code>➜ ~ kubectl get svc --namespace kafka
NAME ... | <p>You can access to the Service in the pod using the following ways. </p>
<ul>
<li><p>Using the env variables, </p>
<p><a href="https://kubernetes.io/docs/concepts/services-networking/service/#discovering-services" rel="noreferrer">https://kubernetes.io/docs/concepts/services-networking/service/#discovering-services... |
<p>I tried to remain on the free-tier of google cloud platform and it only permits 3 nodes and 30Gb of Storage in which where the cluster created, each nodes are mapped to each storage 10Gb each. </p>
<p>And when I tried to mount persistentVolume and Claims to existing Disks, the error shows :
<code>
Attach failed for... | <blockquote>
<p>And when I tried to mount persistentVolume and Claims to existing Disks, the error shows </p>
</blockquote>
<p>This error is happening because of <a href="https://kubernetes.io/docs/concepts/storage/persistent-volumes/" rel="nofollow noreferrer">this constraint</a> of PV on GCE:</p>
<pre><code>Impor... |
<p>Before I had one single vm (centos 7.4, hostname kube-2.novalocal,ip <code>172.50.10.10</code>), I installed both master and kubelet in it and I could access my ingress by <code>172.50.10.10/uaa/login</code>. Inside cluster, I use ClusterIP, and deployed ingress nginx as NodePort on ingress. Since it is redirect/rew... | <p>Usage of NodePort assumes that you are able to access all your pods, so you should be able to use both the <a href="http://kube-2.novalocal/uaa/login" rel="nofollow noreferrer">http://kube-2.novalocal/uaa/login</a> and the <a href="http://kube-3.novalocal/uaa/login" rel="nofollow noreferrer">http://kube-3.novalocal... |
<pre><code>root@master2:/home/osboxes# kubectl get pods --all-namespaces -o wide
NAMESPACE NAME READY STATUS RESTARTS AGE IP NODE
default hello-kubernetes-55857678b4-4xbgd 1/1 Running 1 18h 10.244.1.138 node
default hel... | <p>It seems to have used the wrong network interface.</p>
<p>I had to manually set <code>KUBELET_EXTRA_ARGS=--node-ip=ABCXYZ</code> in <code>/etc/default/kubernetes</code> on both the node and master (replace <code>abcxyz</code> with the appropriate IP address).</p>
<p>You can check they have the correct ip address w... |
<p>I log in successfully, but cannot pull:</p>
<pre><code>PS C:\Users\Me> docker login tlk8s.azurecr.io
Username (myUsername): Password:
Login Succeeded
PS C:\Users\Me> docker pull tlk8s.azurecr.io/devicecloudwebapi:v1
Error response from daemon: pull access denied for tlk8s.azurecr.io/devicecloudwebapi, reposit... | <p>Per documentation below, the Service Principal account must have at least <strong>Reader</strong> role to be able to pull images from the Azure Container Registry.</p>
<p><a href="https://learn.microsoft.com/en-us/azure/container-registry/container-registry-authentication" rel="nofollow noreferrer">https://learn.mi... |
<p>I'm trying to get my dokerized Rails app to run on Kubernetes hosted at GCP.</p>
<pre><code>kubectl apply -f k8s/webshop.yml
kubectl get pods
NAME READY STATUS RESTARTS AGE
shop-lcvxc 2/3 CrashLoopBackOff 23 1h
</code></pre>
<p>So far so good, but the app will... | <p>Containers share the port / network within a pod. So you can't have two processes listening on the same port.</p>
<p>Quite strangely your deployment yaml only specifies the <code>app</code> container however you used the <code>shop</code> container as well in your question?</p>
|
<p>I followed <a href="https://blog.polyscribe.io/a-complete-guide-to-deploying-elixir-phoenix-applications-on-kubernetes-part-1-setting-up-d88b35b64dcd" rel="noreferrer">this</a> series of articles to create a deployment at Google Cloud. Everything is working as expected, except phoenix channels.</p>
<p>No errors on ... | <p>You may need to increase the response timeout for your <a href="https://cloud.google.com/compute/docs/load-balancing/http/#timeouts_and_retries" rel="nofollow noreferrer">backend service</a> on GCP.</p>
<p>By default, the timeout was set at 30sec and was causing the same problem for me.</p>
|
<p>Is there any documentation out there on sending logs from containers in K8s to an external ELK cluster running on EC2 instances? </p>
<p>We're in the process of trying to Kubernetes set up and I'm trying to figure out how to get the logging to work correctly. We already have an ELK stack setup on EC2 for current ve... | <p>I am also working on the same cause.</p>
<p>First you should know what driver is being used by your docker containers to manage the logs (json driver/ journald etc - read <a href="https://docs.docker.com/v17.09/engine/admin/logging/overview/" rel="nofollow noreferrer">here</a>).</p>
<p>After that you should use so... |
<p>I'm new with fluentd/elasticsearch stack and I'm trying to deploy it on kubernetes. While I've managed to do that, I'm having a problem that not all pod/container logs are showing up on elasticsearch (I'm using Kibana for data visualisation). In other words, I'm able to see logs from "default" kubernetes pods like ... | <p>I am using fluent bit for the same purpose and I met exactly the same problem quite a few days back. Fluent bit is a light weight version of fluentd, and what worked for me might work for you as well.</p>
<p>What was wrong with my fluent bit was the input configuration. For the tail plugins that tail into large log... |
<p>I am playing around with Spring Cloud Data Flow. I have successfully deployed SCDF on Kubernetes using the related <a href="https://docs.spring.io/spring-cloud-dataflow-server-kubernetes/docs/1.5.0.RELEASE/reference/htmlsingle/#_available_applications" rel="nofollow noreferrer">documentation</a>. When registering th... | <p>I would suggest to look into the situation from the other angle and provide credential from the Kubernetes to get access to your secured Microservice.</p>
<p>The problem of the current status-quo that all the resources has to be protected. </p>
<p>You can generate your own static password and store it in the <code... |
<p>Suppose I bootstrap a single master node with <code>kubelet</code> v1.10.3 in OpenStack cloud and I would like to have a "self-hosted" single etcd node for k8s necessities as a pod.</p>
<p>Before starting <code>kube-apiserver</code> component you need a working etcd instance, but of course you can't just perform <c... | <p>Message <code>Volume has not been added to the list of VolumesInUse in the node's volume status for volume.</code> says that attach/detach operations for that node are delegated to controller-manager only. Kubelet waits for attachment being made by controller but volume doesn't reach appropriate state because contro... |
<p>I'd like to confirm information of the authenticated user and assigned role and assigned cluster role. How can I do it?</p>
| <blockquote>
<p>information of the authenticated user</p>
</blockquote>
<p>When you see <a href="https://kubernetes.io/docs/tasks/access-application-cluster/configure-access-multiple-clusters/#define-clusters-users-and-contexts" rel="nofollow noreferrer">Define clusters, users, and contexts</a>, you realize you need... |
<p>I'm upgrading my elasticsearch on kubernetes cluster from 5.6.10 to elasticsearch 6.1.4. However, I can't even get es 6.1.4 to launch. </p>
<p>I keep getting the error <code>unknown setting [xpack.license.self_generated.type]</code>. </p>
<p><a href="https://www.elastic.co/guide/en/elasticsearch/reference/6.x/lice... | <p>As they are trying to communicate, you forgot to remove the configuration property from <code>config/elasticsearch.yml</code>. So, the full revised <code>command:</code> would be</p>
<pre><code>~/bin/elasticsearch-plugin remove x-pack
sed -i.bak -e /xpack.license.self_generated.type/d config/elasticsearch.yml
elast... |
<p>I'd like to know wether I'm able to restart a pod or do a deploy using api.</p>
<p>I'm running a container in a pod it's watching out on a directory. When a change is made on a directory, I need to restart the pod, or do a deploy.</p>
<p>This is my shell script snippet:</p>
<pre><code>while inotifywait -e modify ... | <p>Take a look at <a href="https://kubernetes.io/docs/tasks/inject-data-application/environment-variable-expose-pod-information/" rel="nofollow noreferrer">here</a>.</p>
<p>You can use metadata:</p>
<pre><code> - name: <name>
image: <image>
env:
- name: KUBERNETES_NAMESPACE
valueFrom:
... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.