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

How to Install #5

Open
chrisaddams opened this issue Jun 8, 2020 · 9 comments
Open

How to Install #5

chrisaddams opened this issue Jun 8, 2020 · 9 comments

Comments

@chrisaddams
Copy link

Hi, It doesn't seem clear how to install this. I've cloned the repo and run Make Install, but I can't get passed that. Is there a step I'm missing before I'm able to use tfk8s as a command?

@jrhouston
Copy link
Owner

Hey @chrisaddams thanks for opening this. Can you show me the output you get when you run make install? At the moment this just runs go install, so the binary will be built and land wherever go is configured to install binaries on your system (for me it's $(go env GOPATH)/bin)

I'm hoping to set up binary releases for this soon so you don't have to build it yourself.

@errogaht
Copy link

➜ tfk8s git:(master) go install
tfk8s.go:11:2: cannot find package "github.com/hashicorp/terraform/repl" in any of:
/usr/lib/go-1.10/src/github.com/hashicorp/terraform/repl (from $GOROOT)
/home/errogaht/go/src/github.com/hashicorp/terraform/repl (from $GOPATH)
tfk8s.go:14:2: cannot find package "github.com/spf13/pflag" in any of:
/usr/lib/go-1.10/src/github.com/spf13/pflag (from $GOROOT)
/home/errogaht/go/src/github.com/spf13/pflag (from $GOPATH)
tfk8s.go:12:2: cannot find package "gopkg.in/yaml.v2" in any of:
/usr/lib/go-1.10/src/gopkg.in/yaml.v2 (from $GOROOT)
/home/errogaht/go/src/gopkg.in/yaml.v2 (from $GOPATH)

@jrhouston
Copy link
Owner

@errogaht It looks like you're on go 1.10 from looking at the paths in your output. This project uses go modules so you'll need a newer version of go to build it.

@YoninL
Copy link

YoninL commented Nov 9, 2020

I found using go get will quickly install it.

go get -u github.com/jrhouston/tfk8s

I'm using go 1.14, thanks for the handy tool btw.

@Tenzer
Copy link

Tenzer commented May 27, 2021

For Homebrew users, I have added tfk8s to my own tap, so you can now install it by running brew install tenzer/tap/tfk8s. There are bottles available for macOS x86 and ARM64 plus Linux x86.

@hameno
Copy link

hameno commented Jun 4, 2021

Trying to install this, but it fails with:
github.com/jrhouston/tfk8s imports
github.com/hashicorp/terraform/repl: cannot find module providing package github.com/hashicorp/terraform/repl

go version go1.16.5 linux/amd64

@jrhouston
Copy link
Owner

Ah looks like hashicorp/terraform@36d0a50 made the repl package internal, so it's breaking go get even though I have the version pinned in go.mod.

go install github.com/jrhouston/tfk8s@latest

still works for me on go1.16.5.

@CarloSacchi
Copy link

CarloSacchi commented May 11, 2022

go install github.com/jrhouston/tfk8s@latest
(worked for me)
go version go1.18.2 windows/amd64
On windows 10 Git Bash

@fkfouri
Copy link

fkfouri commented Jul 5, 2023

This command have generated a Windows/amd64 executable in the Linux environment, and then I have moved the compiled file to the Windows place.

env GOOS=windows GOARCH=amd64 go install github.com/jrhouston/tfk8s@latest

I did this in a Docker context. See the dockerfile below.

FROM golang:alpine
RUN apk --update add --no-cache git 
RUN go install github.com/googlecloudplatform/gcsfuse@master

The compiled file will be find in path /go/bin/windows_amd64

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

No branches or pull requests

8 participants