Skip to main content

All Questions

Filter by
Sorted by
Tagged with
1 vote
1 answer
2k views

In OpenShift how can we do URL rewriting for external requests

I tried to find information in the documentation of OpenShift, but could not discover how to use an OpenShift Route to perform URL rewriting. Do routes allow you to perform reverse-proxy like ...
jeevan08's user avatar
0 votes
1 answer
206 views

How can we rewrite the response of APIs in OpenShift

We have application that is running inside a pod, to access that I have created the service and exposed it. The route-url is for example : example-city.apps.cluster.com to access my application say ...
jeevan08's user avatar
1 vote
0 answers
498 views

Openshift console not opening

The console pods are running but still not able to open the console. Kindly let me know what is missing. [root@api ~]# oc get nodes NAME STATUS ROLES AGE VERSION ocp-...
meallhour's user avatar
  • 15.5k
0 votes
2 answers
1k views

OpenShift "oc rsync" command downloads files, but still outputs WARNING

From my Windows machine, oc rsync pod_name:/remote/path/to/dir /local/path/to/dir -c container_name seems to be working and downloading files.. but with: WARNING: rsync command not found in path. ...
Giorgi Tsiklauri's user avatar
0 votes
1 answer
365 views

Wild card in oc command line resource names

Trying to delete all imagestreams which has prefix filebeat:- λ oc delete imagestream 'filebeatbuilder*' which is returning error:- Error from server (NotFound): imagestreams.image.openshift.io "...
KOTIOS's user avatar
  • 11.2k
0 votes
1 answer
376 views

How do I index using a jsonpath key containing a string '.'

I am working in OCP trying to access the following information from the yaml output generated by oc get nodes my-node -o yaml using the -o jsonpath {} feature. i.e. The full yaml output apiVersion: v1 ...
user21113865's user avatar
0 votes
1 answer
663 views

How can I port forward in openshift without using oc client . Is there a way we can usejava client to portforward in a pod just like“oc port forward”

I need to access a postgres database from my java code which resides in openshift cluster. I need a way to do so. without initiating port forwarding manually through oc port forward command. I have ...
Kushant singh's user avatar
1 vote
0 answers
51 views

pod not found error, while using the rsync cmd to copy the results from ocp pod to jenkins workspace

I am running some automated tests using RBF, but sometimes when the test runner is complete and am trying to copy the test result from OCP to local using Rsync (using Jenkins job), it shows that the ...
sourabh kadyan's user avatar
0 votes
1 answer
908 views

How to perform autorestart of Pods at scheduled time in openshift

I am having a list of pods running java applications,want to have a schedule restart of pods automatically.How it can be performed.I have tried with having a cron job inside an ocp file but it didn't ...
HaniNani's user avatar
0 votes
1 answer
1k views

Monitoring the progress of specified pods with oc cli

I want to know is there a way to monitor the progress of a particular pod instead of seeing all pods? For example I scale consleapp oc scale dc consleapp --replicas=3 After that command I want to ...
B.Allen's user avatar
  • 79
0 votes
0 answers
207 views

Openshift reset `route` config when change branch

I increased the timeout in the Route yaml, but the settings are reset as soon as I change the name of the branch through the UI, not through the yaml configuration. This is the annotation: metadata: ...
Ron's user avatar
  • 399
0 votes
1 answer
1k views

Openshift - Edit secret from cli

For security reasons, I need to renew the password field of a Secret in Openshift every 30 days, so my idea is to create a cronjob and execute a ocp command to remove the password field from that ...
Alvaro's user avatar
  • 77
0 votes
1 answer
484 views

how to check if imagestream is existed in openshift container platform with jenkins pipeline

I ran this code to check and delete the imagestreams in Openshift openshift.withCluster("${CLUSTER_NAME}") { openshift.withProject("${DEV_ENV}") { ...
Winston's user avatar
0 votes
0 answers
412 views

Kubernetes/OpenShift: Can I patch a node condition status?

I am trying to patch the node condition type status, for example can I turn/replace the Whatever Node Condition type status from false to true and vice versa? Edit: When I try to patch I am not ...
Sam's user avatar
  • 415
2 votes
1 answer
6k views

oc + bash - How to execute a local function in Openshift pod with "oc exec"?

I want to execute a local function in my script in each pod of Openshift. function1() { ... } function2() { ... } verify() { ... # the function I want to execute in each pod } main() { ...
WesternGun's user avatar
  • 12.6k
0 votes
0 answers
43 views

Unable to list machinesets on Openshift 4.10 cluster

I am using the below code snippet to list machinesets but unable to get back any machinesets on the cluster: cfg, err := config.GetConfig() if err != nil { log.Fatal(err) } opts :=...
asm's user avatar
  • 13
0 votes
0 answers
202 views

how can i run oc login and oc rollout using github action?

here are my some of the workflow steps and last one is failing - name: Install oc uses: redhat-actions/openshift-tools-installer@v1 with: oc: 4.10 # https://github.com/...
swetank soni's user avatar
0 votes
1 answer
1k views

Route annotations from yml file was not working in openshift

We are using openshift for the deployment where we have 3 pods running with same service To achieve load balancing we are trying to create a annotations in the route. Adding annotations in Route from ...
Andy 's user avatar
0 votes
1 answer
4k views

How to export image in CRI-O?

Both docker and containerd provide golang clients and provide some interfaces, such as list images, export images or tag images. How can this be done in cri-o? eg: github.com/containerd/containerd and ...
mjammer's user avatar
  • 11
0 votes
1 answer
234 views

OpenShift CLI command to set environment from secret

When I exectue this command: oc set env --from=secret/mysqldb dc/hola I get this configuration in deployment environment Is there a way to set the deployment configuration using OpenShift CLI so the ...
iperezmel78's user avatar
0 votes
0 answers
422 views

OpenShift - Cannot Build dockerfiles from private bitbucket repo

I'm trying to create a application from a dockerfile in my Private Bitbucket repo, when I go through the web console to make it I've tried using both the SSH and HTTP url's and the ssl/user+pass ...
mitchell2423's user avatar
1 vote
2 answers
1k views

Getting logs/more information during start-build command execution

Jenkins pipeline is building Docker images. OpenShift plugin(s) are used for the same. An example command: openshift.selector(BUILD_CONFIG_NAME, "${appBcName}").startBuild("--from-dir=${...
Kaliyug Antagonist's user avatar
0 votes
0 answers
309 views

OpenShift Playground 4.5 and 4.7 Login

The current version of the OpenShift Playground which lasts for 60' is 4.5, and 4.7. I tried both of them when I press the copy login command to use my visual studio code to log in to it, I could not ...
William Pham's user avatar
0 votes
1 answer
1k views

A new and (almost) effective way to update routes and allow external access

This is a procedure I tried to use to update all the routes of an already installed cluster to allow external access to it. The procedure below seems very viable to me, but we have been having some ...
Eduardo Lucio's user avatar
1 vote
1 answer
10k views

Delete all resources via OC CLI with name contain some words

I am looking for a command to delete all resources in openshift, with name contain some words. I found this but NOT specific to mine. POD delete I tried below oc get all -- selector | awk '/^<some ...
Shabar's user avatar
  • 2,793
2 votes
1 answer
5k views

Failed to pull image "image-registry.openshift-image-registry.svc:5000/..." OpenShift CRC

I am trying to install a sample application using the git option in OpenShift 4.7.2 (CodeReady containers 1.24) and I keep getting the below error while openshift tries to build the image to be ...
Adnan Mamajiwala's user avatar
1 vote
1 answer
2k views

Unable to login Openshift Cluster

After the upgrading kubectl, I am unable to login on Openshift cluster. When i am trying to login with oc login command it is reverting the below error message: Error: unknown command "login"...
Imtiaz Ahmed's user avatar
0 votes
1 answer
406 views

Define memory size in OpenShift CLI

In OpenShift CLI, how can I define the memory size within the oc new-app command?
Thisara Watawana's user avatar
0 votes
1 answer
745 views

OKD installation behind proxy

Hi everyone i don't know if i'm the only one have issues installing okd behind proxy in my case i got ovirt for deploy the cluster the openshift-installer is creating the resources all looks fine but ...
Mario Pang's user avatar
3 votes
1 answer
3k views

openshift 3.11 oc command : error: Error loading config file ".kube/config": yaml: line 11: could not find expected ':'

In a okd cluster installed using https://github.com/openshift/origin/tree/release-3.11 After the okd installation the oc command was working fine but after somedays, I'm facing a weird issue with oc ...
Rakesh Kotian's user avatar
0 votes
1 answer
4k views

Changing oc login password as a user

In our corporate environment, I'm given with an openshift container user account. I can login into the cluster with the command oc login <cluster url> <username> <password> ...
niyasc's user avatar
  • 4,480
0 votes
1 answer
4k views

oc cluster up can't start kube-apiserver due to missing ~/.kube/config

I try to run OKD on my desktop (Ubuntu 18). I follow instruction: https://opensource.com/article/18/11/local-okd-cluster-linux (similar). I have Docker installed: $ docker version ... Version: ...
mkczyk's user avatar
  • 2,700
0 votes
1 answer
11k views

How to `docker login` to OpenShift Docker registry

I am using Redhat OpenShift 4.4.17 deployed in Azure. I logged in to OpenShift as administrator. I have a Docker image locally, now I need to push my docker image to OpenShift Docker registry. I am ...
Bala krishna's user avatar
0 votes
1 answer
516 views

Install Nginx ingress on Openshift cluster

I know this is an obvious question regarding Kubernetes and Nginx ingress. But, I just couldn't install Nginx ingress on my Openshift cluster. Openshift docs tells that Nginx can be installed from the ...
Amit Baranes's user avatar
  • 8,072
0 votes
2 answers
762 views

Run docker container on OpenShift from Nexus unsecure private registry

I'm trying to run a containerized app which is stored in Nexus docker hosted on url 12.23.34.55:8086 I'm trying to run it on my Openshift Cluster, but I'm getting error. Commands I'm using to run oc ...
Aditya Malviya's user avatar
1 vote
0 answers
159 views

Is it possible to run `oc cluster up` offline?

I'm trying to run oc cluster up - the Openshift 3.11 development environment - in an offline environment. I have run it previously while online, and so the required images are downloaded. Then I ...
Magick's user avatar
  • 5,072
2 votes
1 answer
3k views

Openshift External IP is pending/none

I tried to set externalPI with below command oc patch svc <serviceName> -p '{"spec":{"externalIPs":["giving.my.ip.here"]}}' but getting below error Error from ...
Ranjeet's user avatar
  • 53
2 votes
1 answer
1k views

How to specify/modiy target-port on a newly created app through openshift CLI?

I am trying to expose a new app created via openshift command line(oc). This is a nodeJS server listening on port=3000. However, opeshift defaults the target-port to 8080 as shown in the following ...
nihal's user avatar
  • 377
0 votes
2 answers
2k views

Openshift remote command execution (exec)

I am trying to run the following command from Windows machine in the openshift docker container running Linux oc exec openjdk-app-1-l9nrx -i -t --server https://xxx.cloud.ibm.com:30450 \ --token &...
himanshu_mps's user avatar
1 vote
1 answer
1k views

Openshift: list unused secrets

I have lots of secrets since last year and not sure which ones are in use by applications. Since I don't want to accidently delete in-use secret, I want to use oc.exe CLI and find all unused secrets. ...
Anuj's user avatar
  • 169
2 votes
2 answers
1k views

Openshift CLI: Change .kube folder to different drive

I have Openshift CLI 3.11 installed on my machine, but my .kube folder is present on my H drive(network drive) which is not accessible due to some network problems as I'm away from my office and ...
BKK's user avatar
  • 503
2 votes
1 answer
1k views

Openshift API query with Openshift/Client-go

Im trying to list all the build configs in openshift with help of openshift/client-go import ( "context" "flag" "fmt" "os" "path/...
drc12345's user avatar
1 vote
1 answer
4k views

How to update limits.memory using command line in Openshift?

I would like to update or change memory limit to 90Gi in this spec using command line. spec: hard: limits.cpu: 12500m limits.memory: 80Gi pods: "10" requests.cpu: 12500m requests.memory: ...
Rajiv's user avatar
  • 41
1 vote
1 answer
2k views

Get names of all deployment configs with no running pods

Is there a simple method (that won't require googling at every use) to get names of all deployment configs with no running pods (scaled to 0) in Kubernetes / Openshift? Methods without JSON tokens and ...
mirekphd's user avatar
  • 6,633
3 votes
2 answers
5k views

How to delete files/directories using oc cli in Openshift

I've used oc cp to copy files and directories onto a persistent volume attached to a pod in my openshift project. Is there any way to delete?
bzo's user avatar
  • 1,604
3 votes
1 answer
5k views

How to get consumed storage percentage for any persistent volume in openshift?

I am looking for a simple method to get the storage used and storage allocated for a persistent volume dynamically claimed by PVC for any pod. Is there any rest API or oc command for the same? I am ...
Himanshu Jindal's user avatar
0 votes
1 answer
502 views

Openshift equivalent of Kubectl expose pod

I am fairly new to openshift. Is there a REST API available to expose a pod ? Basically I am looking to do something like: kubectl expose pod pod-name
dj308's user avatar
  • 57
0 votes
0 answers
1k views

Connect to MongoDB remote on Openshift Online

I want to connect to my MongoDB hosted on Openshift Online (we have a Pro account) using only the database's Host IP, Port, db username, db password, db name. Currently I can do it using the Openshift ...
Shreyas Gombi's user avatar
1 vote
0 answers
783 views

How to access the Openshift cluster using .kubeconfig file

I have to authenticate the openshift cluster via .kube/config file. For that, I have generated a x509 client certificate and key using OpenSSL.I converted that certificate into .pem format using the ...
Suraj Agarkar's user avatar
1 vote
0 answers
543 views

Pods not getting ready due to deadlock

I'm using an openshift cluster to deploy my k8s operator. I deployed the operator manually not from the operator hub. I was able to deploy the operator successfully. But when I try to do a deployment ...
uvindu sri's user avatar

1
2 3 4 5
7