docs: updated code in kubernetes guide

Signed-off-by: Sam Alba <sam.alba@gmail.com>
This commit is contained in:
Sam Alba 2021-06-14 18:29:10 +02:00
parent b231c3cb1b
commit 2a36771be0

View File

@ -1,6 +1,6 @@
# Kubernetes
This tutorial illustrates how to use `dagger` to build, push and deploy Docker
This tutorial illustrates how to use dagger to build, push and deploy Docker
images to Kubernetes.
import Tabs from '@theme/Tabs';
@ -63,15 +63,13 @@ docker network connect kind registry
<TabItem value="gke">
This tutorial can be run against a [GCP GKE](https://cloud.google.com/kubernetes-engine) cluster and [GCR](https://cloud.google.com/container-registry
)
This tutorial can be run against a [GCP GKE](https://cloud.google.com/kubernetes-engine) cluster and [GCR](https://cloud.google.com/container-registry)
</TabItem>
<TabItem value="eks">
This tutorial can be run against a [AWS EKS](https://aws.amazon.com/eks/
) cluster and [ECR](https://aws.amazon.com/ecr/)
This tutorial can be run against a [AWS EKS](https://aws.amazon.com/eks/) cluster and [ECR](https://aws.amazon.com/ecr/)
</TabItem>
</Tabs>
@ -138,12 +136,13 @@ Next, create `.dagger/env/default/plan/main.cue`.
package main
import (
"dagger.io/dagger"
"dagger.io/kubernetes"
)
// input: ~/.kube/config file used for deployment
// set with `dagger input text kubeconfig -f ~/.kube/config`
kubeconfig: string @dagger(input)
// set with `dagger input secret kubeconfig -f ~/.kube/config`
kubeconfig: dagger.#Secret @dagger(input)
// deploy uses the `dagger.io/kubernetes` package to apply a manifest to a
// Kubernetes cluster.
@ -527,6 +526,7 @@ package main
import (
"encoding/yaml"
"dagger.io/dagger"
"dagger.io/docker"
)