openshift-origin

Allow Docker strategy in Openshift 3

旧时模样 提交于 2021-01-27 15:57:51
问题 I'm trying to understand the new OpenShift system and now we have push images to it. I know a little about Docker and I wanted to use it. I read in some places that we can chose Docker as a strategy. So basically I created an image based on httpd and a basic html file and tried to push it with the following command from the project folder: oc new-app . --strategy=docker I get this message on console: error: buildconfigs.build.openshift.io "openshift" is forbidden: build strategy Docker is not

Unable to redeploy the certificates post-expiry in openshift 3.11

拥有回忆 提交于 2021-01-27 13:20:46
问题 I have deployed openshift(okd) 3.11 using : https://github.com/openshift/openshift-ansible/tree/release-3.11 I would want to produce a scenario where certificates expire and test how the renewal certificates can be done. Hence I have set following variables in the inventory as 1 day(so that certificates expire quickly): openshift_hosted_registry_cert_expire_days=1 openshift_ca_cert_expire_days=1 openshift_master_cert_expire_days=1 etcd_ca_default_days=1 As expected after 1 day the oc commands

multi master OKD-3.11 setup fails if master-1 nodes is down

风格不统一 提交于 2021-01-05 08:58:26
问题 I am trying to install multi-master openshift-3.11 setup in openstack VMs as per the inventory file present in the official documentation. https://docs.openshift.com/container-platform/3.11/install/example_inventories.html#multi-masters-single-etcd-using-native-ha OKD Version [centos@master1 ~]$ oc version oc v3.11.0+62803d0-1 kubernetes v1.11.0+d4cacc0 features: Basic-Auth GSSAPI Kerberos SPNEGO Server https://master1.167.254.204.74.nip.io:8443 openshift v3.11.0+ff2bdbd-531 kubernetes v1.11

How to include script and run it into kubernetes yaml?

*爱你&永不变心* 提交于 2020-12-08 06:06:27
问题 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 create -f helloworld.yaml Suppose i have a batch script like this (script.sh): #!/bin/bash echo "Please wait...."; sleep 5 Is there way to include the script.sh into kubectl create -f so it can run the script. Suppose now helloworld.yaml edited like this: ... image: "ubuntu:14.04" command: ["/bin/bash",

Pushing a local Docker image to a private repository with a self-signed certificate

假装没事ソ 提交于 2020-07-22 06:09:29
问题 I'm trying to push an image, say foo/bar , from my local Docker registry to a registry running on OpenShift 3.11 (actually Minishift v1.33.0+ba29431). The registry is at 192.168.64.3:2376 and it expects HTTPS connections. It uses a self-signed certificate. First I copy the tag for the new image: docker tag foo/bar 192.168.64.3:2376/app/foo/bar This succeeds. Then I try pushing: $ docker push 192.168.64.3:2376/app/foo/bar The push refers to repository [192.168.64.3:2376/app/foo/bar] Get https:

Pushing a local Docker image to a private repository with a self-signed certificate

不问归期 提交于 2020-07-22 06:09:09
问题 I'm trying to push an image, say foo/bar , from my local Docker registry to a registry running on OpenShift 3.11 (actually Minishift v1.33.0+ba29431). The registry is at 192.168.64.3:2376 and it expects HTTPS connections. It uses a self-signed certificate. First I copy the tag for the new image: docker tag foo/bar 192.168.64.3:2376/app/foo/bar This succeeds. Then I try pushing: $ docker push 192.168.64.3:2376/app/foo/bar The push refers to repository [192.168.64.3:2376/app/foo/bar] Get https:

Openshift retrieve branch name in jenkinsfile

天大地大妈咪最大 提交于 2020-06-28 14:24:07
问题 I have configured webhook on bitbucket server which points to Openshift. I want to get GIT repo url , git branch etc from webhook payload in my inline jenkinsfile but I dont know how to retrieve them. (Webhook triggers build though). Is it possible ? Here is my BuildConfig apiVersion: build.openshift.io/v1 kind: BuildConfig metadata: labels: application: spring-demo template: openjdk18-web-basic-s2i name: spring-demo spec: output: to: kind: ImageStreamTag name: 'spring--demo:latest' runPolicy

Triggering auto-expansion of openshift persistent volumes

扶醉桌前 提交于 2020-06-16 17:32:34
问题 I have deployed mysql stateful-set with one master and two slave pods. Each of the pod has their own Persistent Volume Claim(PVC) as per storage requested by user. I am able to expand any persistent volume by editing their respective PVC. I am trying to implement a service to trigger auto-expansion of respective volume as soon as consumed storage of any pod crosses 90%. (Preferred in Java ) As per my investigation, I can use patch request for editing any PVC json file for desired storage.

Openshift Route is not load balancing from Service pods

北城余情 提交于 2020-05-27 12:21:03
问题 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 with Hello world and the Pod IP. Let's call this pod ip as 1.1.1.1 Now i deployed same app with small text change with same label under same Service. Let's call this pod ip as 2.2.2.2 I can see both pods running in a single Service. Now when I call the route, it always shows Podip 1.1.1.1 My route

Openshift Route is not load balancing from Service pods

寵の児 提交于 2020-05-27 12:20:17
问题 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 with Hello world and the Pod IP. Let's call this pod ip as 1.1.1.1 Now i deployed same app with small text change with same label under same Service. Let's call this pod ip as 2.2.2.2 I can see both pods running in a single Service. Now when I call the route, it always shows Podip 1.1.1.1 My route