-
Notifications
You must be signed in to change notification settings - Fork 273
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: created local-kubernetes plugin and added config options
This is a step in the direction of properly supporting remote k8s clusters. Still need to implement pushing built images to the cluster.
- Loading branch information
Showing
23 changed files
with
330 additions
and
179 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
## Running against a remote Kubernetes cluster | ||
|
||
### Setup | ||
|
||
You need to have a running ingress controller on your cluster to route requests to | ||
the deployed services. This can generally be any controller of your choosing, such | ||
as the nginx ingress controller. | ||
|
||
You also need a configured [context](https://kubernetes.io/docs/tasks/access-application-cluster/configure-access-multiple-clusters/) | ||
on your development machine. | ||
|
||
Then all you need to do is configure the environment and provider in your project | ||
`garden.yml`. You need to specify your configured context and the hostname of your | ||
ingress controller. Example: | ||
|
||
```yaml | ||
project: | ||
environments: | ||
dev: | ||
providers: | ||
kubernetes: | ||
context: my-dev-context | ||
ingressHostname: k8s-dev.mydomain.com | ||
ingressClass: nginx # this is optional, but may be necessary for your ingress controller configuration | ||
defaultEnvironment: dev | ||
``` | ||
Note that you need to have permissions to create namespaces and to create deployments, | ||
daemonsets, services and ingresses within the namespaces created. The plugin will | ||
create two namespaces per user and project, one to run services and another to manage | ||
metadata and configuration (this is so that your environment can be reset without | ||
clearing your configuration variables). |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,13 +1,7 @@ | ||
project: | ||
name: multi-container | ||
environments: | ||
local: | ||
providers: | ||
docker: | ||
type: kubernetes | ||
context: docker-for-desktop | ||
dev: | ||
providers: | ||
docker: | ||
type: kubernetes | ||
kubernetes: | ||
context: my-dev-context |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.