Share persistent volume claims amongst containers in Kubernetes/OpenShift

TL;DR You can share PV and PVC within the same project/namespace for shared volumes (nfs, gluster, etc…), you can also access your shared volume from multiple project/namespaces but it will require project dedicated PV and PVCs, as a PV is bound to single project/namespace and PVC is project/namespace scoped. Below I’ve tried to illustrate the … Read more

How to restart pod in OpenShift?

You need to do your changes in the deployment config but not in the pod. Because OpenShift treats pods as largely immutable; changes cannot be made to a pod definition while it is running. https://docs.openshift.com/enterprise/3.0/architecture/core_concepts/pods_and_services.html#pods If you make some changes in deployment config and save them, pod will restart and and your changes will take … Read more

How to include script and run it into kubernetes yaml?

I’m using this approach in OpenShift, so it should be applicable in Kubernetes as well. Try to put your script into a configmap key/value, mount this configmap as a volume and run the script from the volume. apiVersion: batch/v1 kind: Job metadata: name: hello-world-job spec: parallelism: 1 completions: 1 template: metadata: name: hello-world-job spec: volumes: … Read more

How to use naked GoDaddy domain with OpenShift hosting? [closed]

Solution 01) Sign up to cloudflare 02) Set these cname rules: mydomain.com > appname-username.rhcloud.com (this will utilise ‘cname flattening’) www > mydomain.com 03) Set page rules: http://www.mydomain.com/* > http://mydomain.com/$1 04) Set alias in OpenShift to mydomain.com 05) Make sure GoDaddy DNS record doesn’t have any conflicting cname or A record set up. 06) Let it … Read more

Helm: could not find tiller

Try deleting your cluster tiller kubectl get all –all-namespaces | grep tiller kubectl delete deployment tiller-deploy -n kube-system kubectl delete service tiller-deploy -n kube-system kubectl get all –all-namespaces | grep tiller Initialise it again: helm init Now add the service account: kubectl create serviceaccount –namespace kube-system tiller kubectl create clusterrolebinding tiller-cluster-rule –clusterrole=cluster-admin –serviceaccount=kube-system:tiller kubectl patch … Read more

How does docker compare to openshift?

The primary difference is that Docker as a project is focused on the runtime container only, whereas OpenShift (as a system) includes both the runtime container as well as the REST API, coordination, and web interfaces to deploy and manage individual containers. Comparing just the runtime containers, OpenShift and Docker both use kernel isolation features … Read more

tech