Skip to content

cli can't talk to external kubernetes #813

@phemmer

Description

@phemmer

I built the code from PR #797 in attempt to run openshift on top of GKE. Openshift starts, but cli commands which need to talk to kubernetes fail.

For example, trying to launch the hello-openshift example:

# openshift cli create -f hello-pod.json
F0130 23:50:19.119121     236 create.go:75] pods "" not found

From discussion with @smarterclayton on IRC, this error is because the cli needs to talk to both openshift & kubernetes, but they exist as separate services, and the client doesn't support this.

Full reproducible example (needs image built with PR #797):

cid=$(docker run -d --privileged -v /var/run/docker.sock:/var/run/docker.sock --net=host openshift/origin start master --kubernetes=http://localhost:8080 --etcd=localhost)
docker logs -f $cid 2>&1 | grep -qm1 'Started OpenShift API'
docker exec $cid openshift cli --kubeconfig=/var/lib/openshift/openshift.local.certificates/admin/.kubeconfig create -f https://raw.githubusercontent.com/openshift/origin/master/examples/hello-openshift/hello-pod.json

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions