Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

swagger open api error #1

Open
ghost opened this issue Dec 8, 2017 · 3 comments
Open

swagger open api error #1

ghost opened this issue Dec 8, 2017 · 3 comments

Comments

@ghost
Copy link

ghost commented Dec 8, 2017

x-MacBook-Pro:gcloud apple$ make ship
go test ./...
?       github.com/gedw99/gitty/exp/ui/ci/gcloud        [no test files]
GOOS=linux make build
go get .
go get github.com/a8m/envsubst/cmd/envsubst
go build -ldflags "-X main.version=65fc74c" -o news .
docker build -t eu.gcr.io/gedw99/news-service:65fc74c .
Sending build context to Docker daemon  6.917MB
Step 1/6 : FROM alpine:3.4
 ---> 7cd51c6c5ee9
Step 2/6 : RUN apk -U add ca-certificates
 ---> Using cache
 ---> 9c50f2367fe4
Step 3/6 : EXPOSE 8080
 ---> Using cache
 ---> 0b831365cf12
Step 4/6 : ADD news /bin/news
 ---> Using cache
 ---> 89da76f5a638
Step 5/6 : ADD config.yml /etc/news/config.yml
 ---> Using cache
 ---> 4f87e8f66ab9
Step 6/6 : CMD news -config /etc/news/config.yml
 ---> Using cache
 ---> f5c0df70a299
Successfully built f5c0df70a299
Successfully tagged eu.gcr.io/gedw99/news-service:65fc74c
gcloud docker -- push eu.gcr.io/gedw99/news-service:65fc74c
The push refers to a repository [eu.gcr.io/gedw99/news-service]
940630ad2ee6: Layer already exists
785239b938d2: Layer already exists
be6c8d822a37: Layer already exists
52a5560f4ca0: Layer already exists
65fc74c: digest: sha256:e28f0e5d5a5c0ad4014819dd8bca75b61522457a1db49598b764f5ab6b705922 size: 1157
go get github.com/a8m/envsubst/cmd/envsubst < k8s/deployment.yml | kubectl apply -f -
W1208 01:55:03.818315   25430 factory_object_mapping.go:423] Failed to download OpenAPI (Get http://localhost:8080/swagger-2.0.0.pb-v1: dial tcp [::1]:8080: getsockopt: connection refused), falling back to swagger
The connection to the server localhost:8080 was refused - did you specify the right host or port?

I used a golang equivalent of envsubst so it works on OSX

anyway its seems to be a known issue.
Might be because we are on different docker versions
what about you ?

x-MacBook-Pro:gcloud apple$ docker version
Client:
Version: 17.09.0-ce
API version: 1.32
Go version: go1.8.3
Git commit: afdb6d4
Built: Tue Sep 26 22:40:09 2017
OS/Arch: darwin/amd64

Server:
Version: 17.09.0-ce
API version: 1.32 (minimum version 1.12)
Go version: go1.8.3
Git commit: afdb6d4
Built: Tue Sep 26 22:45:38 2017
OS/Arch: linux/amd64
Experimental: true

@ghost
Copy link
Author

ghost commented Dec 8, 2017

kubernetes/kubernetes#50295

looks like a common bug at the moment...

@skolodyazhnyy
Copy link
Owner

skolodyazhnyy commented Dec 12, 2017

I believe your kubectl is not pointing to the correct cluster. Kubernetes client tries to connect to API server running at localhost:8080, but it's not running there, so connection is refused.

Before running deployment process I would suggest you check connectivity with cluster using kubectl get nodes.

@ghost
Copy link
Author

ghost commented Dec 13, 2017

hey

your right. It was related to pathing

i fixed it with this:

# install gcloud
	brew cask install google-cloud-sdk
	
	gcloud components list
	gcloud components update

	gcloud components install --quiet gsutil kubectl container-builder-local

	# check that gcloud & kubectl IS on the PATH
	gcloud info

	# needed if kubectl is not working
	#sudo gcloud components update kubectl

Basically there is this contractiction between gcloud and minikube. they both install kubectl in different paths.
:)

main thing is this bit
# check that gcloud & kubectl IS on the PATH
gcloud info

IF kubectl is on the path according to gcloud then everything works :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant