-
Notifications
You must be signed in to change notification settings - Fork 301
connect to GCP GKE from local machine #92
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
Changes from 1 commit
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -46,6 +46,21 @@ cd csharp\examples\simple | |
dotnet run | ||
``` | ||
|
||
## Connecting to GCP GKE from local machine | ||
|
||
Start proxy to access kubernetes cluster: | ||
|
||
```bash | ||
$ kubectl proxy | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I don't think connecting through the proxy is the preferred way to sugest that people connect. |
||
Starting to serve on 127.0.0.1:8001 | ||
``` | ||
|
||
In code use following config: | ||
|
||
```csharp | ||
var config = new KubernetesClientConfiguration { Host = "http://127.0.0.1:8001" }; | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. The preferred way to connect is to use the config file on disk as follows: var k8SClientConfig = KubernetesClientConfiguration.BuildConfigFromConfigFile();
IKubernetes client = new Kubernetes(k8SClientConfig); |
||
``` | ||
|
||
## Testing | ||
|
||
The project uses [XUnit](https://xunit.github.io) as unit testing framework. | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
These instructions are generic to any cloud provider, so it likely should be:
Connecting to a cluster from a local machine
or somesuch.