prompt stringlengths 65 38.7k | response stringlengths 41 29.1k |
|---|---|
<p>I read in many books and documentations[1][2] that a docker-container or a pod are considered to be disposable and have a short lifetime. why are they considered so ephemeral? In such case how can one run a containerized application in production ?</p>
<p>Besides, do the two terms disposable-container and immutab... | <blockquote>
<p>Besides, are the two terms disposable-container and immutable-container mean the same ?</p>
</blockquote>
<p>Immutable means once it's created, it cannot be changed. Disposable, in the context of your question, means it can be destroyed and replaced with little consequence. </p>
<p>These things are ... |
<p>I started minikube with k8s version 1.5.2 and I would like to downgrade my kubectl so that it is also 1.5.2. Currently when I run <code>kubectl version</code> I get:</p>
<pre><code>Client Version: version.Info{Major:"1", Minor:"7", GitVersion:"v1.7.5", GitCommit:"17d7182a7ccbb167074be7a87f0a68bd00d58d97", GitTreeS... | <p>You can just download the previous version binary and replace the one you have now.</p>
<p>Linux:</p>
<pre><code>curl -LO https://storage.googleapis.com/kubernetes-release/release/v1.5.2/bin/linux/amd64/kubectl
chmod +x ./kubectl
sudo mv ./kubectl /usr/local/bin/kubectl
</code></pre>
<p>macOS:</p>
<pre><code>cur... |
<p>I followed the experimental k8s install and it seems to work until I open the portal. Then applications and projects have the title bar but the main page body is just a spinning gear. How can I debug this?</p>
<p>Install instructions: <a href="https://github.com/spinnaker/spinnaker/tree/master/experimental/kuberne... | <p>Spinnaker's installation has improved dramatically over the past year. They now have a tool called <a href="https://github.com/spinnaker/halyard" rel="nofollow noreferrer">Halyard</a> that is designed to configure and deploy Spinnaker. </p>
<p>It can deploy directly into a Kubernetes cluster.</p>
<p>Installation... |
<p>I am gettting this error in kubectl <code>describe nodes nodename</code>. I just did a google search but nothing useful found , what does this mean.</p>
<p><code>Failed to update Node Allocatable Limits "": failed to set supported cgroup subsystems for cgroup : Failed to set config for supported subsystems : failed... | <p>It depends on the <code>kubectl/kubernetes</code> version: this was seen (and fixed) in <a href="https://github.com/kubernetes/kubernetes/issues/42701" rel="nofollow noreferrer">kubernetes issue 42701</a></p>
<p>1.6 should have been patched.
If this is not the same bug, the error message was also seen in <a href="h... |
<blockquote>
<p>cat configmap.yaml</p>
</blockquote>
<pre><code>apiVersion: v1
kind: ConfigMap
metadata:
name: product-api-configmap
data:
myvalue: "Hello World"
</code></pre>
<blockquote>
<p>helm install ./configmap.yaml</p>
</blockquote>
<p><code>Error: gzip: invalid header</code></p>
| <p>Change directory out of templates and the chart directory and then do</p>
<blockquote>
<p>helm install ./CHARTNAME</p>
</blockquote>
|
<p>I'm pretty new in kubernetes, I just install kubernetes via kubeadm and run dashboard UI but can't config access to it. Following docs I add line <code>--basic-auth-file=/etc/kubernetes/auth.csv</code> to /etc/kubernetes/manifests/kube-apiserver.yaml, create file and put in one string like <code>pass,admin,admin</co... | <p>Your file for basic authentication <code>/etc/kubernetes/auth.csv</code> is not available inside kube-apiserver pod's container. It should be mounted to pod's container as well as certificate folders. Just add it to volumes and volumeMounts sections:</p>
<pre><code> volumeMounts:
- mountPath: /etc/kubernetes... |
<p>I'm trying to exec into haproxy-ingress pod created from <a href="https://quay.io/jcmoraisjr/haproxy-ingress" rel="nofollow noreferrer">this</a> image, with this command:</p>
<p><code>kubectl -n kube-system exec -it haproxy-ingress-4122301161-bcd94 /bin/bash</code> </p>
<p>Then I get this message </p>
<blockquote... | <p>Yes, it's not that uncommon for container not to have bash available. Often you will find that when bash is not there, <code>/bin/sh</code> still is, as is the case for the image you mention. Thus using <code>kubectl -n kube-system exec -it haproxy-ingress-4122301161-bcd94 /bin/sh</code> should suffice.</p>
<p>That... |
<p>I'm a Kubernetes newbie trying to follow along with the Udacity tutorial class linked on the Kubernetes website.</p>
<p>I execute</p>
<pre><code>kubectl create -f pods/secure-monolith.yaml
</code></pre>
<p>That is referencing this official yaml file: <a href="https://github.com/udacity/ud615/blob/master/kubernete... | <p>I ran into the exact same problem but with a much simpler example.</p>
<p>Here's my yaml:</p>
<p><code>apiVersion: v1
kind: Pod
metadata:
name: nginx
spec:
containers:
- image: nginx
ports:
- containerPort: 80
</code></p>
<p>The command <code>kubectl create -f pod-nginx.yaml</code> returns:</p>
<p>... |
<p>I try to run on any Kube slave node:</p>
<pre><code>$ kubectl top nodes
</code></pre>
<p>And get an error:</p>
<pre><code>Error from server (Forbidden): User "system:node:ip-10-43-0-13" cannot get services/proxy in the namespace "kube-system". (get services http:heapster:)
</code></pre>
<p>On master node it work... | <p>To simply solve this problem(use kubectl top nodes in all slave nodes), you can copy the kubeconfig your kubectl is using on your master to all other slaves.</p>
<p>And to explain why you meet this problem, I think you are using kubelet's kubeconfig for your kubectl in slave nodes.(Correct me if not).</p>
<p>In k8... |
<p>I have installed helm 2.6.2 on the kubernetes 8 cluster. <code>helm init</code> worked fine. but when I run <code>helm list</code> it giving this error.</p>
<pre><code> helm list
Error: configmaps is forbidden: User "system:serviceaccount:kube-system:default" cannot list configmaps in the namespace "kube-system"
</... | <p>Once these commands:</p>
<pre><code>kubectl create serviceaccount --namespace kube-system tiller
kubectl create clusterrolebinding tiller-cluster-rule --clusterrole=cluster-admin --serviceaccount=kube-system:tiller
kubectl patch deploy --namespace kube-system tiller-deploy -p '{"spec":{"template":{"spec":{"serviceA... |
<p>I've just set up a single node Kubernetes cluster following the kubeadm guide to the letter. The cluster itself looks good, and all pods are running correctly:</p>
<pre><code>will@kubemaster:~$ sudo kubectl get pods --all-namespaces
NAMESPACE NAME READY STATUS RESTA... | <h3>Since v1.7, Dashboard can only be accessed over HTTPS by default.</h3>
<p>It is available at <a href="http://localhost:8001/api/v1/namespaces/kube-system/services/https:kubernetes-dashboard:/proxy/" rel="noreferrer">http://localhost:8001/api/v1/namespaces/kube-system/services/https:kubernetes-dashboard:/proxy/</a>... |
<p>I am really new to kubernetes and have testing app with redis and mongodb running in GCE. I would like to grap my log files with fluentd and send them to logz:</p>
<p>I use the following fluentd config file. I tested a similar version on my local machine.</p>
<pre><code><source>
@type tail
path /var/... | <p>This is not a permission issue but broken symlinks.
Kubernetes is using symbolic links from <code>/var/log/containers</code> to <code>/var/log/pods</code> to <code>/var/lib/docker/containers</code>. You can confirm this from any node of your cluster using <code>ls -la</code></p>
<p>Your DaemonSet configuration shou... |
<p>I have created the ubuntu docker image with Nginx, PHP and php-fpm configured in it. It is working fine when I am running it on Docker instance.</p>
<p>But when I run the same image in kubernetes, the php-fpm process receive the SIGKILL (9) signal and we are getting 502 Gateway errors.</p>
<p>I guess it is kuberne... | <p>You have a very low memory limit considering you want to run multiple PHP processes inside managed by php-fpm. It is very likely that your processes are killed due to this memory constraint. I would advise switching memory limit to something like 400Mi and checking again.</p>
|
<p>I have installed spinnaker and kubernetes as suggested in the manual <a href="https://www.spinnaker.io/guides/tutorials/codelabs/kubernetes-source-to-prod/" rel="nofollow noreferrer">https://www.spinnaker.io/guides/tutorials/codelabs/kubernetes-source-to-prod/</a> </p>
<p>Thing is, I cannot seem to be able to acces... | <p>I believe the issue is that the docker registry does not provide index services. Therefore you need to provide a list of all the images that you want to have available.</p>
<pre><code>dockerRegistry:
enabled: true
accounts:
- name: spinnaker-dockerhub
requiredGroupMembership: []
address: https://inde... |
<p>I have a K8s deployment that mounts a secret into <code>/etc/google-cloud-account</code> containing the Google auth JSON file to use from the application. When I try to run the deployment, I get the following error from my pod:</p>
<pre><code>1m 1m 1 kubelet, gke-development-cluster-default-pool-17f531d7-sj4x s... | <p>An alternative to <a href="https://stackoverflow.com/a/44557294/1845976">Dave Long's answer</a> are <a href="https://kubernetes.io/docs/concepts/storage/volumes/#projected" rel="nofollow noreferrer">projected volumes</a>:</p>
<pre><code>apiVersion: extensions/v1beta1
kind: Deployment
metadata:
# ...
spec:
repli... |
<p>I try to run on any Kube slave node:</p>
<pre><code>$ kubectl top nodes
</code></pre>
<p>And get an error:</p>
<pre><code>Error from server (Forbidden): User "system:node:ip-10-43-0-13" cannot get services/proxy in the namespace "kube-system". (get services http:heapster:)
</code></pre>
<p>On master node it work... | <p>I ended up with next:</p>
<ul>
<li>removed <code>NodeRestriction</code> from <code>kube-apiserver</code> <code>--admission-control</code> option</li>
<li>removed <code>Node</code> from <code>--authorization-mode</code> option, only <code>RBAC</code> left here</li>
<li>patched <code>system:node</code> role with <cod... |
<p>I still have a question about Kubernetes NodePort service.</p>
<p>NodePort: Exposes the service on <strong>each</strong> Node’s IP at a static port (the NodePort). A ClusterIP service, to which the NodePort service will route, is automatically created. You’ll be able to contact the NodePort service, from outside th... | <blockquote>
<p>If I have two Node: nodeA and nodeB, and if I deploy an app only on nodeA then create a NodePort service, then can I use both nodeA and nodeB ips to access this service?</p>
<p>I had some tests, the result is no....</p>
</blockquote>
<p>In that case, it sounds very much like one of three things is not h... |
<p>Using an <code>APIService</code> resource I registered an add-on API server with my core API Server. Now, for whatever reason, this add-on API server has become unresponsive. The problem is that <code>kubectl</code> works by getting information about all the versions of all the groups it can see when running <code>k... | <p>All Kubernetes objects' data is stored in etcd backend. Just delete unresponsive <code>APIService</code> from there. </p>
<p>You can find it in etcd version 3 the following way:</p>
<pre><code>$ ETCDCTL_API=3 etcdctl --endpoints=<etcd_ip>:2379 get / --prefix --keys-only | grep -i apiservice
/registry/apiregi... |
<p>I am attempting to configure Fabric to work inside of a Kubernetes cluster, and while I have everything standing up, I am having difficulting deploying chaincode (using composer-cli) to the network. It appears that the chaincode containers are not able to see the peer that created them.</p>
<pre><code>2017-10-10 2... | <p>I was able to get this working, through a combination of configuration parameters:</p>
<pre><code>CORE_PEER_ADDRESSAUTODETECT=true
CORE_PEER_TLS_SERVERHOSTOVERRIDE=%(hostname).peer
</code></pre>
<p>In addition, I needed to make sure NOT to set <code>CORE_PEER_CHAINCODELISTENADDRESS</code>, so that the peer's actua... |
<p>I just upgraded kubeadm and kubelet to v1.8.0. And install the dashboard following the official <a href="https://github.com/kubernetes/dashboard" rel="noreferrer">document</a>.</p>
<pre><code>$ kubectl apply -f https://raw.githubusercontent.com/kubernetes/dashboard/master/src/deploy/recommended/kubernetes-dashboard... | <blockquote>
<p>As of release 1.7 Dashboard supports user authentication based on:</p>
<ul>
<li><a href="https://github.com/kubernetes/dashboard/blob/v2.0.0/docs/user/access-control/README.md#authorization-header" rel="noreferrer"><code>Authorization: Bearer <token></code></a> header passed in every requ... |
<p>I have deployed a grpc service running on OpenShift Origin. And this backed by a OpenShift service. And the service is exposed with an OpenShift route. I am trying to make this pod available via a service and route that maps the container port (50051) to outside world on port 8080.</p>
<p>The image that the service... | <p>The router setups in OpenShift focus on <a href="https://docs.openshift.org/3.6/dev_guide/getting_traffic_into_cluster.html#using-a-router" rel="nofollow noreferrer">HTTP/HTTPS(SNI)/TLS(SNI)</a>. However it appears that you can use an <a href="https://docs.openshift.org/3.6/dev_guide/getting_traffic_into_cluster.htm... |
<p>I am running <code>etcd</code>, <code>kube-apiserver</code>, <code>kube-scheduler</code>, and <code>kube-controllermanager</code> on a master node as well as <code>kubelet</code> and <code>kube-proxy</code> on a minion node as follows (all kube binaries are from kubernetes 1.7.4):</p>
<pre><code># [master node]
./e... | <p>Maybe it is your flannel yaml file has something wrong,
you can try this to install your flannel,
check the old ip link </p>
<p><code>
ip link
</code></p>
<p>if it show flannel,please delete it </p>
<p><code>
ip link delete flannel.1
</code></p>
<p>and install , its default pod network cdir is 10.244.0.0/16</p>
... |
<p><strong>TL;DR</strong> for some reason every http service seems to have the path rewritten as <code>/</code></p>
<p>I'm pretty new to Kubernetes and trying to set up an ingress load balancer.</p>
<pre><code>Client Version: version.Info{Major:"1", Minor:"7", GitVersion:"v1.7.6", GitCommit:"4bc5e7f9a6c25dc4c03d4d656... | <p>I will answer the 2nd question.</p>
<p>The <em>extremely strange thing</em> is due to the HTTP header "Host" matters because you specified it in the <strong>rules</strong> section:</p>
<pre><code>rules:
- host: api.example.com <----- THIS
http:
paths:
- path: /my_service/*
ba... |
<p>cAdvisor reports 14GB for the memory used by Prometheus where as top reports 6.xGB.</p>
<p>Can someone explain why this discrepancy? </p>
<p>The documentatation of container_memory_usage_bytes says </p>
<pre><code>Current memory usage in bytes, including all memory regardless of when it was accessed
</code></pre>... | <p>Per the discussion <a href="https://github.com/google/cadvisor/issues/913" rel="nofollow noreferrer">here</a>, cAdvisor reports a <em>total</em> memory usage in bytes. </p>
<p>In your case, <em>cAdvisor</em> was reporting <code>1.4178545664e+10 Byte = 14.178545664 Gigabyte</code>. Note it was <code>e+10</code> so ... |
<p>So running and scaling a deployment running <strong>multiple pods</strong> on a <strong>single node</strong> works nicely, and when exposing the service with a type "nodePort" nicely balances requests to the virtual IP between the multiple pods on that individual node. </p>
<p>I've since added an additional node to... | <p>Take a look at <a href="https://github.com/kubernetes/contrib/blob/master/keepalived-vip/README.md" rel="nofollow noreferrer">Keepalived in Kubernetes</a>.</p>
<blockquote>
<p>The idea is to expose a Virtual IP (VIP) address per service, outside
of the kubernetes cluster. keepalived then uses VRRP to sync this
... |
<p>I am using the <a href="https://github.com/kubernetes-incubator/client-python/" rel="noreferrer">kubernetes python client</a>. In the event that kubernetes isn't available when my code starts up, I would like to retry the connection. </p>
<p>When the client is unable to connect, it throws what appears to be a <co... | <p>Your code has an indirect dependency on the <code>requests</code> package, and the <code>requests</code> package has a strange submodule called <code>requests.packages</code>. This used to contain copied source code from a number of dependencies, including <code>urllib3</code>, but they stopped doing that. They want... |
<p>What is purpose of pod-infra-container-image in kubernetes?</p>
<p>Official documentation says only: </p>
<blockquote>
<p>The image whose network/ipc namespaces containers in each pod will use. (default "gcr.io/google_containers/pause-amd64:3.0")</p>
</blockquote>
<p>but I don't understand exactly what it does ... | <p>The pause container, which image the <code>--pod-infra-container</code> flag selects, is used so that multiple containers can be launched in a pod, while sharing resources. It mostly does nothing, and unless you have a very good reason to replace it with something custom, you shouldn't. It mostly invokes the <code>p... |
<p>I setup a new kubernetes cluster on GKE using the <a href="https://github.com/kubernetes/ingress-nginx" rel="noreferrer">nginx-ingress</a> controller. TLS is not working, it's using the fake certificates.</p>
<p>There is a lot of configuration detail so I made a repo - <a href="https://github.com/jobevers/test_ssl_... | <p>Turns out that the ingress definition needs to look like:</p>
<pre><code>apiVersion: extensions/v1beta1
kind: Ingress
metadata:
name: test-ssl-ingress
annotations:
kubernetes.io/ingress.class: "nginx"
spec:
tls:
- hosts:
- app.example.com
secretName: tls-secret
rules:
- host: app.exa... |
<p>I am using a Kubernetes service, but I am a little confused about the parameter of <strong>External IPs</strong> in service:</p>
<p>If there are external IPs that route to one or more cluster nodes, Kubernetes services can be exposed on those external IPs. Traffic that ingresses into the cluster with the external I... | <p>You are right that they are both ways of exposing services externally, and that they will both reach all of the pods connected by the service in question, but the infrastructure that allows it is different.</p>
<p>With a LoadBalancer type, on cloud providers which support external load balancers, one will be provis... |
<p>I have two applications deployed in different namespace in Google Kontainer engine(GKE). I want to use a single ingress resource (Google Load Balancer) to point to both the application using path based routing. Is it possible to have backend kubernetes services in multiple namespace behind a single ingress resource.... | <p>You'll have to setup an nginx ingress controller and deploy ingress resources per each namespace: <a href="https://github.com/kubernetes/kubernetes/issues/17088#issuecomment-221393102" rel="nofollow noreferrer">https://github.com/kubernetes/kubernetes/issues/17088#issuecomment-221393102</a></p>
|
<p><strong>TL;DR</strong> for some reason every http service seems to have the path rewritten as <code>/</code></p>
<p>I'm pretty new to Kubernetes and trying to set up an ingress load balancer.</p>
<pre><code>Client Version: version.Info{Major:"1", Minor:"7", GitVersion:"v1.7.6", GitCommit:"4bc5e7f9a6c25dc4c03d4d656... | <p>Robert is right about the second question (Many thanks)</p>
<p>I just figured out the main question, why all my paths seemed to be rewritten to <code>/</code></p>
<p>It turns out that the path is sent to the server with the "path" as specified in the ingress configuration to the actual service.
So for example, whe... |
<p>I have the following persistent volume and volume claim:</p>
<pre><code>kind: PersistentVolume
apiVersion: v1
metadata:
name: kloud
spec:
capacity:
storage: 100Gi
accessModes:
- ReadWriteMany
persistentVolumeReclaimPolicy: Retain
nfs:
server: 172.21.51.42
path: /
readOnly: false
</code... | <p>You will need to setup the EFS-provisioner in your cluster. Mounting EFS is still not supported by the default Kubernetes distribution and as such you need this extension: <a href="https://github.com/kubernetes-incubator/external-storage/tree/master/aws/efs" rel="noreferrer">https://github.com/kubernetes-incubator/e... |
<p>We are trying to test if we can have 2 or more k8s cluster in the same AWS VPC and Subnets (public and privates) using kops solution <a href="https://github.com/kubernetes/kops" rel="nofollow noreferrer">https://github.com/kubernetes/kops</a></p>
<p>We build the cluster with no issues, but when we try to expose a s... | <p>Please refer to the kops <a href="https://github.com/kubernetes/kops/blob/master/docs/run_in_existing_vpc.md#shared-subnets" rel="nofollow noreferrer">documentation on shared subnets</a>:</p>
<blockquote>
<p>If you run in AWS private topology with shared subnets, and you would
like Kubernetes to provision resou... |
<p>I am attempting to configure Fabric to work inside of a Kubernetes cluster, and while I have everything standing up, I am having difficulting deploying chaincode (using composer-cli) to the network. It appears that the chaincode containers are not able to see the peer that created them.</p>
<pre><code>2017-10-10 2... | <p>As @christo4ferris indicated, Kubenetes is the basis for the IBM Blockchain developer experience. </p>
<p>All the scripts are available here:</p>
<p><a href="https://github.com/IBM-Blockchain/ibm-container-service/tree/master/cs-offerings/kube-configs" rel="nofollow noreferrer">https://github.com/IBM-Blockchain/ib... |
<p>I'm running <strong>kubernetes</strong> on bare-metal <strong>Debian</strong> (3 masters, 2 workers, PoC for now). I followed k8s-the-hard-way, and I'm running into the following problem on my kubelet: </p>
<blockquote>
<p>Failed to get system container stats for
"/system.slice/docker.service": failed to get cg... | <p>Try to start kubelet with</p>
<pre><code>--runtime-cgroups=/systemd/system.slice --kubelet-cgroups=/systemd/system.slice
</code></pre>
<p>I'm using this solution on RHEL7 with Kubelet 1.8.0 and Docker 1.12</p>
|
<p>I've been pulling my hair out over this for too many hours... I'm pretty new to kubernetes so I know I must be missing something.</p>
<p><strong>"ERROR: Job failed (system failure): the server does not allow access to the requested resource (post pods)"</strong></p>
<p>We have a GitLab instance setup on a VM, and ... | <p>Your client certificate has a usage for server auth instead of client auth. For your TLS client to use the certificate to authenticate to the Kubernetes apiserver it needs to provide a certificate with the client auth usage. </p>
|
<p>Is there any kubectl command to bootstrap yaml file for certain object?</p>
<p>For example </p>
<pre><code>kubectl generate deployment --yml
</code></pre>
<p>After which I would fill it with values I want.</p>
<p>Thanks</p>
| <p>You could try playing with:</p>
<pre><code>kubectl create <resourcetype> <otheroptions> --output=yaml --dry-run
</code></pre>
<p>See:</p>
<ul>
<li><a href="https://kubernetes.io/docs/reference/generated/kubectl/kubectl-commands#create" rel="nofollow noreferrer">https://kubernetes.io/docs/reference/genera... |
<p>I just created image using Docker file and for changing user I just used:</p>
<pre><code>USER myuser
</code></pre>
<p>We are using a directory to store data, we change that directory permission using:</p>
<pre><code>chown -R myuser:myuser /data-dir
</code></pre>
<p>This Docker file is for etcd, where we want /da... | <p>This is because of docker. It mounts volume with only root permission and you can change it with <code>chmod</code> but only after the container is started.</p>
<p>You can read more about it here <a href="https://github.com/moby/moby/issues/2259" rel="noreferrer">https://github.com/moby/moby/issues/2259</a>
This is... |
<p>I have a small problem and need to know what is the best way to approach this/solve my issue.</p>
<p>I have deployed few pods on Kubernetes and so far I have enjoyed learning about and working with Kubernetes. Did all the persistent volume, volume claim...etc. and can see my data on the host, as I need those files ... | <p>Depending on what exactly you are trying to achieve you could use <a href="https://kubernetes.io/docs/concepts/workloads/controllers/statefulset/" rel="noreferrer">Statefulsets</a> instead of Deployments. Each Pod spawn from the Statefulset's Pod template can have it's own separate PersistentVolumeClaim that is crea... |
<p>I have a running elasticsearch cluster and I am trying to connect kibana to this cluster (same node). Currently the page hangs when I try to open the service in my browser using :. . In my kibana pod logs, the last few log messages in the pod are:</p>
<pre><code>{"type":"log","@timestamp":"2017-10-13T17:23:46Z","ta... | <p>The issue here is that you exposed Elasticsearch on port 9200 but are trying to connect to port 9300 in your kibana.yml file.</p>
<p>You either need to edit your kibana.yml file to use:</p>
<pre><code>elasticsearch.url: http://elasticsearch:9200
</code></pre>
<p>Or change the port in the elasticsearch service to ... |
<p>I have had success before specifying the hosts in my elasticsearch.yaml file by IP (hardcoding address:port) but I was told this is bad practice. I am trying to switch to using just the pod names for my ES cluster and now the pods aren't discovered/used as master. I have a elasticsearch.yml configMap for all 3 pods ... | <p>You need to connect with the full dns name:</p>
<pre><code>es-0.elasticsearch-internal:9300
</code></pre>
|
<p>I am running Zookeeper in an OpenShift/Kubernetes environment. I have setup zookeeper as a <code>StatefulSet</code> in order to reliably persist config data. </p>
<p>I configured three servers in my <code>zoo.cfg</code> by hostname, but on startup, hostname resolution fails. I verified hostnames are indeed resolvab... | <p>I found a working solution for this issue. ZooKeeper reads the list of servers in the ensemble on startup and looks for its "own" entry. It then uses this entry to determine which port and interface to listen on.</p>
<pre><code>server.1=zookeeper-0.zookeeper-headless:2888:3888
server.2=zookeeper-1.zookeeper-headles... |
<p>How Can I enable batch/v2alpha1API for a google container engine cluster ?
Which is by passing</p>
<p><code>--runtime-config=batch/v2alpha1=true</code> </p>
<p>to the API server .</p>
<p>I'm using version kubernetes 1.7.6.
Where should I go to enable that !!!</p>
| <p>You cannot change the runtime configuration of the Kubernetes apiserver in Google Container Engine and by policy alpha APIs are not enabled because they have no official support policy. From <a href="https://kubernetes.io/docs/concepts/overview/kubernetes-api/" rel="nofollow noreferrer">https://kubernetes.io/docs/co... |
<p>My helm depends on another helm from public repository. I've installed it manually and put the command to documentation. But I'd like to do it automatically. </p>
<p>Is there some way to set such dependencies?</p>
| <p>You may take a look on helm <a href="https://docs.helm.sh/developing_charts/#chart-dependencies" rel="noreferrer">chart dependencies</a> with <a href="https://docs.helm.sh/chart_best_practices/#requirements-files" rel="noreferrer">requirements.yaml</a><br>
And as an example - <a href="https://github.com/kubernetes/c... |
<p>I have been trying to play around with creating secrets for Kubernetes cluster using the python client. I keep getting an error that says</p>
<pre><code>Traceback (most recent call last):
File "create_secrets.py", line 19, in <module>
api_response = v1.create_namespaced_secret(namespace, body)
File "/usr/loca... | <p>Almost everything that you have written is alright but pay attention to the message received from <code>kube-apiserver</code>:</p>
<blockquote>
<p>HTTP response body: {"kind":"Status","apiVersion":"v1","metadata":{},"status":"Failure","messag... |
<p>whilst 'hardening' the accounts - namely removing or toning down accounts with editor permissions on the projects I removed editor from what appears to be the kubernetes account that container engine uses on the back end of <code>gcloud</code> commands.</p>
<p>Once you remove the last role from an account it vanish... | <p>So ...</p>
<p>I played with recreating accounts etc. Eventually got Kubernetes working again.
A week later tried to use datastore and discovered that AppEngine was dead beyond dead.</p>
<p>The only recourse was to start a new project from scratch.</p>
<p>The answer to this question is (some may laugh at its self ... |
<p>We are interested in running certain commands as pods and services, as they start or stop. Using the life-cycle hooks in the yml files does not work for us, since these commands are not optional. We have considered running a watcher pod that uses the watch api to run these commands. But we can't figure out how to us... | <p>Run kube proxy to use curl without authentication</p>
<pre><code>kubectl proxy
</code></pre>
<p>List all events with a watch;</p>
<pre><code>curl -s 127.0.0.1:8001/api/v1/watch/events
</code></pre>
<p>Run the curl to watch the events and filter it with jq for pod starts and stops.</p>
<pre><code>curl -s 127.0... |
<p>I've created a JOB pod with 2 INIT containers
At pod creation, my job completed successfully but no sign of the init containers</p>
<p>To me, the job should have wait for the completion of the 2 init containers before starting</p>
<p>My job blueprint (taken from Kubernetes documentation) in case you'd like to repr... | <p>Try adding the annotation to the spec template rather than the Job object:</p>
<pre><code>apiVersion: batch/v1
kind: Job
metadata:
name: pi
spec:
template:
metadata:
name: pi
annotations:
pod.beta.kubernetes.io/init-containers: '[
{
"name": "init-myservice",
"imag... |
<p>I am trying to get my app running on minikube, reachable at the minikube ip address. Below are the commands I am using to get it running. It all works as I want it to (if I try to log in, it returns the expected 401 since the mongo DB is empty).</p>
<p>I would like to actually include a database in my app with, say... | <p>The nice way of doing it making use of the <code>initdb</code> infrastructure in the <code>mongo</code> image. The <code>mongo:3.2</code> includes an <a href="https://github.com/docker-library/mongo/blob/master/3.2/docker-entrypoint.sh" rel="noreferrer"><code>entrypoint</code> shell script</a> that iterates trough <... |
<p>I've created a JOB pod with 2 INIT containers
At pod creation, my job completed successfully but no sign of the init containers</p>
<p>To me, the job should have wait for the completion of the 2 init containers before starting</p>
<p>My job blueprint (taken from Kubernetes documentation) in case you'd like to repr... | <p>Your annotations are in the wrong place. Specifically for init containers, they should be defined in the pod metadata, whereas you have added it to the job metadata.</p>
<pre><code>apiVersion: batch/v1
kind: Job
metadata:
name: pi
spec:
template:
metadata:
name: pi
annotations:
pod.beta.... |
<h2>Background</h2>
<p>I recently migrated my Spring app to Spring Boot (w/ embedded Tomcat), and I am currently moving it into Kubernetes. As a part of the move into Kubernetes, I am separating out the Apache config into its own service and deployment in Kubernetes to act as a proxy for my Spring Boot app.</p>
<p>My... | <p>I figured it out. My mistake was assuming that <code>networkCIDR</code> was the IP address returned by <code>request.getRemoteAddr()</code>, when it was actually my k8s internal cluster IP. This makes sense given that the request is coming from Apache, which is also inside the cluster. The internal cluster IP was NO... |
<p>I really hope somebody would help me out with this question, as I have been trying to figure it out for days.</p>
<p>I have container running in kubernetes in GKE. In /var/log/containers/my_container.log, I have something like this (among some other logs with different formats):</p>
<pre><code>{"log":"17-Oct-2017;... | <p>I don't know the tool you're using, but it looks like first part of your regex does not match the exact format of the prefixed time in your log string.</p>
<p>Actually <code>\d{2}</code> will only match 2 digits.</p>
<p>To match the entire time prefix you may use <code>(?:\d{2}:){2}\d{2}\.\d{3}</code> instead.</p>... |
<p>I just heard of the native Kubernetes support in the future Docker version. I never used Kubernetes before, so I started reading about it. But I got a little bit confused: Kubernetes is described as <strong>orchestration</strong> tool and also as an alternative to Dockers <strong>swarm mode</strong>. </p>
<p>So if ... | <blockquote>
<p>So if Kubernetes does orchestration, is it also an alternative to
docker-compose? </p>
</blockquote>
<p>Short Answer: NO </p>
<p>It's not just orchestration, essentially <code>Kubernetes</code> is a production grade container orchestration and scheduling engine. It is far more advanced than <code>... |
<p>I want to setup a pre-defined PostgreSQL cluster in a bare meta kubernetes 1.7 with <a href="https://kubernetes.io/docs/concepts/storage/volumes/#local" rel="nofollow noreferrer">local PV</a> enable. I have three work nodes. I create local PV on each node and deploy the stateful set successfully (with some complex s... | <p>Based on the statefulset <a href="https://v1-7.docs.kubernetes.io/docs/api-reference/v1.7/#statefulset-v1beta1-apps" rel="noreferrer">API reference</a> </p>
<blockquote>
<p>volumeClaimTemplates is a list of claims that pods are allowed to reference. The StatefulSet controller is responsible for mapping network id... |
<p>I build docker images on one server and then load it onto to the nodes(using docker save and docker load cmds).</p>
<p>Then I make change to the dep_config file to pull it locally instead of repo.(by setting imagepullpolicy).</p>
<p>After that step I do "kubectl apply -f dep_config.yml".</p>
<p>Now, the pod resta... | <p>A common practice is to change a non-used label of the deployment using the <code>patch</code> command</p>
<pre><code>kubectl patch deployment your-deployment -p \
"{\"spec\":{\"template\":{\"metadata\":{\"labels\":{\"date\":\"$(date +%s)\"}}}}}"
</code></pre>
<p>Basically you can change anything that's inside th... |
<p>I'm trying to replace my legacy job scheduler with Kubernetes job and wondering how to write sequential jobs as a Kubernetes job.</p>
<p>First, I wrote the following script to execute <code>job1</code> and <code>job2</code> in the written order but it didn't work as I expected.</p>
<pre><code>apiVersion: batch/v1
... | <p>After a few attempts, I did this and that solved the basic problem (similar to what the OP has posted). This configuration ensures that <code>job-1</code> completes before <code>job-2</code> begins. If <code>job-1</code> fails, <code>job-2</code> container is not started. I still need to work on the retries and fail... |
<p>In kubernetes I can use a <a href="https://kubernetes.io/docs/concepts/storage/persistent-volumes/#persistentvolumeclaims" rel="noreferrer">PersistentVolumeClaim</a> to create some storage, which I can later mount in some container.</p>
<p>However if the user in the container is not root, that user will not be able... | <p>First, find out the UID number your process is running as.</p>
<p>Then you can tell Kubernetes to chown (sort of) the mount point of the volume for your pod by adding <a href="https://kubernetes.io/docs/reference/kubernetes-api/workload-resources/pod-v1/#security-context" rel="nofollow noreferrer"><code>.spec.securi... |
<p>I'm trying to start a dashboard inside <a href="http://labs.play-with-k8s.com/" rel="nofollow noreferrer">play-with-kubernetes</a></p>
<p>Commands I'm running:</p>
<h1>start admin node</h1>
<pre><code>kubeadm init --apiserver-advertise-address $(hostname -i)
</code></pre>
<h1>start network</h1>
<pre><code>kubec... | <p>You need heapster for dashboard to work. So execute these as well:</p>
<pre><code>kubectl apply -f https://github.com/kubernetes/heapster/raw/master/deploy/kube-config/rbac/heapster-rbac.yaml
kubectl apply -f https://github.com/kubernetes/heapster/raw/master/deploy/kube-config/influxdb/heapster.yaml
kubectl apply -... |
<p>I'm trying to create an ingress within minikube. I have already enabled the ingress add on and checked all the associated services and pods have been added and are running.</p>
<p>When I create the ingress I point it to a service.NodePort that is in the same namespace as the ingress. But when I describe the ingress... | <p>I found the solution to my question so i'll post just in case someone else comes across something similar.</p>
<p>I was trying to access the ingress through my minikube ip address (<code>minikube ip</code> to get the ip), this was providing a 404 because I was not using the host to navigate to it. </p>
<p>To solve... |
<p>This would be similar to putting a computer into a sleep mode. FYI: I'm asking this in the context of managing containers using Kubernetes.</p>
<p>The reason for asking is that we would like to run many interactive jobs and want to suspend these jobs when users are not actively working on them so that resources can... | <p>Yes, you can use <code>docker stop</code> and <code>docker start</code> commands. It would like you suspend pc.</p>
<p>All data produced inside container will be saved. But main process will receive <code>SIGTERM</code> signal. After docker start this process will be started again</p>
<p>Also take a look at <code>... |
<p>I have a cluster of Kubernetes with two web apps deployed , I can't understand the way of assign same port 80 and 443 for this apps for access everyone with you own domain, web1.com and web2.com redirects to specific service.
Looking in the web i found topics like a : Ingress Controller with Nginx Proxy reverse and ... | <p>I will assume you already have 2 <code>Service</code>s defined for your apps (<code>s1</code> and <code>s2</code> below).</p>
<p>Kubernetes <code>Ingress</code> supports <a href="https://kubernetes.io/docs/concepts/services-networking/ingress/#name-based-virtual-hosting" rel="nofollow noreferrer">named based virtua... |
<p>Attempting to create a set of resources based on a file via <code>oc create</code> fails if they already exist.</p>
<p>According to the <a href="https://docs.openshift.com/enterprise/3.2/cli_reference/basic_cli_operations.html#create" rel="noreferrer">docs here</a> <code>oc create</code> should:</p>
<blockquote>
... | <p>The documentation is perhaps a bit badly worded. What it is saying is that if you try and create an object of a specific type where an object of that type with that name already exists, your attempt to create the new one will be ignored.</p>
<p>The situation you have will occur if you tried to create multiple insta... |
<p>Referring to the kubernetes docs, under "Using the API -> Accessing the API -> Authenticating -> Authentication strategies -> Service Account Tokens", it says the following;</p>
<pre><code> --service-account-key-file A file containing a PEM encoded key for signing bearer tokens. If unspecified, the API server’s TLS... | <p>The controller manager creates the tokens, signing them with the private key and storing them in Secret API objects. </p>
<p>When the tokens are presented to the API server, the API server verifies the signature using the public key(s) set via flags. </p>
<p>Admission is unrelated to signing or verifying the token... |
<p>I have a multi-container pod in my kubernetes deployment:</p>
<ul>
<li>java</li>
<li>redis</li>
<li>nginx</li>
</ul>
<p>For every of those containers, there's a container with Prometheus exporter as well. </p>
<p>The question is how can I expose those ports to Prometheus if annotations section supports only one p... | <p>Here's an <a href="https://gist.github.com/bakins/5bf7d4e719f36c1c555d81134d8887eb" rel="noreferrer">example</a> job for Prometheus. Put it in your own config.</p>
<p>Next, add:</p>
<pre><code>annotations:
prometheus.io/scrape: 'true'
</code></pre>
<p>to your pod metadata.</p>
<p>And on every container, which... |
<p>I have nginx and php-fpm containers in Google Container Engine and I would like to run it through unix socket instead of network.</p>
<p>I also have the Google SQL Proxy container and it uses empty volume to provide connection to Google SQL databases through sockets placed on that volume that is shared with other c... | <p>I managed to get the approach you described working. I use a <code>emptyDir</code> in a <code>deployment</code> so a shared <code>/sock</code> folder is mounted to both nginx and fpm:</p>
<pre><code> - name: fpm
...
volumeMounts:
- name: php-socket
mountPath: /sock
...
- name: nginx
..... |
<p>We've setup the most recent versions of</p>
<ul>
<li>API Manager</li>
<li>Identity Server</li>
<li>Data Analytics Server</li>
</ul>
<p>in separate pods on a kubernetes cluster (we've used the existing scripts as a basis for creating the docker images), all sharing relevant MySQL databases hosted in another pod on ... | <p>I guess you haven't used any persistent storage for API Manager. When you create an API, the API artifact is created in the file system and stored in wso2am-2.1.0/repository/deployment/server/synapse-configs/default/api location. You need to have a persistent storage for 'wso2am-2.1.0/repository/deployment/server/... |
<p>I'm running a kubernetes 1.6.2 cluster across three nodes in different zones in GKE and I'm trying to deploy my statefulset where each pod in the statefulset gets a PV attached to it. The problem is that kubernetes is creating the PVs in the one zone where I don't have a node!</p>
<pre><code>$ kubectl describe node... | <p>There is a bug open for this issue <a href="https://github.com/kubernetes/kubernetes/issues/50115" rel="nofollow noreferrer">here</a>.</p>
<p>The workaround in the meantime is to set the <code>zones</code> parameter in your <code>StorageClass</code> to specify the exact zones where your Kubernetes cluster has nodes... |
<p>I've setup a NodePort service using the following config:</p>
<p><strong>wordpress-service.yaml</strong></p>
<pre><code>apiVersion: v1
kind: Service
metadata:
labels:
app: wordpress
name: wordpress
spec:
type: NodePort
ports:
- port: 80
targetPort: 80
protocol: TCP
selector:
app: ... | <blockquote>
<p>For Kubernetes on GCE:</p>
</blockquote>
<p>We had the same question regarding services of type NodePort: How do we access node port services from our own host?</p>
<p>@ivan.sim 's answer (nodeIp:nodePort) is on mark however, you still wouldn't be able to access your service unless you add a firewal... |
<p>I have to write a deployment file for my application which takes run time commands and arguments at runtime.
e.g. <code>./foo bar -a=A -b=B</code>
This is my deployment file :</p>
<pre><code>apiVersion: extensions/v1beta1
kind: Deployment
metadata:
name: foo
spec:
replicas: 1
template:
metadata:
lab... | <p>If you want start <code>./foo bar -a=A -b=B</code> in container, your deployment should contains</p>
<pre><code>- name: foo
image: username/image:tag
command: ["foo"]
args: ["bar", "-a=A", "-b=B"]
</code></pre>
<p><a href="https://kubernetes.io/docs/tasks/inject-data-application/define-command-argument-conta... |
<p>The supported versions are listed here:</p>
<p><a href="https://cloud.google.com/container-engine/supported-versions" rel="noreferrer">https://cloud.google.com/container-engine/supported-versions</a></p>
<p>but I'm wondering if there is a way to programatically get this list (besides scraping that page, I guess) v... | <p>The gcloud "get-server-config" will get you the data you want. Specifying the "--format" option can also return it in a way that's easy to parse:</p>
<pre><code>gcloud container get-server-config --zone=us-central1-f --format=json
</code></pre>
<p>If you wish to control when updates happen, the maintenance window ... |
<p>When installing <code>cryptography</code> package I get the following error:</p>
<pre><code>Invalid environment marker: platform_python_implementation != 'PyPy'
</code></pre>
<p>It seems upgrading setuptools would solve this. Is there a way I could edit Build Config YAML file so that <code>pip install --upgrade se... | <p>Run:</p>
<pre><code>oc set env bc/yourappname UPGRADE_PIP_TO_LATEST=true
</code></pre>
<p>See:</p>
<ul>
<li><a href="https://github.com/sclorg/s2i-python-container/tree/master/2.7" rel="noreferrer">https://github.com/sclorg/s2i-python-container/tree/master/2.7</a></li>
</ul>
<p>When you do this it should update ... |
<p>My Kubernetes pods and containers are not starting. They are stuck in with the status <code>ContainerCreating</code>. </p>
<p>I ran the command <code>kubectl describe po PODNAME</code>, which lists the events and I see the following error:</p>
<pre><code>Type Reason Message
Warning FailedSync... | <p>Check your resource limits. I faced the same issue and the reason in my case was because I was using <code>m</code> instead of <code>Mi</code> for memory limits and memory requests.</p>
|
<p>I set up Kubernetes on CoreOS on bare metal using the <a href="https://coreos.com/kubernetes/docs/latest/kubernetes-on-generic-platforms.html" rel="noreferrer">generic install scripts</a>. It's running the current stable release, 1298.6.0, with Kubernetes version 1.5.4.</p>
<p>We'd like to have a highly available m... | <p>If you are using Kubernetes 1.7 and above:</p>
<pre><code>kubectl taint node mymasternode node-role.kubernetes.io/master:NoSchedule-
</code></pre>
|
<p>Is there any way to deploy a particular version of Kubernetes to ACS in Azure?
Using Azure resource manager, or <code>az</code> command.</p>
<p>It doesn't seem like <a href="https://learn.microsoft.com/en-us/azure/templates/microsoft.containerservice/containerservices" rel="nofollow noreferrer">template format</a> ... | <p>You can specify the version in ACS in selected regions. See the template example.
<a href="https://github.com/weinong/azure-quickstart-templates/tree/master/101-acs-kubernetes-with-version" rel="nofollow noreferrer">https://github.com/weinong/azure-quickstart-templates/tree/master/101-acs-kubernetes-with-version</a>... |
<p>I want to create a kubernetes cluster.</p>
<p>I want to have a single cluster with master, worker and proxy nodes in High Availability with nodes in both locations.</p>
<p>Is it documented the maximum distance or latency supported between locations?
Additionally I would appreciate links to official documentation, ... | <p>There is no latency limitation between nodes in kubernetes cluster. They are configurable parameters.</p>
<p>For <a href="https://kubernetes.io/docs/admin/kubelet/" rel="nofollow noreferrer">kubelet</a> on worker node it is:</p>
<pre><code>--node-status-update-frequency duration Specifies how often kubelet post... |
<p>The <code>kubectl cp</code> command only seems to work when the pod is still running.
Is there a way to copy a directory of output files from a completed pod to my local machine?</p>
| <p>By definition not a <em>completed</em> Pod, as those are ephemeral, however the answer to your question is to change the definition of what "completed" means.</p>
<p>The most straightforward answer to your question is to either mount a network Volume into the Pod, so its files survive termination, or to have the Po... |
<p>I am trying to follow this short doc about how to use Gitlab CI with a Kubernetes Cluster that I am creating with Openstack: <a href="https://docs.gitlab.com/runner/install/kubernetes.html" rel="nofollow noreferrer">https://docs.gitlab.com/runner/install/kubernetes.html</a> </p>
<p>I manage to create it but any ti... | <p>Actual docs about having Gitlab CI running on a kubernetes cluster are not clear enough. </p>
<p>You need to run somewhere gitlab-runner register with the token you get from the Runner's admin page of your Gitlab instance and grab another token from resulting config (cat /etc/gitlab-runner/config.toml | grep token)... |
<p>The problem seems to have been <a href="https://stackoverflow.com/questions/33711700/how-to-prevent-two-volume-claims-to-claim-the-same-volume-on-kubernetes">solved a long time ago</a>, as the answer and the comments does not provide real solutions, I would like to get some help from experienced users</p>
<p>The er... | <p>Based on your description what you are experiencing is exactly what is supposed to happen.</p>
<p>You are using <code>gcePersistentDisk</code> in your <a href="https://gist.github.com/deesx/cb2b4180cc066c2e08d5cd0fbad06323#file-volume-yml" rel="noreferrer">PV/PVC definition</a>. The <code>accessMode</code> is <code... |
<p>I am currently using the Kubernetes Executor for Gitlab CI and since:</p>
<p><a href="https://docs.gitlab.com/runner/executors/kubernetes.html" rel="nofollow noreferrer">https://docs.gitlab.com/runner/executors/kubernetes.html</a>:"<em>At this time hostPath, PVC, configMap, and secret volume types are supported".</... | <p>Any type of PV can back a PVC. You need to create the PV by hand and then specify the name in <a href="https://kubernetes.io/docs/api-reference/v1.8/#persistentvolumeclaimspec-v1-core" rel="nofollow noreferrer"><code>.spec.volumeName</code></a> of the PVC (or use <code>.spec.selector</code> with labels). Like so:</p... |
<p>I have a kubernetes cluster that is running in out network and have setup an NFS server on another machine in the same network. I am able to ssh to any of the nodes in the cluster and mount from the server by running <code>sudo mount -t nfs 10.17.10.190:/export/test /mnt</code> but whenever my test pod tries to use ... | <p>It's probably because the uid used in your pod/container has not enough rights on the NFS server. </p>
<p>You can runAsUser as mentioned by @Giorgio or try to edit uid-range annotations of your namespace and fix a value (ex : 666). Like this every pod in your namespace
will run with uid 666. </p>
<p>Don't forget ... |
<p>I want to collect metrics for PODs in K8s. <code>kube-state-metrics</code> looks good. I was not able to follow the <a href="https://github.com/kubernetes/kube-state-metrics#setup" rel="noreferrer">README</a>. I struck after <code>make container</code>. Is there any simple way to deploy the <code>kube-state-metrics<... | <p>You're close.</p>
<p>Same page has a <code>Kubernetes Deployment</code> section.</p>
<p><a href="https://github.com/kubernetes/kube-state-metrics#kubernetes-deployment" rel="noreferrer">https://github.com/kubernetes/kube-state-metrics#kubernetes-deployment</a></p>
<p>Once you clone the github repository you simpl... |
<p>I have kubeDNS set up on a bare metal kubernetes cluster. I thought that would allow me to access services as described <a href="https://fabric8.io/guide/services.html#service-discovery-via-dns" rel="nofollow noreferrer">here</a> (http:// for those who don't want to follow the link), but when I run</p>
<pre><code>... | <p>The service discovery that you're trying to is documented at <a href="https://kubernetes.io/docs/concepts/services-networking/dns-pod-serv" rel="noreferrer">https://kubernetes.io/docs/concepts/services-networking/dns-pod-serv</a>ice, and is for communications <em>within</em> one pod talking to an existing service,... |
<p>I currently have GitLab omnibus setup on Docker. I plan to have HA for the same by adding it to Kubernetes and have persistence using Gluster. I have played around configuring Kubernetes with Gluster. Now it's time to bring GitLab into Kubernetes. GitLab uses PostgreSQL as the default db.</p>
<p>My query is that to... | <p>According to <a href="http://docs.gitlab.com/ce/install/kubernetes/gitlab_omnibus.html#introduction" rel="nofollow noreferrer">http://docs.gitlab.com/ce/install/kubernetes/gitlab_omnibus.html#introduction</a> <strong>you should use dedicated Redis and PostgreSQL</strong> HA clusters. Option b) and 1)</p>
<p>For les... |
<p>I'm getting following error which attaching azureVhd to kubernetes pod.</p>
<blockquote>
<p>error validating "dev-dev-mongo-rc.yaml": error validating data: found
invalid field azureVhd for v1.Volume; if you choose to ignore these
errors, turn validation off with --validate=false</p>
</blockquote>
<p>kuberne... | <p><p> You could find complete k8s azure disk mount example here:
<a href="https://github.com/andyzhangx/Demo/tree/master/linux/azuredisk" rel="nofollow noreferrer">https://github.com/andyzhangx/Demo/tree/master/linux/azuredisk</a></p>
<p><p> yaml config of azure disk Static Provisioning is as following:</p>
<pre><co... |
<p>I'm running Ubuntu 17.04 (zesty) on a Dell XPS 13 (3854 MB of RAM and Intel Core i5-5200U CPU @ 2.20GHz) and trying to start up Minikube, but I'm getting a couple errors when I try to start it up.</p>
<pre><code>➜ minikube version
minikube version: v0.22.3
➜ kubectl version
Client Version: version.Info{Major:"1"... | <p>This looks like an issue with your Virtualbox installation, have you tried reinstalling it?</p>
<pre><code>sudo apt-get purge virtualbox virtualbox-dkms
sudo apt-get install virtualbox-5.1
</code></pre>
|
<p>I am trying to setup a websocket connection to the Kubernetes Pod Exec API, based on the suggestions given in this SO post: <a href="https://stackoverflow.com/questions/34373472/how-to-execute-command-in-a-pod-kubernetes-using-api">How to execute command in a pod (kubernetes) using API?</a>.
Here's what I have done ... | <p>This is a known issue; <a href="https://github.com/kubernetes/kubernetes/issues/25126" rel="nofollow noreferrer"><code>kubectl proxy</code> does not support websockets</a>. (You can verify this easily by starting up <code>kubectl proxy</code> and then attempting <code>kubectl --server=http://127.0.0.1:8001 exec ...<... |
<p>When a container in a Pod is created in a Kubernetes cluster with a limit and request set, how aware can that container be of those limits and requests? Would an application running inside the container be able to get these limits and requests to, for example, reduce the amount of resources it uses if the limits and... | <p><a href="https://stackoverflow.com/questions/42187085/check-mem-limit-within-a-docker-container">Check mem_limit within a docker container</a> with the tl;dr of</p>
<pre><code>cat /sys/fs/cgroup/memory/memory.limit_in_bytes
</code></pre>
<p>will show the limit, and then presumably the <code>requests</code> value i... |
<p>I have successfully configured a Kubernetes cluster using <a href="https://github.com/kubernetes/kops" rel="nofollow noreferrer">Kops</a>.</p>
<p>However, I cannot find where to change the auto-generated admin password - how can I do this?</p>
| <p>At the moment there is no easy way to do that since there is no way via the Kops API to create a secret of type "Secret" (quite confusing I know). The only workaround is to change the credentials, in this case your password directly on your s3 configuration as explained here: </p>
<p><a href="https://github.com/kub... |
<p>I have recently installed minikube and kubectl. However when I run <code>kubectl get pods</code> or any other command related to kubectl I get the error</p>
<p><code>Unable to connect to the server: unexpected EOF</code></p>
<p>Does anyone know how to fix this?I am using Ubuntu server 16.04.Thanks in advance.</p>
| <p>The following steps can be used for further debugging.<br/> </p>
<ol>
<li><p>Check the minikube local cluster status using <code>minikube status</code> command.</p>
<pre><code> $: minikube status
minikube: Running
cluster: Running
kubectl: Correctly Configured: pointing to minikube-vm at 172.0.x.y
</code></pre>... |
<p>I have an upstream server that simply starts a chunked encoding response and sends a small chunk every second for 100 chunks.</p>
<p>When I hit the upstream server directly like so, all works fine.</p>
<pre><code>curl --raw 10.244.7.248:4000/test/stream
</code></pre>
<p>However, when I go through nginx like so, t... | <p>I determined that the connection is closed when the nginx configuration is reloaded, which happens periodically with the Kubernetes Nginx Ingress Controller. The nginx workers drain connections for 10 seconds which is not enough in this case. I filed an issue here
<a href="https://github.com/kubernetes/kubernetes/is... |
<p>Is there any tools/way to get CPU, MEM, NET metrics of <code>PODs</code>. Other than below links, is there any tools available</p>
<ul>
<li><a href="https://github.com/kubernetes/kube-state-metrics" rel="nofollow noreferrer"><code>kube-state-metrics</code></a> - Able to deploy but no useful POD metrics. You can see... | <p>You are looking for <a href="https://github.com/google/cadvisor" rel="nofollow noreferrer">cadvisor</a>.</p>
|
<p>Is it possible to configure a default namespace (other than "default") for a user in kubernetes?</p>
<p>Thank you.</p>
| <p>Yes, just set <code>.contexts[].context.namespace</code> in the kubeconfig file of the user.</p>
<p>You can do that manually with a text editor (<code>~/.kube/config</code>):</p>
<pre><code>apiVersion: v1
clusters:
...
contexts:
- context:
cluster: development
namespace: frontend
user: developer
name... |
<p>I am using <a href="https://github.com/cloudflare/cfssl" rel="nofollow noreferrer">cfssl</a> to generate CSR.</p>
<p>I have below json format</p>
<pre><code>{
"CN": "ambika",
"key": {
"algo": "ecdsa",
"size": 256
},
"names": [
{
"O": "system:masters"
}
]
}
root@vagrant-xenial64:~/bin# cat csr.js... | <p>since your running this in yaml file, you need to include based64 encoded value int he yaml file. <code>$(cat server.csr | base64 | tr -d "\n")</code></p>
<p>in the example page they are running it in the shell directly.</p>
<p><code>cat server.csr | base64 | tr -d '\n' > o</code> encode like this and include t... |
<p>I'm attempting to migrate over to Cloud SQL (Postgres). I have the following deployment in Kubernetes, having followed these instructions <a href="https://cloud.google.com/sql/docs/mysql/connect-container-engine" rel="nofollow noreferrer">https://cloud.google.com/sql/docs/mysql/connect-container-engine</a> : </p... | <p>You are missing (at least) one of the secrets needed to start up this Pod, namely <code>cloudsql-instance-credentials</code>.</p>
<p>From <a href="https://cloud.google.com/sql/docs/mysql/connect-container-engine" rel="nofollow noreferrer">https://cloud.google.com/sql/docs/mysql/connect-container-engine</a>:</p>
<b... |
<p>I am trying to configure a persistent disk for Kafka in Kubernetes, I need to set the mount path to /kafka/POD_NAME/. </p>
<p>I can get the pod name as explained <a href="https://kubernetes.io/docs/tasks/inject-data-application/environment-variable-expose-pod-information/" rel="nofollow noreferrer">here</a> from: ... | <p>The Downward API, as the name indicates, is used to expose extra kubernetes related information to the containers. What you want is for your yaml file definitions to have variable or dynamic values based on the runtime pods being launched. This is currently not possible.</p>
<p>You might want to try to do something... |
<p>I am a little unsure about how to ensure I do not have overlapping CIDRs when using kops to create multiple clusters.</p>
<p>I know it's possible to specify the <code>--cluster-cidr</code> when using the <a href="https://kubernetes.io/docs/admin/kube-controller-manager/" rel="nofollow noreferrer">kube-control-manag... | <p>First you check which CIDRs you are already using</p>
<pre><code>aws ec2 describe-vpcs | jq -cr '.Vpcs[] | [.CidrBlock, .VpcId, .Tags[0].Value]'
</code></pre>
<p>Than before you create the cluster, edit the main config</p>
<pre><code>kops edit cluster $NAME
</code></pre>
<p>Change networkCIDR, nonMasqueradeCIDR ... |
<p>Is there any way to set per-volume permissions/ownership in Kubernetes declaratively?</p>
<p>Usecase:</p>
<ul>
<li>a pod is composed of two containers, running as two distinct users/groups, both of them non-root, and are unable to <code>sudo</code></li>
<li>the containers mount a volume each, and need to create fi... | <p>One solution is to <strong>use init-container to change permissions of mounted directories</strong>.</p>
<p>The init-container would need to mount both volumes (from both containers), and do the needed <code>chown</code>/<code>chmod</code> operations.</p>
<p>Drawbacks:</p>
<ul>
<li>extra container that needs to b... |
<p>I have a Node app that's composed of several independent modules, talking to each other over AMQP. This app is started by an index.js file that instatiates every other index.js in the different folders of my project, which in turn instantiate the actual modules.</p>
<p>I've been reading about microservices and I'd ... | <p>There are several layers that you need to pass.</p>
<p>First, you need to containerize each microservice into its own container image. Usually you will use Docker for that.</p>
<p>Each app will have a separate Dockerfile which you will use to create docker images which you will push to docker image registries whic... |
<p>When a container in a Pod is created in a Kubernetes cluster with a limit and request set, how aware can that container be of those limits and requests? Would an application running inside the container be able to get these limits and requests to, for example, reduce the amount of resources it uses if the limits and... | <p>The <a href="https://kubernetes.io/docs/tasks/inject-data-application/downward-api-volume-expose-pod-information/" rel="nofollow noreferrer">Downwards API</a> can be used to pass the requests and limits to the container process as environment variables</p>
|
<p>I'm wondering how can install a package inside the minikube VM. I need some tools.
I have tried the /bin/toolbox container, but It does not have internet conexion.</p>
<pre><code>[root@docker-fedora-24 ~]# dnf update --verbose
cachedir: /var/cache/dnf
DNF version: 1.1.9
Cannot download 'https://mirrors.fedoraprojec... | <p>You can run minicube without VM on your local docker (if you use linux):</p>
<p><code>minikube start --vm-driver=none</code></p>
<p>A alternative, run <strong>toolbox</strong> with <code>docker run --net=host ...</code> to make network for container more <em>transparent</em>. Troubleshoot your internet connection ... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.