prompt stringlengths 65 38.7k | response stringlengths 41 29.1k |
|---|---|
<p>Is there any known Java API to use Kubernetes helm (something like the great KubernetesClient from fabric8)? I am trying to initial helm commands from Java but I couldn't find anything that actually works... </p>
<p>Thanks,
Nir</p>
| <p>I've written <a href="https://microbean.github.io/microbean-helm" rel="noreferrer">microbean-helm</a>. This project:</p>
<ol>
<li>Checks out the <code>.proto</code> files from the Helm project…</li>
<li>…generates their gRPC Java bindings…</li>
<li>…and adds a couple of utility classes.</li>
</ol>
<p>The end resu... |
<p>I am running Kubernetes cluster 1.5.3 on IBM Bluemix, I would like to get the pod's resources utilization (memory and cpu) as raw data points. Is Kubernetes expose such API?</p>
<blockquote>
<p>➜ bluemix git:(master) ✗ k cluster-info
Kubernetes master is running at <a href="https://x:x" rel="nofollow noreferre... | <p>You can use <a href="https://github.com/kubernetes/heapster" rel="nofollow noreferrer">heapster</a> or <a href="https://github.com/kubernetes/kube-state-metrics" rel="nofollow noreferrer">kube-state-metrics</a> to achieve this. In many kubernetes deployments <code>heapster</code>is already installed. Both can be eas... |
<p>I'm deploying taefik to my kubernetes cluster using helm. Here's what I have at the moment:</p>
<pre><code>helm upgrade --install load-balancer --wait --set ssl.enabled=true,ssl.enforced=true,acme.enabled=true,acme.email=an@email.com stable/traefik
</code></pre>
<p>I'm trying to configure letsencrypt. According t... | <p>Turns out this is the chicken and the egg problem, described <a href="https://github.com/kubernetes/charts/issues/889" rel="noreferrer">here</a>.</p>
<p>For the helm chart, if <code>acme.enabled</code> is set to <code>true</code>, then Treafik will automatically generate and serve certificates for domains configure... |
<p>I have a question regarding Kubernetes YAML string operations.</p>
<p>I need to set an env variable based on the hostname of the container that is deployed and append a port number to this variable.</p>
<pre><code> env:
- name: MY_POD_NAME
valueFrom:
fieldRef:
fieldPath: metadata.name
<... | <p>You can do something like </p>
<pre><code>- name: MY_POD_NAME
valueFrom:
fieldRef:
fieldPath: metadata.name
- name: MY_POD_URI
value: "uri://$(MY_POD_NAME):9099/"
</code></pre>
<p>We are using that since K8s 1.4</p>
<p><code>$()</code> is processed by k8s itself, does not work everywhere, but works ... |
<p>I have an image runing a node.js application.
Inside this application I have the method /kill that kill the process ("process.exit();").</p>
<p>I have a deployment with three replicas running the above image.
I expose the deployment through a service of type NodePort.</p>
<p>When I call the /kill against one repli... | <p>It was not kubernetes who was retrying. It was the browser.</p>
<p>My node.js method implementation is:</p>
<pre><code>app.get("/kill", function(req, res, next){
logger.info("Somebody kill me.");
process.exit();
});
</code></pre>
<p>It is a get and it returns nothing. The browser detect an unexpected loos... |
<p>I am using the ansible scripts from <code>kargo</code> to build my cluster. I am unable to find where the data is stored in etcd3, despite looking over the verbose logs from the apiserver.</p>
<p>Here is what I see the hyperkube apiserver logs:</p>
<pre><code>$ docker logs k8s_kube-apiserver.fd19548d_kube-apiserve... | <p>To get keys and values stored in etcd v3 by kubernetes:</p>
<pre><code>ETCDCTL_API=3 etcdctl --endpoints=http://localhost:2379 get --prefix /registry
</code></pre>
<p>To get 1 specified key and value from etcd v3, e.g.:</p>
<pre><code>ETCDCTL_API=3 etcdctl --endpoints=http://localhost:2379 get /registry/services/... |
<p>Is there a way to assign the ingress to a specific node?</p>
<p>I know that it is possible to assign a pod to a specific node using <code>nodeSelectors</code> but that is not a valid option for ingress pods according to the spec.</p>
| <p><code>Ingress</code> is just a logical way to represent how to route traffic to service/pod. Regarding the question, <code>Ingress Controller</code> might be the right term on which you should check instead. </p>
<p>Read more here: <a href="https://github.com/kubernetes/ingress/tree/master/controllers" rel="nofollo... |
<p>I installed Kubernetes on my Ubuntu machine. For some debugging purposes I need to look at the kubelet log file (if there is any such file). </p>
<p>I have looked in <code>/var/logs</code> but I couldn't find a such file. Where could that be?</p>
| <p>If you run kubelet using <code>systemd</code>, then you could use the following method to see kubelet's logs:</p>
<pre><code># journalctl -u kubelet
</code></pre>
|
<p>We would need to get error events (like pod x is stuck in a crash loop, etc.) from Kubernetes itself.
On Google Container Engine we can not find those logs anywhere and therefor can not add monitoring to it.</p>
<p>Those Logs are usually provided by the API Server etc. which is not included in Google Logging. Is th... | <p>Mmm... <code>kubectl describe pod</code> and <code>kubectl logs pod</code> should work for you. What I learned about using them came from</p>
<p><a href="https://kukulinski.com/10-most-common-reasons-kubernetes-deployments-fail-part-1/" rel="nofollow noreferrer">https://kukulinski.com/10-most-common-reasons-kuberne... |
<p>I'm trying to put some code from my repo using Openshift online.
My build compiles fine, but the deployment is failing:</p>
<pre><code>error: update acceptor rejected nodejs-mongo-persistent-7: pods for rc "nodejs-mongo-persistent-7" took longer than 600 seconds to become ready
</code></pre>
<p>Looking at the even... | <p>First of all your Pod has the expose the ports the Liveness and Readiness probes need this is done in the Pod configuration.</p>
<blockquote>
<p>Liveness probes are executed by the kubelet, so all requests are made in the kubelet network namespace.</p>
</blockquote>
<p>Be sure not to run the probes on service po... |
<p>I'm trying to mount a vSphere volume in a pod but I keep getting:</p>
<pre><code>vsphere_volume_util.go:123] Cloud provider not initialized properly
</code></pre>
<p>/etc/kubernetes/environment/vsphere.conf</p>
<pre><code>[Global]
user="xxxxxx"
password="xxxxxx"
server="xxxxxx"
port="443"
inse... | <p>Seems I missed a lot of details:</p>
<ul>
<li>not only kubelet needs the cloudconfig but also the api-server and the controller-manager</li>
<li>the wwn disks by-id where missing. I had to enable that in the vSphere environment for the vm by setting disk.EnableUUID to TRUE</li>
<li>remove working-dirs entry. Seems ... |
<p>I have the following setup:</p>
<p>A docker image <code>omg/telperion</code> on docker hub
A kubernetes cluster (with 4 nodes, each with ~50GB RAM) and plenty resources</p>
<p>I followed tutorials to pull images from dockerhub to kubernetes</p>
<pre><code>SERVICE_NAME=telperion
DOCKER_SERVER="https://index.docker... | <p>You can access the logs of your pods with</p>
<pre><code>kubectl logs [podname] -p
</code></pre>
<p>the -p option will read the logs of the previous (crashed) instance</p>
<p>If the crash comes from the application, you should have useful logs in there.</p>
|
<p>I'm trying to deploy a grafana instance inside Kubernetes (server 1.6.4) in GCE. I'm using the following manifests:</p>
<p><strong>Deployment</strong> (<a href="https://pastebin.com/HL5KqXtT" rel="nofollow noreferrer">full version</a>):</p>
<pre><code>apiVersion: apps/v1beta1
kind: Deployment
metadata:
name: gra... | <p>Quoting from <a href="https://groups.google.com/g/kubernetes-users/c/lhVfyfCwEyo/m/b187gC84CwAJ" rel="nofollow noreferrer">here</a>:</p>
<blockquote>
<p>The GLBC requires that you define the port (in your case 3000) within the Pod specification.</p>
</blockquote>
<p>The solution is to declare the port used for t... |
<p>I have a container(Service C) which is listening to certain user event and based on the input it needs to spawn one or more instance of an another container(Service X). </p>
| <p>From your use case description, it looks like deployment is what you are looking for <a href="https://kubernetes.io/docs/concepts/workloads/controllers/deployment/" rel="nofollow noreferrer">https://kubernetes.io/docs/concepts/workloads/controllers/deployment/</a> . By using deployments you can dynamically scale the... |
<p>I have a simple Kubernetes deployment. It consists of a single, unreplicated container. There is no service exposing the container. The container has a health check which checks that it is correctly configured and can communicate with its external dependencies. I update the deployment using <code>kubectl apply</code... | <p>You have not mentioned your deployment strategy. But one generic problem I have seen with k8s deployments is that if the application fails to boot up, it will be restarted infinitely. So you might have to <code>kubectl delete deploy/******</code> explicitly after detecting the deployment failed status. (There is als... |
<p>Is there a way to pass a boolean value for spec.container.env.value ?
I want to override, with helm, a boolean env variables in a docker parent image (<a href="https://github.com/APSL/docker-thumbor" rel="noreferrer">https://github.com/APSL/docker-thumbor</a>) : UPLOAD_ENABLED</p>
<p>I made a simpler test</p>
<p>... | <p><code>spec.container.env.value</code> is defined as <code>string</code>. see here:
<a href="https://kubernetes.io/docs/api-reference/v1.6/#envvar-v1-core" rel="noreferrer">https://kubernetes.io/docs/api-reference/v1.6/#envvar-v1-core</a></p>
<p>You'd have to cast/convert/coerse to boolean in your container when usi... |
<p>Dockerfile:</p>
<pre><code>FROM openjdk:8-alpine
RUN apk update && \
apk add curl bash procps
ENV SPARK_VER 2.1.1
ENV HADOOP_VER 2.7
ENV SPARK_HOME /opt/spark
# Get Spark from US Apache mirror.
RUN mkdir -p /opt && \
cd /opt && \
curl http://www.us.apache.org/dist/spark/sp... | <p>The version of nohup that ships with alpine does not support '--'. You need to install a gnu version of nohup through the coreutils alpine package in your docker file like this:</p>
<p><code>RUN apk --update add coreutils
</code></p>
<p>Alternatively create your own start script that runs the class directly and ru... |
<p>I am using kubectl 1.6.4:</p>
<pre><code>$ kubectl version
Client Version: version.Info{Major:"1", Minor:"6", GitVersion:"v1.6.4", GitCommit:"d6f433224538d4f9ca2f7ae19b252e6fcb66a3ae", GitTreeState:"clean", BuildDate:"2017-05-19T18:44:27Z", GoVersion:"go1.7.5", Compiler:"gc", Platform:"darwin/amd64"}
Server Version... | <p>Try deleting <code>~/.kube/schema</code> (I deleted <code>~/.kube/cache</code> as well, but I am pretty sure that had no effect). In my case, <code>~/.kube/schema</code> had several schemas:</p>
<pre><code>$ l schema/
total 0
drwxr-xr-x 6 dmitry staff 204B Jan 9 11:23 v1.4.7
drwxr-xr-x 8 dmitry staff 272B ... |
<p>I've installed kubernetes 1.2.0 with the following configuration</p>
<pre><code>export nodes="user@10.0.0.30 user@10.0.0.32"
export role="ai i"
export NUM_NODES=2
export SERVICE_CLUSTER_IP_RANGE=192.168.3.0/24
export FLANNEL_NET=172.16.0.0/16
export KUBE_PROXY_EXTRA_OPTS="--proxy-mode=iptables"
</code></pre>
<p>I'... | <p>This was added as an annotation in Kubernetes 1.5 (docs <a href="https://kubernetes.io/docs/tasks/access-application-cluster/create-external-load-balancer#annotation-to-modify-the-loadbalancer-behavior-for-preservation-of-source-ip" rel="nofollow noreferrer">here</a>).</p>
<p>In 1.7, it has graduated to GA, so you ... |
<p>Can a pod have two containers of different privilege level? For example Container 'A' is a regular container and Container 'B' is a privileged container that can alter the network stack. Both containers will be packaged in a single pod. Now if the pod's privileged parameter is set true, would it mean that both of th... | <p>The pod-level security context applies to all containers in the pod, but the per-container security context can override the settings for the individual container<a href="https://github.com/kubernetes/community/blob/master/contributors/design-proposals/pod-security-context.md" rel="nofollow noreferrer"> [1]</a>. </p... |
<p>What's the best way to get the IP addresses of the other kubernetes pods on a local network?</p>
<p>Currently, I'm using the following command and parsing the output: <code>kubectl describe pods</code>.</p>
<p>Unfortunately, the command above often takes many seconds to complete (at least 3, and often 30+ seconds)... | <p>Have you tried</p>
<pre><code>kubectl get pods -o wide
</code></pre>
<p>This also returns IP addresses of the pods. Since this does not return ALL information <code>describe</code> returns, this might be faster.</p>
|
<p>This is my cluster info</p>
<pre><code>kubectl cluster-info
Kubernetes master is running at https://129.146.10.66:6443
Heapster is running at https://129.146.10.66:6443/api/v1/proxy/namespaces/kube-system/services/heapster
KubeDNS is running at https://129.146.10.66:6443/api/v1/proxy/namespaces/kube-system/services... | <p>If you click any of the URLs provided by <code>kubectl cluster-info</code> you will see that your browser prompts you to accept an insecure TLS connection.</p>
<p>For HTTPs to work for this particular address you will need to buy a TLS certificate issued for the hostname (in this case, the IP address and you can't ... |
<p>I'm using Kubernetes in a Google Container Engine cluster and I can see in the Stackdriver logs that one of the Pods is falling over and automatically restarting because of an OutOfMemory exception.</p>
<p>Is there any standard way of monitoring these events?</p>
<p>I'm using <a href="https://github.com/kubernetes... | <p>According to our IT Sysadmin, most of the current solutions for real-time monitoring and alerting on pods failures are currently unstable or very lackluster.</p>
<p>We ended up developing a small script which uses the Slack.com webservice for mail notifications and such.</p>
<p>I am sorry if my answer is not a rea... |
<p>1.7 is around the corner according to the <a href="https://github.com/kubernetes/features/blob/master/release-1.7/release-1.7.md" rel="nofollow noreferrer">release plan</a>. I'm wondering which Docker versions will be supported. Up until now I got this information from the Changelogs External Dependency Version info... | <p>I asked the same question in the Kubernetes Google Groups and got an official answer.</p>
<p><a href="https://groups.google.com/forum/#!msg/kubernetes-dev/0_tLFqh0yao/EoU9094dBAAJ" rel="noreferrer">According to the sig-node team</a> Kubernetes will continue to support only Docker 1.12.x at the launch of Kubernetes ... |
<p>I have a Kubernetes cluster executing Jobs of different types (I'm not using <code>parallelism</code>, these are independent and unrelated jobs).</p>
<p>Each <code>Job</code> has a label <code>userid=xyz</code>, that's the id of the user who requested the job (users submit these requests trough my app, not to the c... | <p>You could use a <a href="https://kubernetes.io/docs/concepts/policy/resource-quotas/#object-count-quota" rel="nofollow noreferrer">ResourceQuota</a> to accomplish something similar.</p>
<p>There is no direct way to limit the job objects themselves using Resource Quota, but there may be other ways you can accomplish... |
<p>I would like to run a one-off container from the command line in my Kubernetes cluster. The equivalent of:</p>
<pre><code>docker run --rm -it centos /bin/bash
</code></pre>
<p>Is there a <code>kubectl</code> equivalent?</p>
| <p>The <code>kubectl</code> equivalent of</p>
<pre><code>docker run --rm -it centos /bin/bash
</code></pre>
<p>is</p>
<pre><code>kubectl run tmp-shell --restart=Never --rm -i --tty --image centos -- /bin/bash
</code></pre>
<p>Notes:</p>
<ul>
<li><p>This will create a Pod named <code>tmp-shell</code>. If you don't speci... |
<p>I have setup the mongodb replicaset on kubernetes with Statefulsets using this helm <a href="https://github.com/kubernetes/charts/tree/master/stable/mongodb-replicaset" rel="nofollow noreferrer">chart</a></p>
<p>I can access the mongo instance inside the cluster. But I'd like to open it for access to the external w... | <p>After spending some more time with the issue, I figured that the mongo endpoint in the above script was returning the replicaset's DNS' in the following format - 'mongo-release-mongodb-replicaset-0.mongo-release-mongodb-replicaset.default.svc.cluster.local:27017'. These addresses can only be resolved within the clus... |
<p>I am trying to deploy Postgres on Bluemix Container service (Kubernetes)</p>
<p>I have created the Image and deployed it through the following yaml file:</p>
<pre><code>apiVersion: v1
kind: Service
metadata:
name: tripbru-postgres
labels:
app: tripbruREST
spec:
ports:
- port: 5432
targetPort: 5... | <p>I solved it using "Pod" and not Deployment. I also changed hostPath and note the ephemeral "emptyDir" volume format (this is a test in free Kubernetes service by Bluemix so I can't use real volumes). This is the working yaml:</p>
<pre><code>apiVersion: v1
kind: Pod
metadata:
name: postgres
labels:
name: pos... |
<p>I have create a pipeline like below and please note that I have the script files namely- "backup_grafana.sh" and "gitPush.sh" in source code repository where the Jenkinsfile is present. But I am unable to execute the script because of the following error:-</p>
<pre><code>/home/jenkins/workspace/grafana-backup@tmp/d... | <p>If the command 'sh backup_grafana.sh' fails to execute when it actually should have successfully executed, here are two possible solutions.</p>
<p>1) Maybe you need a dot slash in front of those executable commands to tell your shell where they are. if they are not in your <code>$PATH</code>, you need to tell your ... |
<p>I am attempting to mount my Azure File Storage to a container using the method found here: <a href="https://github.com/kubernetes/kubernetes/tree/master/examples/volumes/azure_file" rel="nofollow noreferrer">https://github.com/kubernetes/kubernetes/tree/master/examples/volumes/azure_file</a></p>
<p>Upon pod creatio... | <p>I can't reproduce your error, but we can follow those steps to mount Azure file share to k8s container.<br>
1.create k8s via Azure new portal.<br>
2.SSH k8s master, create <code>secret</code>, create secret by k8s file: </p>
<p>In this yaml file, we should write storage account and key in it, and we should <strong... |
<p>I 'm Following <a href="https://kubernetes.io/docs/tasks/configure-pod-container/pull-image-private-registry/" rel="noreferrer">this guide</a> in order to set up a pod using minikube and pull an image from a private repository hosted at: hub.docker.com</p>
<p>When trying to set up a pod to pull the image i see <cod... | <p>The issue caused by the docker container which exits as soon as the "start" process finishes. i added a command that runs forever and it worked. This issue mentioned <a href="https://stackoverflow.com/questions/31870222/how-can-i-keep-container-%20running-on-kubernetes">here</a></p>
|
<p>My service is not connecting/directing traffic to pod. I have 'sshed' into the pod and the server is working properly but the service times out.</p>
<p>Deployment File:</p>
<pre><code>apiVersion: extensions/v1beta1
kind: Deployment
metadata:
name: venues
spec:
replicas: 1
strategy:
type: RollingUpdate
... | <p>Your selector in the service is wrong: you need to select a label of the deployment, not the container name. So</p>
<pre><code>selector:
app: venues
</code></pre>
<p>should work. Optionally you could add also <code>version: v0.3</code> if needed.</p>
|
<p>I can't find documentation on how to create user group on Kubernetes with <code>yaml</code> file. I'd like gather some authenticated users in group using their e-mail accounts.</p>
<p>I'd like to write in <code>yaml</code> something like :</p>
<pre><code> kind: GoupBinding
apiVersion: rbac.authorization.k8s.io/v1... | <p>Groups are determined by the configured authentication method. See <a href="https://kubernetes.io/docs/reference/access-authn-authz/authentication/" rel="nofollow noreferrer">https://kubernetes.io/docs/reference/access-authn-authz/authentication/</a> for details about how each authenticator determines the group memb... |
<p>I have a custom Kubernetes Cluster (deployed using <a href="https://kubernetes.io/docs/setup/independent/create-cluster-kubeadm/" rel="nofollow noreferrer">kubeadm</a>) running on Virtual Machines from an IAAS Provider. The Kubernetes Nodes have <em>no Internet facing IP Adresses</em> (except for the Master Node, wh... | <p>I couldn't think about any better solution than a VPN here. Especially since you have only one isolated node, it should be relatively easy to make the handshake happen between this node and your master.</p>
<p>Routing the traffic from "internal" nodes to this isolated node is also trivial. Because all nodes already... |
<p>I have a basic prometheus.yml file in my environment i.e ..</p>
<pre><code>###
apiVersion: v1
kind: ConfigMap
metadata:
creationTimestamp: null
name: prometheus-core
data:
prometheus.yml: |
global:
scrape_interval: 10s
scrape_timeout: 10s
evaluation_interval: 10s
rule_files:
-... | <p>Prometheus supports a Kubernetes service discovery mechanisms, see the <a href="https://prometheus.io/docs/operating/configuration/#%3Ckubernetes_sd_config%3E" rel="nofollow noreferrer">documentation</a> for details.
<br><br>
So instead of the <code>static_configs</code> section, you should add a section similar to ... |
<p>I'm running a SSE server on a VPS and it works perfectly, no problems at all, but due to scalability reasons I needed to move it to another server.</p>
<p>I moved the server to <strong>Google Cloud Platform/Google Container Engine</strong> and <strong>Kubernetes/Ingress</strong>. But now I've encountered that I can... | <p>Got it working by adding a long time on the timeout: 86,400 seconds. This is because it is a socket connection that needs to stay open and not a normal connection that would require less than 30 seconds to execute.</p>
|
<p>I wanted to play with <a href="https://kubernetes.io/docs/tasks/inject-data-application/podpreset/" rel="nofollow noreferrer">PodPreset</a> Kubernetes feature on my test cluster running version 1.6.6. Kube-apiserver is started with (included just the relevant part):</p>
<p><div class="snippet" data-lang="js" data-h... | <p>"settings.k8s.io/v1alpha1" API endpoint is enabled by default in 1.6.x. So you don't need to specify in runtime-config parameter.</p>
<p>Can you try without specifying anything in "runtime-config" parameter. You just need PodPreset in admission-control, which you have already.</p>
|
<p>I'm looking to fully understand the jobs in kubernetes.</p>
<p>I have successfully create and executed a job, but I do not see the use case.</p>
<p>Not being able to rerun a job or not being able to actively listen to it completion makes me think it is a bit difficult to manage.</p>
<p>Anyone using them? Which is... | <p>A job retries pods until they complete, so that you can tolerate errors that cause pods to be deleted.</p>
<p>If you want to run a job repeatedly and periodically, you can use <a href="https://kubernetes.io/docs/concepts/workloads/controllers/cron-jobs/" rel="nofollow noreferrer">CronJob alpha</a> or <a href="http:... |
<p>I have a Scala application that is using Spark 2.1 in standalone mode. The application will run for 2 hours and finish. It should be run once a month.</p>
<p>I found several approaches to combine Spark and Kubernetes: </p>
<ol>
<li>Use Apache Spark Helm Chart: <a href="https://github.com/kubernetes/charts/tree/mas... | <p>For standalone spark on Kubernetes, the two canonical samples that exist are:</p>
<ol>
<li><a href="https://github.com/kubernetes/charts/tree/master/stable/spark" rel="nofollow noreferrer">https://github.com/kubernetes/charts/tree/master/stable/spark</a></li>
<li><a href="https://github.com/kubernetes/examples/tree... |
<p>I have a GCP project with two subnets (VPC₁ and VPC₂). In VPC₁ I have a few GCE instances and in VPC₂ I have a GKE cluster.</p>
<p>I have established VPC Network Peering between both VPCs, and POD₁'s host node can reach VM₁ and vice-versa. Now I would like to be able to reach VM₁ from within POD₁, but unfortunately... | <p>Network routes are only effective within its VPC. Say request from pod1 reaches VM1, VPC1 do not know how to route the packet back to pod1. To solve this, just need to SNAT traffic from Pod CIDR range in VPC2 and heading to VPC1. </p>
<p>Here is a simple daemonset that can help to inject iptables rules to your GKE ... |
<ul>
<li>I have Azure Machine (kubernetes) who have Agent of 2 core, 1 GB. My two services are running on this Machine each have its own Postgres (Deplyment, Service, Pv, PVC).</li>
<li>I want to host my third service too on same machine.</li>
<li>So when I tried to create Postgres Deployment (this too have its own ser... | <p>You have to create one PVC per Deployment. Once a PVC has been <em>claimed</em>, it must be released before it can be used again.</p>
<p>In the case of AzureDisk, the auto-created volumes can only be mounted by a single node (<em>ReadWriteOnce</em> access mode) so there's one more constraint: each of your Deploymen... |
<p>We are running java based microservices and we have following scenario </p>
<ul>
<li>Application writes debug.log file to /opt/tomcat/logs/debuglog/debug.log and size of log file is 1GB/hour </li>
<li>Tomcat to write catalina.out , localhost_access_log and localhost.log and size of log is 1GB/hour for all of them<... | <p>You can use a single sidecar that runs something like <a href="http://www.fluentd.org/" rel="nofollow noreferrer">fluentd</a> or <a href="https://www.elastic.co/products/logstash" rel="nofollow noreferrer">logstash</a>.
Both are log ingestion tools that can be customized with several plugins, which allow you to rout... |
<p>The Kubernetes Dashboard allows users to see all secrets, including their raw values with just a couple clicks. These secrets will likely contain very sensitive data, such as production database passwords and private keys.</p>
<p>How do you limit users of the Dashboard, so that they can't see the sensitive data?</p... | <p>This is a <a href="https://github.com/kubernetes/dashboard/issues/964" rel="nofollow noreferrer">known issue</a> and it is simply not officially supported at the moment - the Dashboard is a super-user level administration tool. This <a href="https://github.com/kubernetes/dashboard/issues/964#issuecomment-292486020" ... |
<p>I have a Kubernetes cluster and have a running container (X). From this container i want to create a new namespace, deploy a pod in this name space and spawn container(Y). I know kubernetes provides REST APIs. however, i am exploring goClient to do the same and not sure how to use namespace creation api.</p>
| <pre><code>import (
"github.com/golang/glog"
"k8s.io/client-go/kubernetes"
"k8s.io/kubernetes/pkg/api/v1"
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
)
clientConfig, err := config.createClientConfigFromFile()
if err != nil {
glog.Fatalf("Failed to create a ClientConfig: %v. Exiting.", err)
}
... |
<p>Is it possible to use the python API to create a "custom object" in kubernetes?</p>
<p>Edit:</p>
<p>By custom objects I'm refering to <a href="https://kubernetes.io/docs/user-guide/thirdpartyresources/#creating-custom-objects" rel="nofollow noreferrer">this</a>.</p>
<p>Thank you.</p>
| <p><a href="https://github.com/kubernetes-incubator/client-python" rel="nofollow noreferrer">client-python</a> now supports TPRs. This is <a href="https://github.com/kubernetes-incubator/client-python/blob/master/examples/create_thirdparty_resource.md" rel="nofollow noreferrer">the example from the repo</a>:</p>
<pre>... |
<p>As an experiment I'm trying to run a docker container on Azure using the Azure Container Service and Kubernetes as the orchestrator. I'm running the official nginx image. Here are the steps I am taking:</p>
<p><code>
az group create --name test-group --location westus
az acs create --orchestrator-type=kubernetes --... | <p>If I understand it correctly, I think you are looking for <code>Nginx Ingress controller</code>.<br>
If we need TLS termination on Kubernetes, we can use ingress controller, on Azure we can use <code>Nginx Ingress controller</code>.<br>
To archive this, we can follow those steps:<br>
1 Deploy the Nginx Ingress contr... |
<p>I have one master and two worker node kubernetes cluster on <code>AWS</code>. And I have two environments (qc and prod) in the cluster and I created two namespaces.
I have the same service running on <code>qc</code>and <code>prod</code> namespaces.</p>
<p>I have created ingress for both namespaces.</p>
<pre><code>... | <p>I solved this by <a href="https://github.com/kubernetes/kubernetes/issues/17088" rel="nofollow noreferrer">https://github.com/kubernetes/kubernetes/issues/17088</a></p>
<p>An example, from a real document we use:</p>
<pre><code> apiVersion: extensions/v1beta1
kind: Ingress
metadata:
name: ingress
name... |
<p>I have a requirement that involves putting together uptime metrics for some of the pods in my Kubernetes cluster.</p>
<p>I am thinking of using the Kubernetes readiness checks and was curious if anyone has done anything similar?</p>
<p>Basically I am trying to generate reports that say this pod has had 95% uptime ... | <p>I would recommend checking out Prometheus, it is the most powerful way of monitoring internal services of Kubernetes cluster, resource usage (at host level, as well as Kubernetes API level), and, of course, your applications.</p>
<p>NB: for pod uptime, there is a generic <code>up</code> metric you can use.</p>
|
<p>how to ssh into nodes of Google container engine cluster? When i try ssh to the node using its ip address it says public key denied.</p>
<p>Can some one help me how to get the key to connect to nodes of google container cluster?</p>
| <p>You should use gcloud tool e.g:</p>
<pre><code>gcloud compute ssh <NODE_NAME> --zone <ZONE>
</code></pre>
|
<p>I am trying to host a simple Node.js app connected to MongoDB, I look on the web, I've found 2 different methods and some guides to do so:</p>
<ol>
<li><p>Different pods:</p>
<ul>
<li><a href="https://github.com/kubernetes/kubernetes/tree/master/examples/nodesjs-mongodb" rel="nofollow noreferrer">Example</a> from ... | <p>You should put them in different pods.</p>
<p>Being in different pods you can then scale up the number of replicas of the web application part to as many instances as you need and you will still have the one instance of MongoDB.</p>
<p>If you had them in the same pod, you wouldn't be able to scale up to multiple i... |
<p>I'm testing the bluemix container service. Since IBM provides a grafana/graphite for my account to collect cpu/mem stats on all of my containers, i naturally want to add my own statistics.</p>
<p>Is it possible to report custom stats form the kubernetes cluster or from inside my containers to the ibm graphite?</p>
| <p>according to the documentation you can/have-to use the coreOS prometheus-operator to provide a prometheus in your cluster and then add a prometheus datasource to grafana.</p>
<p>afaik you can not add the prometheus datasource to the metric.ng.bluemix.net grafana</p>
<p>WARNING: the current version of the linked co... |
<p>I'm using Kubernetes on Google Compute Engine and Stackdriver. The Kubernetes metrics show up in Stackdriver as custom metrics. I successfully set up a dashboard with charts that show a few custom metrics such as "node cpu reservation". I can even set up an aggregate mean of all node cpu reservations to see if my to... | <p>alerting on an aggregation of custom metrics is currently not available in Stackdriver. We are considering various solutions to the problem you're facing.
Note that sometimes it's possible to alert directly on symptoms of the problem rather than monitoring the underlying resources. For example, if you're concerned a... |
<p>Ok here is the story:</p>
<p>I am using minikube to host my application:</p>
<p>1 pod running redis (redis on ubuntu:14.04)</p>
<p>1 pod running my php application (php7-apache)</p>
<p>I realised that if I setup my redis pod first then my php pod, my php pod will have these extra env variables:</p>
<pre><code>R... | <p>Ooooook, got the answer.</p>
<p>Credits to @aschepis.</p>
<p>For some mysterious reason, if I name my deployment to be exactly "redis" in the redis pod, the env variables will be injected to other pods who comes later.</p>
<p>As long as I renamed the deployment to another name, things went back to normal...</p>
... |
<p>I am using the concourse helm build provided at <a href="https://github.com/kubernetes/charts/tree/master/stable/concourse" rel="nofollow noreferrer">https://github.com/kubernetes/charts/tree/master/stable/concourse</a> to setup concourse inside of our kubernetes cluster. I have been able to get the setup working a... | <p>After plenty of investigation I have found that the the nodePort service is actually working and it is just my antivirus (Sophos) that is silently blocking the response from the <code>events</code> request.</p>
|
<p>I have a Scala application that is using Spark 2.1 in standalone mode. The application will run for 2 hours and finish. It should be run once a month.</p>
<p>I found several approaches to combine Spark and Kubernetes: </p>
<ol>
<li>Use Apache Spark Helm Chart: <a href="https://github.com/kubernetes/charts/tree/mas... | <p>I first tried the simplest idea: Approach 3:</p>
<p><em>Build my own Docker image of my application including the Spark binary: <a href="http://blog.madhukaraphatak.com/scaling-spark-with-kubernetes-part-5/" rel="nofollow noreferrer">http://blog.madhukaraphatak.com/scaling-spark-with-kubernetes-part-5/</a></em></p>... |
<p>Here <a href="https://quay.io/repository/coreos/hyperkube?tab=tags" rel="nofollow noreferrer">https://quay.io/repository/coreos/hyperkube?tab=tags</a> you can see that
there are two tags for 1.6.6:</p>
<ul>
<li>v1.6.6_coreos.0</li>
<li>v1.6.6_coreos.1</li>
</ul>
<p>What is the meaning of 0 and 1?<br>
What is the d... | <p>According to <a href="https://github.com/coreos/kubernetes/releases" rel="nofollow noreferrer">https://github.com/coreos/kubernetes/releases</a> , these are identical images, but one was re-tagged to allow new hyperkube image build at quay.io . For details, please have a look into provided link.</p>
|
<p>I am running a kubernetes cluster with heapster and prometheus service.
I want to measure each container and pods start and end time but i could not find such statistics in prometheus.</p>
<p>I want to get these statistics through some api.</p>
<p>Does anyone know how can I get it ?</p>
| <p>The kube-state-metrics job exports various Kubernetes API relates stats for Prometheus, including in <code>kube_pod_info</code> the Pod start time:</p>
<p><a href="https://github.com/kubernetes/kube-state-metrics/blob/master/Documentation/pod-metrics.md" rel="nofollow noreferrer">https://github.com/kubernetes/kube-... |
<h3>Problem</h3>
<p>I am trying to enable authentication on my kubelet servers using Bearer Tokens (<strong>not</strong> X.509 client certificate authentication), and fail to understand the workflow.</p>
<h3>What I tried</h3>
<p>According to the documentation page <a href="https://kubernetes.io/docs/admin/kubelet-au... | <p>When making calls to the API server that require communication from the API server to the kubelet, that communication is done using the API server's client credentials, which only support x509 authentication to the kubelet.</p>
<p>The flags used to give the API server the credentials to use to contact the kubelet a... |
<p>I've got a kubernetes cluster which was set up with kops with 1.5, and then upgraded to 1.6.2. I'm trying to use PodPresets. The docs state the following requirements:</p>
<blockquote>
<ol>
<li>You have enabled the api type settings.k8s.io/v1alpha1/podpreset</li>
<li>You have enabled the admission controller ... | <p>You can list the API groups which are currently enabled in your cluster either with the <code>api-versions</code> kubectl command, or by sending a GET request to the <code>/apis</code> endpoint of your <code>kube-apiserver</code>:</p>
<pre class="lang-none prettyprint-override"><code>$ curl localhost:8080/apis
{
... |
<p>I've created a Kubernetes cluster on AWS with the <a href="https://github.com/kubernetes/kops" rel="noreferrer">kops</a> tool. I need to get hold of its certificate authority certificate and key though, how do I export these files through kops?</p>
<p>I've tried the following, but it fails saying that yaml output f... | <p>I found out that kops stores the CA key and certificate in its S3 bucket, so you can download said files like so:</p>
<pre><code>aws s3 cp s3://$BUCKET/$CLUSTER/pki/private/ca/$KEY.key ca.key
aws s3 cp s3://$BUCKET/$CLUSTER/pki/issued/ca/$CERT.crt ca.crt
</code></pre>
<p>You need to determine the S3 bucket used by... |
<p>Is it possible to share a single persistent volume claim (PVC) between two apps (each using a pod)?</p>
<p>I read: <a href="https://stackoverflow.com/questions/35364367/share-persistent-volume-claims-amongst-containers-in-kubernetes-openshift">Share persistent volume claims amongst containers in Kubernetes/OpenShif... | <p>So the error seems to be caused by the underlying storage you are using, in this case <code>EBS</code>. The OpenShift docs actually specifically state that this is the case for block storage, see <a href="https://docs.openshift.com/container-platform/3.5/security/storage.html#security-storage-block" rel="nofollow no... |
<p>Specific to Docker based deployment, what are the differences between those two? Since Google App Engine Flexible now also supports Dockerfile based deployment and it is also fully-managed service, seems it's more preferred option rather than configuring Kubernetes deployment on Container Engine, isn't it?</p>
<p>W... | <p>They are different things. App Engine Flexible is focused on application development - i.e. you have an application and you want to be deployed and managed by Google). On the other hand, Kubernetes is more about having your own infrastructure. Obviously, you can also deploy applications in Kubernetes but, as it's yo... |
<p>I have a bunch of pods running in the same cluster. Sometimes there are not enough resources and some pods need to terminate. </p>
<p>That's OK, but how do I set the priority of which pods are killed first?</p>
<p>It usually kills my most important service first :\</p>
<p>Thanks!</p>
| <p>I suggest you take a look at <a href="https://github.com/kubernetes/community/blob/master/contributors/design-proposals/resource-qos.md" rel="nofollow noreferrer">resource QoS</a>.</p>
<p>Have you important stuff (including monitoring) specify limit=request which in turn will land them in the guaranteed QoS class.<... |
<p>After migrating the image type from container-vm to cos for the nodes of a GKE cluster, it seems no longer possible to mount a NFS volume for a pod.</p>
<p>The problem seems to be missing NFS client libraries, as a mount command from command line fails on all COS versions I tried (cos-stable-58-9334-62-0, cos-beta-... | <p>I've nicked the solution @saad-ali mentioned above, from the kubernetes project, to make this work.</p>
<p>To be concrete, I've added the following to my cloud-config:</p>
<pre><code># This script creates a chroot environment containing the tools needed to mount an nfs drive
- path: /tmp/mount_config.sh
permissi... |
<p>I have a google compute VM instance that will not stop or be killed. </p>
<p>I don't know where it came from and I can't delete it or pause it. I don't have anything running on it nor is has anything scheduled with it.</p>
<p>'gke-cluster-1-default-pool-....`
<a href="https://i.stack.imgur.com/HQxwf.png" rel="nofo... | <p>That is a VM from Google Container Engine. In the left menu, navigate to Container Engine and check if you have any clusters created. If a cluster was created and then removed it is possible that the VM did not get cleaned up properly.</p>
<p>In you dashboard, there should be an Activity tab. You can use this to fi... |
<p>I have a traefik.toml file defined as part of my traefik configmap. The snippet below is the kubernetes endpoint configuration with a labelselector defined:</p>
<pre><code>[kubernetes]
labelselector = "expose=internal"
</code></pre>
<p>When I check the traefik status page in this configuration, I see all ingress... | <p>As you have already found out, not passing <code>--kubernetes</code> makes things work for you. The reason is that this parameter not only enables the Kubernetes provider but also sets all defaults. <a href="http://docs.traefik.io/basics/#static-trfik-configuration" rel="nofollow noreferrer">As documented</a>, the c... |
<p>I am trying to update the existing deployments in Openshift using Kubernetes Client for Go. I am using the following JSON to update the replicas to 3:</p>
<p>JSON:</p>
<pre><code>{
"kind": "Deployment",
"spec": {
"template": {
"spec": {
"containers": {
"image": "docker.fmr.com\/fmr-... | <p>Normally when this happens it means there is something wrong with the definition. In your case the <code>containers</code> should be an array and not an object.</p>
|
<p>How can I use <code>kubectl</code> or the API to retrieve the current image for containers in a pod or deployment?</p>
<p>For example, in a deployment created with the below configuration, I want to retrieve the value <code>eu.gcr.io/test0/brain:latest</code>.</p>
<pre><code>apiVersion: v1
kind: Deployment
m... | <p>From <code>kubectl</code> 1.6 the <code>-o wide</code> option does this, so</p>
<pre><code>kubectl get deployments -o wide
</code></pre>
<p>will show the current image in the output.</p>
|
<p>I've followed <a href="https://kubernetes.io/docs/tasks/tools/install-kubectl/" rel="noreferrer">guide</a> to install kubectl for testing in development environment on Ubuntu 16.04. </p>
<p>Now I would like to remove Kubectl from ubuntu.</p>
| <p>Depending on the method you chose in <a href="https://kubernetes.io/docs/tasks/tools/install-kubectl/" rel="noreferrer">https://kubernetes.io/docs/tasks/tools/install-kubectl/</a>, it can be any of these:</p>
<ul>
<li>Install kubectl binary via curl: <code>sudo rm /usr/local/bin/kubectl</code></li>
<li>Download as ... |
<p>I'm running traefik on AWS via kubernetes. It all works, except for my http=>https redirect configuration.</p>
<p>I have the following .toml file</p>
<pre><code>defaultEntryPoints = ["http", "https"]
[entryPoints]
[entryPoints.http]
address = ":80"
[entryPoints.http.redirect]
entryPoint = "https"
</... | <p>My <code>traefik.toml</code> config is similar to Corey's but is a little simpler. It works well for a catch-all redirect of <code>http</code> to <code>https</code>.</p>
<pre><code>defaultEntryPoints = ["http","https"]
[entryPoints]
[entryPoints.http]
address = ":80"
[entryPoints.http.redirect]
entryP... |
<p>I created a PersistentVolume sourced from a Google Compute Engine persistent disk that I already formatted and provision with data. Kubernetes says the PersistentVolume is available.</p>
<pre><code>kind: PersistentVolume
apiVersion: v1
metadata:
name: models-1-0-0
labels:
name: models-1-0-0
spec:
capacity... | <p>I quickly realized that PersistentVolumeClaim defaults the <code>storageClassName</code> field to <code>standard</code> when not specified. However, when creating a PersistentVolume, <code>storageClassName</code> does not have a default, so the selector doesn't find a match.</p>
<p>The following worked for me:</p>
... |
<p>is there any way to avoid execution of an application deployed as DaemonSet on master?<br>
I have seen that this is the expected behavior, but I would like to avoid execution in some way. </p>
<p>Regular pods will not schedule on master but DaemonSet pods do. </p>
<p>If yes, is it possible to set this informat... | <p>From <a href="https://github.com/kubernetes/kubernetes/issues/29108" rel="nofollow noreferrer">https://github.com/kubernetes/kubernetes/issues/29108</a>, you can add a taint flag to your Master node kubelet, so the even the pods in the DaemonSet are not scheduled there</p>
<pre><code> --register-with-taints=node.... |
<p>I'm having trouble to create a persistent volume that I can use from different pods (1 write, another read).</p>
<p>Tried to use <code>gcePersistentDisk</code> directly in the pod spec like in the example on the k8s page (plus <code>readOnly</code>):</p>
<pre><code>apiVersion: v1
kind: Pod
metadata:
name: test-p... | <p>According to <a href="https://kubernetes.io/docs/concepts/storage/persistent-volumes/#access-modes" rel="noreferrer">https://kubernetes.io/docs/concepts/storage/persistent-volumes/#access-modes</a>, GCE Disks do not support ReadWriteMany. I am not sure if this explains the issue but I would advise you to try another... |
<p>I'd like to launch a Kubernetes job and give it a fixed deadline to finish. If the pod is still running when the deadline comes, I'd like the job to automatically be killed.</p>
<p>Does something like this exist? (At first I thought that the Job spec's <code>activeDeadlineSeconds</code> covered this use case, but n... | <p>You can self-impose timeouts on the container's entrypoint command by using GNU <code>timeout</code> utility.</p>
<p>For example the following Job that computes first 4000 digits of pi will time out after 10 seconds:</p>
<pre><code>apiVersion: batch/v1
kind: Job
metadata:
name: pi
spec:
template:
metadata:... |
<p>After following the link <a href="https://kubernetes.io/docs/tasks/access-application-cluster/load-balance-access-application-cluster/" rel="nofollow noreferrer">https://kubernetes.io/docs/tasks/access-application-cluster/load-balance-access-application-cluster/</a> to create a service and expose the replica set. </... | <p>That is the address of the ELB that was created for the service. If you go into the AWS console you should see an ELB that begins with that string. This will make your service externally accessible from outside your cluster.</p>
|
<p>is there any way to avoid execution of an application deployed as DaemonSet on master?<br>
I have seen that this is the expected behavior, but I would like to avoid execution in some way. </p>
<p>Regular pods will not schedule on master but DaemonSet pods do. </p>
<p>If yes, is it possible to set this informat... | <p>By <code>Even if it seems that the master is tainted I see that the application is always on master.</code>, I'm not certain if the DaemonSet was created before or after the taint.</p>
<p>If you tainted first and then created the DaemonSet, the pod should be repelled by the tainted node without further config. Othe... |
<p>I have a Go program that uses aws-sdk-go to talk to dynamodb. Dependencies are vendored. Go version 1.7.1. aws-sdk-go version 1.6.24. The program works as expected in all the following environments:</p>
<ul>
<li>dev box from shell (Arch Linux) </li>
<li>docker container running on my dev box (Docker 1.13.1) </li>... | <p>remember the "-n" when you do this:
echo -n key | base64</p>
|
<p>I want to benchmark my SSD using Fio (Flexible I/O) I/O benchmarking tool inside Docker containers. </p>
<p>I am running my Docker containers like </p>
<p><code>docker run -it -v /dev/nvme0n1:/mount saurabhd04/docker_fio</code> </p>
<p>where I am mounting my SSD as a Docker volume. </p>
<p>But, whenever I run fi... | <p>Mapping directories and files does not mean "mounting" them.</p>
<p>You need to follow 2 steps:</p>
<ol>
<li><p>Share the <code>/dev/nvme0n1</code> to the container</p>
<pre><code>docker run --cap-add SYS_ADMIN --device /dev/nvme0n1 -it saurabhd04/docker_fio
</code></pre></li>
<li><p>With the container running mo... |
<p>I'm following a course on PluralSight where the course author puts a docker image onto kubernetes and then access it via his browser. I'm trying to replicate what he does but I cannot manage to reach the website. I believe I might be connecting to the wrong IP.</p>
<p>I have a <code>ReplicationController</code> tha... | <p>If you want to access your service via the NodePort port, you need to open your firewall for that port (and that instance).</p>
<p>A better way is to create a service of type LoadBalancer (<code>--type=LoadBalancer</code>) and access it on the IP Google will give you.</p>
<p>Do not forget to delete the load balanc... |
<p>I'd like a webserver to be notified if Kubernetes kills a pod and for what reason e.g. DEADLINE_EXCEEDED or OOM. Does Kubernetes have webhook functionality for this or some other mechanism where I can be told when it does something. </p>
| <p>There isn't a webhook per-se, however there are kubernetes events that you can listen to.</p>
<p>Quick google turned up <a href="https://solinea.com/blog/tapping-kubernetes-events" rel="nofollow noreferrer">this article</a></p>
|
<p>I have configured the Node Exporter in Kubernetes and start monitoring using Prometheus, But in Prometheus all servers are showing as down with the error below:</p>
<blockquote>
<p>Get <a href="http://10.7.17.11:9100/metrics" rel="nofollow noreferrer">http://10.7.17.11:9100/metrics</a>: dial tcp 10.7.17.11:9100:
... | <p>Make sure firewall is not blocking port 9100.
Try to curl this URL from other nodes and from the prometheus pod</p>
|
<p>I'm now using kubernetes to run the Docker container.I just create the container and i use SSH connect to my pods. </p>
<p>I need to do some system config change so i need to reboot the container but when i`reboot the container it will lose all the data in the pod. kubernetes will run a new pod just like the Docke... | <p>You need to learn more about containers as your question suggests that you are not fully grasping the concepts.</p>
<ol>
<li>Running SSH in a container is an anti-pattern, a container is not a virtual machine. So remove the SSH server from it.</li>
<li>the fact that you run SSH indicates that you may be running mor... |
<p>I have created one <a href="https://cloud.google.com/solutions/jenkins-on-container-engine-tutorial" rel="nofollow noreferrer">cluster</a> in google container engine & in that i have deployed one pod having jenkins running in it. then configiured one job which will build,run,push & deploy <a href="https://cl... | <p>You are getting this error because the version of kubeAPI and version of kubectl is different. To get versions, edit Jenkins file present in the build directory to print version of kubectl client that has been used inside the jenkins slave envirnment while executing the job. In my case it was at <code>/continuous-d... |
<p>I have an agent (datadog agent but could be something else) running on all the nodes of my cluster, deployed through a DaemonSet. This agent is collecting diverse metrics about the host: cpu and memory usage, IO, which containers are running.</p>
<p>It can also collect custom metrics, by listening on a specific por... | <p>I use the exact same setup, <code>dd-agent</code> running as a DaemonSet in my kubernetes cluster. Using the same port mapping you commented <a href="https://stackoverflow.com/questions/44855220/sending-data-from-one-pod-to-another-pod-running-specifically-on-the-same-host#comment76761846_44857071">here</a>, you can... |
<p>Using Kubernetes 1.7.0, the intention here is to be able to deploy MySQL / MongoDB / etc, and use local disk as storage backing; while webheads, and processing pods can autoscale by Kubernetes. To these aims, I've</p>
<ul>
<li>Set up & deployed the <a href="https://github.com/kubernetes-incubator/external-stora... | <p>Unfortunately, no. You will need to specify node affinity so that the Pod lands on the node where the local storage is located. See the <a href="https://kubernetes.io/docs/concepts/configuration/assign-pod-node/#node-affinity-beta-feature" rel="nofollow noreferrer">docs on Node Affinity</a> to know what do add to th... |
<p>Links suggested i use minikube to install kubernetes. However i am confused if i should install this on my ubuntu host machine or on the vm provisioned with virtual box running on this host machine.
I want to know the pre-requisites for the install and how to go about it.
I am a newbie to kubernetes and pretty conf... | <p>You can try Kubernetes right away with Minikube. It will take just a few minutes to see Kubernetes running on your laptop or desktop. I tried it on my laptop with Ubuntu 16.04. I put it here <a href="https://gitlab.com/abushoeb/kubernetes/" rel="nofollow noreferrer">https://gitlab.com/abushoeb/kubernetes/</a> but fo... |
<p>Folks,
Is there an easier method to grab the external ip address of a service in Kubernetes, than to parsing the output of a kubectl output?</p>
<p><code>kubectl get services/foo --namespace=foo -o json</code></p>
<p>Thanks!</p>
| <p>Using kubectl is the easiest way to get the ingress IP addresses of your services. If you are looking to get just the IP addresses then you can do most of the parsing as part of the kubectl command itself.</p>
<pre><code>kubectl get svc foo -n foo \
-o jsonpath="{.status.loadBalancer.ingress[*].ip}"
</code></pr... |
<p>We are trying to deploy Mule Application on Kubernetes using Minikube. Could you please explain the steps to deploy on Kubernetes in windows environment.</p>
| <p>First of all you would need to install Minikube for Windows: <a href="https://github.com/kubernetes/minikube/releases" rel="nofollow noreferrer">https://github.com/kubernetes/minikube/releases</a></p>
<p>Then, install the API client <code>kubectl</code>: <a href="https://kubernetes.io/docs/tasks/tools/install-kubec... |
<p>I am learning kubernetes and using minikube to create single node cluster in my ubuntu machine. In my ubuntu machine Oracle Virtualbox is also installed. As I run</p>
<pre><code>$ minikube start
Starting local Kubernetes v1.6.4 cluster...
...
$ cat ~/.kube/config
apiVersion: v1
clusters:
- cluster:
certifica... | <p>You can debug using these steps:</p>
<ol>
<li><p><code>kubectl</code> talks to <code>kube-apiserver</code> at port 8443 to do its thing. Try <code>curl -k https://192.168.99.100:8443</code> and see if there's a positive response. If this fails, it means <code>kube-apiserver</code> isn't running at all. You can try ... |
<p>I have created an ACS Kubernetes cluster following the instructions here: <a href="https://learn.microsoft.com/en-us/azure/container-service/container-service-kubernetes-walkthrough" rel="nofollow noreferrer">https://learn.microsoft.com/en-us/azure/container-service/container-service-kubernetes-walkthrough</a> .</p>... | <p>You can use one of the k8s masters as a "bastion host" and avoid copying the keys over. Eg:</p>
<pre><code># In ~/.ssh/config
Host agent1_private_ip agent2_private_ip ....
IdentityFile ~/.ssh/<your_k8s_cluster_key>
ProxyCommand ssh user@master_public_ip -W %h:%p
</code></pre>
<p>Now just <code>ssh user@... |
<p>Can I run kubelet as a docker container based on kubernetes v1.6.6? if can do, how to create the image or where to get a image, and also how to run this image?</p>
<p>the following is my ops, but has some problems.</p>
<p>Dockerfile
<code>
FROM i71:5000/ubuntu:14.04
ADD iptables /usr/local/bin/iptables
ADD bin/kub... | <p>There is a official docker image called <code>hyperkube</code> which contains all Kubernetes binaries, see <a href="https://kubernetes.io/docs/getting-started-guides/scratch/#selecting-images" rel="nofollow noreferrer">https://kubernetes.io/docs/getting-started-guides/scratch/#selecting-images</a></p>
<p>You can fi... |
<p>Is there a way to view the history of pod Termination statuses? Eg. If I look at <code>pod describe</code> command I see output similar to this:</p>
<pre><code>State: Running
Started: Mon, 10 Jul 2017 13:09:20 +0300
Last State: Terminated
Reason: OOMKilled
Exit Code: 137
Started: ... | <p>Eviction events are Node events. That is why you don't see them in the Pod events. If you run <code>kubectl describe node <node_name></code> with the node the pod was running on, you can see the eviction events.</p>
<p>Test this: run a deployment that will constantly get OOMKilled:</p>
<pre><code>kubectl run... |
<p>I'd like to monitor my Kubernetes Service objects to ensure that they have > 0 Pods behind them in "Running" state.</p>
<p>However, to do this I would have to first group the Pods by service and then group them further by status. </p>
<p>I would also like to do this programatically (e.g. for each service in namesp... | <p>The examples I have seen for Prometheus service checks relied on the blackbox exporter:</p>
<p>The blackbox exporter will try a given URL on the service. If that succeeds, at least one pod is up and running.</p>
<p>See here for an example: <a href="https://github.com/prometheus/prometheus/blob/master/documentation... |
<p>I have an app running on Google Container Engine.</p>
<p>I would like to monitor number requests per second my api is receiving
how can I do this?</p>
<p>is there a way monitoring from historical metrics on <a href="https://cloudplatform.googleblog.com/2015/12/monitoring-Container-Engine-with-Google-Cloud-Monitori... | <p>Looking at <a href="https://kubernetes.io/docs/tasks/debug-application-cluster/logging-stackdriver/" rel="nofollow noreferrer">https://kubernetes.io/docs/tasks/debug-application-cluster/logging-stackdriver/</a> I see that Stackdriver is deployed in the cluster by default. It looks like that, according to <a href="ht... |
<p>Does anyone have experience using Chaos Monkey with Kubernetes? Curious as to how Chaos Monkey is setup, the outputs, reports, etc. Thanks in advance!</p>
| <p>I would suggest using kube-monkey (<a href="https://github.com/asobti/kube-monkey" rel="noreferrer">https://github.com/asobti/kube-monkey</a>)</p>
|
<p>I'm pushing out my Phoenix app to a Kubernetes cluster for testing via GitLab. I'd like to be able to run <code>mix ecto.migrate</code> in my <code>gitlab-ci.yml</code> script once my app and the postgres service are ready. Here's a snippet from the <code>gitlab-ci.yml</code> file:</p>
<pre><code>review:
stage: r... | <p>From a conceptual point of view I would:</p>
<ol>
<li><p>Configure a <a href="https://kubernetes.io/docs/tasks/configure-pod-container/configure-liveness-readiness-probes/#define-readiness-probes" rel="nofollow noreferrer">readiness probe</a> on my Postgres container, so that the Pod is not considered "Running" unt... |
<p>I recently started working on microservices. I am building my docker image and want to deploy it on kubernetes. while creating a pod.yaml file I started getting the below error.</p>
<p>Command : </p>
<pre><code>kubectl create -f podservice.yaml
</code></pre>
<p>Error :</p>
<pre><code>error: the path "podcpeservi... | <p>Tushar,</p>
<p>First you need to create the deployment yml file using one of the editor, then pass the file as argument for kubectl command.</p>
<p>eg.</p>
<p>kubernets team already created this deployment file. you use kubectl to deploy.</p>
<pre><code>kubectl apply -f https://k8s.io/examples/controllers/nginx-depl... |
<p>The <a href="https://kubernetes.io/docs/admin/authentication/#openid-connect-tokens" rel="nofollow noreferrer">Kubernetes documentation related to OpenID Connect</a> mentions that as part of setting things up you need to supply some parameters to the API server:</p>
<pre><code>--oidc-client-id: A client id that all... | <p>This can be explained from the kubernetes documentation on <a href="https://kubernetes.io/docs/admin/authentication/#openid-connect-tokens" rel="nofollow noreferrer">id tokens</a>.</p>
<p>As you can see, identity provider is a separate system. For example this can be MS Azure AD or Google as you have shown. </p>
<... |
<p>I am following <a href="https://kubernetes.io/docs/tasks/access-application-cluster/connecting-frontend-backend/" rel="noreferrer">this tutorial</a>.</p>
<p>My objective was to create a Deployment made with a custom container instead of the hello container.</p>
<p>I made this <code>my-custom-server-deployment.yaml... | <p>Try using <code>apiVersion: apps/v1beta1</code> instead. I believe Deployments is a still a beta feature.</p>
|
<p>I have a running pod and I want to change one of it's container's environment variable and made it work immediately. Can I achieve that? If I can, how to do that?</p>
| <p>Simply put and in kube terms, you can not.</p>
<p>Environment for linux process is established on process startup, and there are certainly no kube tools that can achieve such goal.
For example, if you make a change to your Deployment (I assume you use it to create pods) it will roll the underlying pods.</p>
<p>Now, ... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.