Search code examples
kubernetesopenshift-originopenshift-enterprise

OpenShift Origin 3: "error: router could not be created"


I am trying to create a router as described on https://docs.openshift.com/enterprise/3.0/install_config/install/deploy_router.html#haproxy-router

However, when I run:

oadm router router --replicas=1 \
    --credentials='/etc/openshift/master/openshift-router.kubeconfig' \
    --service-account=router

I get the following error:

[root@openshift ~]# oadm router router --replicas=1 \
>     --credentials='/etc/openshift/master/openshift-router.kubeconfig' \
>     --service-account=router
error: router could not be created; the provided credentials "/etc/openshift/master/openshift-router.kubeconfig" could not be loaded: stat /etc/openshift/master/openshift-router.kubeconfig: no such file or directory
[root@openshift ~]# 

Does anyone know what the problem is, and how I solve this?

Thanks


Solution

  • You are using OpenShift Origin 1.1 which isn't exactly the same as OpenShift 3.1. The openshift-router.kubeconfig is in /etc/origin/master/...

    Try to use the documentation for origin (1.1).