openshift-origin

Openshift: how to edit scc non-interactively?

…衆ロ難τιáo~ 提交于 2020-01-04 09:32:32
问题 I am experimenting with openshift/minishift, I find myself having to run: oc edit scc privileged and add: - system:serviceaccount:default:router So I can expose the pods. Is there a way to do it in a script? I know oc adm have some command for policy manipulation but I can't figure out how to add this line. 回答1: You can achieve it using oc patch command and with type json. The snippet below will add a new item to array before 0th element. You can try it out with a fake "bla" value etc. oc

custom metrics for horizontal pod autoscaler in OpenShift

泄露秘密 提交于 2019-12-30 07:27:10
问题 I am using openshift v3 which uses kubernetes version 1.2. I am exploring more on autoscaling feature. Currently it says only CPU metrics is supported. Is there a way pods in openshift can be scaled based on memory or other metrics data collected from heapster? 回答1: As you mentioned: OpenShift v3 is using multiple components of Kubernetes. The official documentation of Kubernetes and openshift are talking about autoscaling on CPU. (Kubernetes 1.2 adds alpha support for scaling based on

Unable to deploy router or registry on openshift origin

三世轮回 提交于 2019-12-25 04:01:28
问题 Since yesterday, I have met some problems deploying applications and got ImagePullBackOff error. Then when I recreated the container today, I found myself not able to deploy the router and registry any more. They used to work very stably. The Error message I have got is as (for registry but same error for router): 5:48:22 PM docker-registry-1-deploy Pod FailedMount Unable to mount volumes for pod "docker-registry-1-deploy_default": IsLikelyNotMountPoint("/var/lib/origin/openshift.local

Unable to deploy router or registry on openshift origin

纵然是瞬间 提交于 2019-12-25 04:01:07
问题 Since yesterday, I have met some problems deploying applications and got ImagePullBackOff error. Then when I recreated the container today, I found myself not able to deploy the router and registry any more. They used to work very stably. The Error message I have got is as (for registry but same error for router): 5:48:22 PM docker-registry-1-deploy Pod FailedMount Unable to mount volumes for pod "docker-registry-1-deploy_default": IsLikelyNotMountPoint("/var/lib/origin/openshift.local

How to get kubernetes service account access token using fabric8 java client?

放肆的年华 提交于 2019-12-24 18:13:20
问题 I have configured minikube in my local machine and going to use kubernetes externally. I have created a Service Account in kubernetes and using it's secret I can get the access token using below command. kubectl get secret <service-account-secret> -o yaml -n mynamespace My question is how can I do this using fabric8 java client in runtime ? What I want is to obtain the access token by giving the secret of the Service account as a parameter. I am initiating the config as bellow. Config config

What is the “kube-system” namespace for?

烈酒焚心 提交于 2019-12-22 02:01:40
问题 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 global templates. What is the kube-system project used for though? I can't find any docs on it. 回答1: kube-system is the namespace for objects created by the Kubernetes system. Typically, this would contain pods like kube-dns , kube-proxy , kubernetes-dashboard and stuff like fluentd, heapster,

“rhc cartridges” not showing cartridge added with oo-admin-cartridge

对着背影说爱祢 提交于 2019-12-21 21:05:43
问题 I installed a cartridge with "oo-admin-cartridge -a install -s /path/to/cartridge". It shows up in "oo-admin-cartridge -a list", however it doesn't show up in "rhc cartridges". This is on release 4 of the Origin VM. On release 3, I don't have any problems installing additional cartridges. I know similar questions have been asked before, like Deploying Custom Cartridges on Openshift Origin, but none of my attempts at clearing the cache seem to help. I've tried: oo-admin-broker-cache --console

Kubernetes Deployments

青春壹個敷衍的年華 提交于 2019-12-20 07:01:05
问题 While working on creating a platform that will do microservice deployments using Kubernetes, we want to take a Dependency on the Kubernetes Deployment Object. However, we saw the documentation http://kubernetes.io/v1.1/docs/user-guide/deployments.html says the following "Note that Deployment objects effectively have API version v1alpha1. Alpha objects may change or even be discontinued in future software releases" I am wondering if we should go about using the Deployment concept to do our

Kubernetes Deployments

扶醉桌前 提交于 2019-12-20 07:00:39
问题 While working on creating a platform that will do microservice deployments using Kubernetes, we want to take a Dependency on the Kubernetes Deployment Object. However, we saw the documentation http://kubernetes.io/v1.1/docs/user-guide/deployments.html says the following "Note that Deployment objects effectively have API version v1alpha1. Alpha objects may change or even be discontinued in future software releases" I am wondering if we should go about using the Deployment concept to do our

kubernetes.default: Name does not resolve

只谈情不闲聊 提交于 2019-12-20 04:19:59
问题 Im running OpenShift. OpenShift Master: v3.3.1.7 Kubernetes Master: v1.3.0+52492b4 But am having problems trying to run a build in Jenkins (running in a pod). This is not a problem with the java code that I'm trying to build, but is a problem in the Kubernetes/Openshift setup. The builds fail with: Caused by: java.net.UnknownHostException: kubernetes.default: Name does not resolve at java.net.Inet6AddressImpl.lookupAllHostAddr(Native Method) at java.net.InetAddress$2.lookupAllHostAddr