All Questions
Tagged with openshift kubernetes
1,346
questions
227
votes
14
answers
300k
views
How can I debug "ImagePullBackOff"?
All of a sudden, I cannot deploy some images which could be deployed before. I got the following pod status:
[root@webdev2 origin]# oc get pods
NAME READY STATUS ...
146
votes
11
answers
73k
views
What is the difference between persistent volume (PV) and persistent volume claim (PVC) in simple terms?
What is the difference between persistent volume (PV) and persistent volume claim (PVC) in Kubernetes/ Openshift by referring to documentation?
What is the difference between both in simple terms?
47
votes
1
answer
41k
views
Can I connect one service account to multiple namespaces in Kubernetes?
I have couple of namespaces - assume NS1 and NS2. I have serviceaccounts created in those - sa1 in NS1 and sa2 in NS2. I have created roles and rolebindings for sa1 to do stuff within NS1 and sa2 ...
43
votes
2
answers
29k
views
What is the different between openshift deploymentconfig and kubernetes deployment
After far as I know:
deploymentconfig → replicationcontroller → pod
vs.
deployment → replicaset → pod
Otherwise, do these two resources have additional differences?
The more ...
32
votes
2
answers
89k
views
How to include script and run it into kubernetes yaml?
It is how to run simple batch in kubernetes yaml (helloworld.yaml):
...
image: "ubuntu:14.04"
command: ["/bin/echo", "hello", "world"]
...
In Kubernetes i can deploy that like this:
$ kubectl ...
31
votes
3
answers
39k
views
Share persistent volume claims amongst containers in Kubernetes/OpenShift
This may be a dumb question but I haven't found much online and want to clarify this.
Given two deployments A and B, both with different container images:
They're deployed in two different pods(...
27
votes
3
answers
38k
views
Kubernetes ConfigMap size limitation
Though resourceQuotas may limit the number of configmaps in a namespace, is there any such option to limit the size of the individual configmap?
I will not like some user to start uploading large text ...
25
votes
4
answers
25k
views
Difference between API versions v2beta1 and v2beta2 in Horizontal Pod Autoscaler?
The Kubernetes Horizontal Pod Autoscaler walkthrough in https://kubernetes.io/docs/tasks/run-application/horizontal-pod-autoscale-walkthrough/ explains that we can perform autoscaling on custom ...
25
votes
2
answers
13k
views
what's the difference between openshift route and k8s ingress?
I'm new to openshift and k8s. I'm not sure what's the difference between these two terms, openshift route vs k8s ingress ?
22
votes
2
answers
27k
views
What is the "kube-system" namespace for?
In a default openshift install, there is an unused project titled kube-system. It seems like openshift-infra is for things like metrics, default is for the router and registry, and openshift is for ...
22
votes
5
answers
28k
views
How to solve liquibase waiting for changelog lock problem in several pods in OpenShift cluster?
We are supporting several microservices written in Java using Spring Boot and deployed in OpenShift. Some microservices communicate with databases. We often run a single microservice in multiple pods ...
19
votes
6
answers
14k
views
How to obtain the enable admission controller list in kubernetes?
AFAIK, the admission controller is the last pass before the submission to the database.
However I cannot know which one is enabled, Is there a way to know which one is taking effect?
Thanks.
18
votes
3
answers
24k
views
Cannot determine if job needs to be started: Too many missed start time (> 100). Set or decrease .spec.startingDeadlineSeconds or check clock skew
I've created and pushed a cron job to deployment, but when I see it running in OpenShift, I get the following error message:
Cannot determine if job needs to be started: Too many missed start time (&...
17
votes
3
answers
17k
views
OpenShift oc create fails with "already exists"
Attempting to create a set of resources based on a file via oc create fails if they already exist.
According to the docs here oc create should:
Parse a configuration file and create one or more ...
15
votes
4
answers
18k
views
Kubernetes - Liveness and Readiness probe implementation
I'm developing a service using Spring and deploying it on OpenShift. Currently I'm using Spring Actuator health endpoint to serve as a liveness and readiness probe for Kubernetes.
However, I will ...
14
votes
1
answer
19k
views
Request vs limit cpu in kubernetes/openshift
I have some dilemma to choose what should be the right request and limit setting for a pod in Openshift. Some data:
during start up, the application requires at least 600 millicores to be able to ...
12
votes
4
answers
22k
views
Oc get pods - Command to just print pod names
I want to get a list of just the pod names and the Result should not include the status, number of instances etc.
I am using the command
oc get pods
It prints
Pod1-qawer Running ...
12
votes
4
answers
21k
views
Restart Pod when secrets gets updated
We are using secret as environment variables on pod, but every time we have updated on secrets, we are redeploying the pods to take changes effect. We are looking for a mechanism where Pods get ...
12
votes
1
answer
8k
views
How to use image stream in deploy configuration for OpenShift
I want my deploy configuration to use an image that was the output of a build configuration.
I am currently using something like this:
- apiVersion: v1
kind: DeploymentConfig
metadata:
...
11
votes
4
answers
13k
views
Differences between OpenShift and Kubernetes
What's the difference between OpenShift and Kubernetes and when should you use each? I understand that OpenShift is running Kubernetes under the hood but am looking to determine when running OpenShift ...
10
votes
1
answer
11k
views
Openshift vs Rancher, what are the differences? [closed]
I am totally new to this two technologies (I know docker and kubernetes btw).
Haven't find much an the web about this comparison topic.
I have read that Openshift is used by more companies,but a ...
10
votes
1
answer
19k
views
How to update Secrets (Without Deleting and Creating) in Openshift?
I have a folder in my server that I want to update inside a cointaier in a pod. How do I do that without deleting the Secret?
I know that the following creates my secret:
oc create secret generic ...
10
votes
3
answers
17k
views
ArgoCD tracking subdirectories in a specified path
I'm using ArgoCD and I want to track files under different subdirectories. I've setted the path as ./root_directory, but I would like to track also files in the subdirectories of root_directory. For ...
10
votes
1
answer
4k
views
Openshift: No nodes are available that match all of the following predicates:: Insufficient cpu (173), MatchNodeSelector (5)
I have a project in west-1 on Openshift v3. In it I have an app that worked fine and one that stopped working following a GitHub committing something very downstream within the code. The issue is with ...
9
votes
1
answer
15k
views
How do you remove the deploymentConfig, image streams, etc using Openshift OC?
After creating a new app using oc new-app location/nameofapp, many things are created: a deploymentConfig, an imagestream, a service, etc. I know you can run oc delete <label>. I would like to ...
9
votes
2
answers
6k
views
Get name of most recently created pod
In OpenShift, is there a more elegant way of obtaining the name of the most recently created pod in application my_app than this one?
name=$(oc get pods -l app=my_app -o=jsonpath='{range.items[*]}{....
9
votes
3
answers
10k
views
How to get access-logs from OpenShift router (HAProxy)?
How to get access-logs from openshift router (HAproxy).
I tried to use this command:
$ oc project default
$ oc logs router-1-g...
I got output:
I0129 09:47:17.125616 1 router.go:554] Router ...
8
votes
1
answer
8k
views
Kubernetes: How to pass pipe character in readiness probe command
I am having an issue with passing a pipe character | in readiness probe command.
I want to have a probe command:
curl --silent http://localhost:8080/actuator/health | grep --quiet -e '^{\"status\"\:\...
8
votes
4
answers
26k
views
Ansible K8s module: Failed to import the required Python library (openshift) on Python /usr/bin/python3
The env
Ansible 2.9.6 (python3)
Tried to run a simple playbook
- hosts: master
gather_facts: no
become: yes
tasks:
- name: create name space
k8s:
name: testing
...
8
votes
1
answer
26k
views
Openshift: unable to validate against any security > context constraint
I try to create the following statefulSet:
apiVersion: apps/v1
kind: StatefulSet
metadata:
name: es-cluster
namespace: efk
spec:
serviceName: elasticsearch
replicas: 3
selector:
...
8
votes
1
answer
17k
views
How to use environment variables in init container args in kubernetes/openshift?
This is an excerpt of my deployment config:
...
spec:
containers:
- env:
- name: GIT_USERNAME
valueFrom:
secretKeyRef:
key: username
...
8
votes
1
answer
30k
views
Configure restart policy of pod from deployment config
We're using Openshift (a managed version of Kubernetes) and I'm struggling to set the pod restart policy from 'Always' to 'Never' for all pods created by our deployment config, but I'm not sure where ...
8
votes
2
answers
3k
views
Docker Inside Docker oom_score_adj: invalid argument
On Kubernetes, to build docker images, we use Docker Inside Docker (dind) where a docker daemon will be running as a privileged user
But some times times we have observed that the docker image ...
8
votes
2
answers
7k
views
Docker: Insert certificate into ketstore
I'm trying to add a certificate into $JAVA_HOME/jre/lib/security/cacerts truststore on my Dockerfile:
FROM frolvlad/alpine-oraclejdk8:slim
VOLUME /tmp
RUN keytool -import -alias vault -storepass ...
7
votes
3
answers
22k
views
Retrieve secret value from openshift
I created a key/value secret in openshift. I want to retrieve the value of that key/value pair.
i tried using
oc describe secret ashish -n my-project
but it gave the value as shown below but i dont ...
7
votes
3
answers
3k
views
kubernetes vs openshift (routes and services)
I'm new to kubernetes and openshift (came from docker swarm world) and I'm having trouble with some of kubernetes and openshift documentation especially related to route and services. I was looking ...
7
votes
2
answers
17k
views
how to modify pod memory limit of a running pod
I am using YML to create pod and have specified the resource request and limit. Now I am not aware of how to modify the resource limits of a running pod. For example
memory-demo.yml
apiVersion: v1
...
7
votes
1
answer
3k
views
List pods that are servicing a service
I am trying to get the list of pods that are servicing a particular service
There are 3 pods associated with my service.
I tried to execute the below command
oc describe svc my-svc-1
I am expecting to ...
7
votes
2
answers
8k
views
Kubernetes - Readiness Probe execution after container started
Is there a way to prevent readiness probe from execution once container has successfully started? I suppose that liveness probe should be enough to monitor container health.
7
votes
2
answers
2k
views
Service mesh and Async services
I am planning to introduce K8s/Istio into my infra.
Right now I have plenty of services which communicate with each other using RabbitMQ.
Service mesh concept seems to assume all services should be ...
7
votes
3
answers
4k
views
How to access from one container to another container stdout and stderr inside Kubernetes pod
I have a Pod with two containers.
apiVersion: v1
kind: Pod
metadata:
name: test
spec:
containers:
- name: my-container
image: google/my-container:v1
- name: third-party
image: google/...
7
votes
2
answers
3k
views
Ingress route - path based routing to different React app
I have different react apps and its backend-service deployed independently inside the Openshift. There is one app among them where users login and navigate to othes apps using links provided in this ...
6
votes
4
answers
15k
views
Openshift Route is not load balancing from Service pods
I have tried before on Openshift Origin 3.9 and Online.
I have deployed a simple hello world php app on Openshift. It has a Service and a Route.
When I call the route, I am getting expected output ...
6
votes
3
answers
11k
views
How to have multiple object types in a single openshift yaml template?
Here is the sample template for single PersistentVolumeClaim with name : claim1
apiVersion: "v1"
kind: "PersistentVolumeClaim"
metadata:
name: "claim1"
spec:
accessModes:
- "ReadWriteOnce"
...
6
votes
3
answers
4k
views
Pod unable to install packages(apt-get update or apt-get install )
I have observed that the pods in my cluster is not able to install the packages when exec to the pod . While debugging i have realized that its due to /etc/resolv.conf entries.
The /etc/resolv.conf ...
6
votes
1
answer
9k
views
fsGroup vs supplementalGroups
I'm running my deployment on OpenShift, and found that I need to have a GID of 2121 to have write access.
I still don't seem to have write access when I try this:
security:
podSecurityContext:
...
6
votes
2
answers
14k
views
Declarative Jenkins Pipeline use existing Kubernetes Pod Template
I am using the OpenShift Jenkins image within an OpenShift Cluster. This default Jenkins image results in a Jenkins container that is preconfigured to point to my Kubernetes cluster. Additionally, the ...
6
votes
1
answer
1k
views
How to specify values for parent Helm chart
I am trying to configure Prometheus, which is included in the Gitlab Helm chart according to https://gitlab.com/charts/gitlab/blob/master/requirements.yaml
My main issue is how to configure ...
6
votes
1
answer
18k
views
Zookeeper: Hostname resolution fails
I am running Zookeeper in an OpenShift/Kubernetes environment. I have setup zookeeper as a StatefulSet in order to reliably persist config data.
I configured three servers in my zoo.cfg by hostname, ...
6
votes
1
answer
1k
views
How to set node ip as nameserver in dnsConfig?
Im overriding the the dns policy of a pod since I'm facing a issue with default /etc/resolv.conf of the pod. Another issue is that the pod is not able to connect to smtp server server due to default /...