I have an application which does this: So Python program can start multiple long-lived processes on demand. If I stop main Python program and start again, it knows that sub-program-1.py should be started, because there is a record about status in DB that tells it. So simply it works fine when there is only one replica of Docker container, pod,
Tag: kubernetes
how to add curr timestamp to while loop in container in pod in kubernetes?
This command is where i need to insert into a file “success! Wed Jun 8 20:28:01 WAST 2022”,i.e. current timestamp. But it keeps writing ‘success date’ Answer You could use command substitution for this. That would be in shell or bash, the same. Additionally, you may need to escape the dollar sign, since $() has a special meaning in Kubernetes
Error CrushLoopBackOff to start k8s Dashboard
I try to install dashboard to clear private k8s cluster (without internet connection). I did according to this instruction https://github.com/kubernetes/dashboard. When start apply recomended.yaml: metrics scrapper start successfully, but dashboard show error CrashLoopBackOff permanently. Docker Version: 19.03.6 K8s version: 1.23.4 Containers status: Containers log: Worker-node logs from /var/log/syslog: Answer By default, the dashboard container is installed on the worker node.
Where can I get node exporter metrics description?
I’m new to monitoring the k8s cluster with prometheus, node exporter and so on. I want to know that what the metrics exactly mean for though the name of metrics are self descriptive. I already checked the github of node exporter, but I got not useful information. Where can I get the descriptions of node exporter metrics? Thanks Answer There
how read/reach/access a file from Kotlin when the application is deployed either in Kubernetes or Linux
Context: I successfully parse a json file while debugging/running locally in my Windows PC that way When I deployed it to either docker or AWS I get this error Is there a more reliable way to “navigate” to a file placed in resources folder? I mean someway it wouldn’t be affected either it is Windows/Linux/Kubernetes/etc? Answer The usual way to
Redirect logs of pods in my k8s to a file with pod name
I was trying to redirect logs of pods in a k8s into a file of their name. kubectl get pods | awk ‘{print $1}’ | tail -2 | xargs -I {} kubectl logs {} > {} This is the result. demo@demo1:~/log$ ls {} What I need is, if this is the pod details demo@demo1:~/log$ kubectl get pods NAME READY STATUS
kubectl exec behaving strangely, stating command not found even though the binary is there in the pod
So have an OpenShift cluster and running a pod in the mongodb-test namespace. The pod is running fine When I exec into the pod and run the mongo command, I dont get any issue and the command works as expected. Now the problem is when I try to run the same command using below syntax I get mongo not found
Options for getting logs in kubernetes pods
Have few developer logs in kubernetes pods, what is the best method to get the logs for the developers to see it. Any specific tools that we can use? I have the option of graylog, but not sure if that can be customized to get the developer logs into it. Answer The most basic method would be to simply use
“The ClusterRoleBinding “kubernetes-dashboard” is invalid: roleRef: Invalid value” when deploying Web UI
I’m trying to deploy Kubernetes Web UI as described here: https://kubernetes.io/docs/tasks/access-application-cluster/web-ui-dashboard/ My system configuration is as follows: After starting the minukube cluster minikube start I created a Service Account and ClusterRoleBinding as described here: https://github.com/kubernetes/dashboard/blob/master/docs/user/access-control/creating-sample-user.md Now I execute: or and get the following output: What happened and how to fix it? Answer issue is you missed this note : NOTE:
What are the exact system requirements for Knative set up? Why the basic setup guide lead me to exhaustion of resource?
I have been trying to set up Knative development environment on my system. But everytime i deploy Istio , the pilot remain in pending state and i find its because of resource exhaustion. I followed basic setup guide from Knative docs. i.e. serving/blob/master/DEVELOPMENT.md Now if i install and deploy istio according to it, the resources get exhausted and istio-pilot remain