diff --git a/docs/book/src/developer/tilt.md b/docs/book/src/developer/tilt.md index e79a5079b1b3..7fed95434d3d 100644 --- a/docs/book/src/developer/tilt.md +++ b/docs/book/src/developer/tilt.md @@ -13,7 +13,7 @@ workflow that offers easy deployments and rapid iterative builds. 1. [kustomize](https://github.com/kubernetes-sigs/kustomize/blob/master/docs/INSTALL.md) standalone (`kubectl kustomize` does not work because it is missing some features of kustomize v3) -1. [Tilt](https://docs.tilt.dev/install.html) v0.12.0 or newer +1. [Tilt](https://docs.tilt.dev/install.html) v0.16.0 or newer 1. [envsubst](https://github.com/drone/envsubst) or similar to handle clusterctl var replacement. Note: drone/envsubst releases v1.0.2 and earlier do not have the binary packaged under cmd/envsubst. It is @@ -186,8 +186,23 @@ tilt up This will open the command-line HUD as well as a web browser interface. You can monitor Tilt's status in either location. After a brief amount of time, you should have a running development environment, and you should now be able to -create a cluster. Please see the [Usage section in the Quick -Start](https://cluster-api.sigs.k8s.io/user/quick-start.html#usage) for more information on creating workload clusters. +create a cluster. There are [example worker cluster +configs](https://github.com/kubernetes-sigs/cluster-api/tree/master/test/infrastructure/docker/examples) available. +These can be customized for your specific needs. + + ## Available providers diff --git a/test/infrastructure/docker/examples/machine-pool.yaml b/test/infrastructure/docker/examples/machine-pool.yaml index f9e118c88faa..1c091605f040 100644 --- a/test/infrastructure/docker/examples/machine-pool.yaml +++ b/test/infrastructure/docker/examples/machine-pool.yaml @@ -1,5 +1,5 @@ # Creates a cluster with one control-plane node and one worker node -apiVersion: cluster.x-k8s.io/v1alpha3 +apiVersion: cluster.x-k8s.io/v1alpha4 kind: Cluster metadata: name: my-cluster @@ -12,17 +12,17 @@ spec: cidrBlocks: ["192.168.0.0/16"] serviceDomain: cluster.local controlPlaneRef: - apiVersion: controlplane.cluster.x-k8s.io/v1alpha3 + apiVersion: controlplane.cluster.x-k8s.io/v1alpha4 kind: KubeadmControlPlane name: controlplane namespace: default infrastructureRef: - apiVersion: infrastructure.cluster.x-k8s.io/v1alpha3 + apiVersion: infrastructure.cluster.x-k8s.io/v1alpha4 kind: DockerCluster name: my-cluster namespace: default --- -apiVersion: controlplane.cluster.x-k8s.io/v1alpha3 +apiVersion: controlplane.cluster.x-k8s.io/v1alpha4 kind: KubeadmControlPlane metadata: name: controlplane @@ -31,7 +31,7 @@ spec: replicas: 1 version: v1.19.1 infrastructureTemplate: - apiVersion: infrastructure.cluster.x-k8s.io/v1alpha3 + apiVersion: infrastructure.cluster.x-k8s.io/v1alpha4 kind: DockerMachineTemplate name: controlplane namespace: default @@ -45,13 +45,13 @@ spec: kubeletExtraArgs: eviction-hard: nodefs.available<0%,nodefs.inodesFree<0%,imagefs.available<0% --- -apiVersion: infrastructure.cluster.x-k8s.io/v1alpha3 +apiVersion: infrastructure.cluster.x-k8s.io/v1alpha4 kind: DockerCluster metadata: name: my-cluster namespace: default --- -apiVersion: infrastructure.cluster.x-k8s.io/v1alpha3 +apiVersion: infrastructure.cluster.x-k8s.io/v1alpha4 kind: DockerMachineTemplate metadata: name: controlplane @@ -60,7 +60,7 @@ spec: template: spec: {} --- -apiVersion: exp.cluster.x-k8s.io/v1alpha3 +apiVersion: exp.cluster.x-k8s.io/v1alpha4 kind: MachinePool metadata: name: worker-mp-0 @@ -72,25 +72,25 @@ spec: spec: bootstrap: configRef: - apiVersion: bootstrap.cluster.x-k8s.io/v1alpha3 + apiVersion: bootstrap.cluster.x-k8s.io/v1alpha4 kind: KubeadmConfig name: worker-mp-0-config namespace: default clusterName: my-cluster infrastructureRef: - apiVersion: exp.infrastructure.cluster.x-k8s.io/v1alpha3 + apiVersion: exp.infrastructure.cluster.x-k8s.io/v1alpha4 kind: DockerMachinePool name: worker-dmp-0 namespace: default version: v1.19.1 --- -apiVersion: exp.infrastructure.cluster.x-k8s.io/v1alpha3 +apiVersion: exp.infrastructure.cluster.x-k8s.io/v1alpha4 kind: DockerMachinePool metadata: name: worker-dmp-0 namespace: default --- -apiVersion: bootstrap.cluster.x-k8s.io/v1alpha3 +apiVersion: bootstrap.cluster.x-k8s.io/v1alpha4 kind: KubeadmConfig metadata: name: worker-mp-0-config diff --git a/test/infrastructure/docker/examples/simple-cluster-without-kcp.yaml b/test/infrastructure/docker/examples/simple-cluster-without-kcp.yaml index a90a879341b0..611aa0144da4 100644 --- a/test/infrastructure/docker/examples/simple-cluster-without-kcp.yaml +++ b/test/infrastructure/docker/examples/simple-cluster-without-kcp.yaml @@ -1,11 +1,11 @@ # Creates a cluster with one control-plane node and one worker node -apiVersion: infrastructure.cluster.x-k8s.io/v1alpha3 +apiVersion: infrastructure.cluster.x-k8s.io/v1alpha4 kind: DockerCluster metadata: name: my-cluster namespace: default --- -apiVersion: cluster.x-k8s.io/v1alpha3 +apiVersion: cluster.x-k8s.io/v1alpha4 kind: Cluster metadata: name: my-cluster @@ -18,18 +18,18 @@ spec: cidrBlocks: ["192.168.0.0/16"] serviceDomain: "cluster.local" infrastructureRef: - apiVersion: infrastructure.cluster.x-k8s.io/v1alpha3 + apiVersion: infrastructure.cluster.x-k8s.io/v1alpha4 kind: DockerCluster name: my-cluster namespace: default --- -apiVersion: infrastructure.cluster.x-k8s.io/v1alpha3 +apiVersion: infrastructure.cluster.x-k8s.io/v1alpha4 kind: DockerMachine metadata: name: controlplane-0 namespace: default --- -apiVersion: cluster.x-k8s.io/v1alpha3 +apiVersion: cluster.x-k8s.io/v1alpha4 kind: Machine metadata: labels: @@ -42,17 +42,17 @@ spec: clusterName: my-cluster bootstrap: configRef: - apiVersion: bootstrap.cluster.x-k8s.io/v1alpha3 + apiVersion: bootstrap.cluster.x-k8s.io/v1alpha4 kind: KubeadmConfig name: controlplane-0-config namespace: default infrastructureRef: - apiVersion: infrastructure.cluster.x-k8s.io/v1alpha3 + apiVersion: infrastructure.cluster.x-k8s.io/v1alpha4 kind: DockerMachine name: controlplane-0 namespace: default --- -apiVersion: bootstrap.cluster.x-k8s.io/v1alpha3 +apiVersion: bootstrap.cluster.x-k8s.io/v1alpha4 kind: KubeadmConfig metadata: name: controlplane-0-config @@ -67,7 +67,7 @@ spec: kubeletExtraArgs: eviction-hard: nodefs.available<0%,nodefs.inodesFree<0%,imagefs.available<0% --- -apiVersion: infrastructure.cluster.x-k8s.io/v1alpha3 +apiVersion: infrastructure.cluster.x-k8s.io/v1alpha4 kind: DockerMachineTemplate metadata: name: worker @@ -76,7 +76,7 @@ spec: template: spec: {} --- -apiVersion: bootstrap.cluster.x-k8s.io/v1alpha3 +apiVersion: bootstrap.cluster.x-k8s.io/v1alpha4 kind: KubeadmConfigTemplate metadata: name: worker @@ -88,7 +88,7 @@ spec: kubeletExtraArgs: eviction-hard: nodefs.available<0%,nodefs.inodesFree<0%,imagefs.available<0% --- -apiVersion: cluster.x-k8s.io/v1alpha3 +apiVersion: cluster.x-k8s.io/v1alpha4 kind: MachineDeployment metadata: name: worker-md-0 @@ -104,10 +104,10 @@ spec: clusterName: my-cluster bootstrap: configRef: - apiVersion: bootstrap.cluster.x-k8s.io/v1alpha3 + apiVersion: bootstrap.cluster.x-k8s.io/v1alpha4 kind: KubeadmConfigTemplate name: worker infrastructureRef: - apiVersion: infrastructure.cluster.x-k8s.io/v1alpha3 + apiVersion: infrastructure.cluster.x-k8s.io/v1alpha4 kind: DockerMachineTemplate name: worker diff --git a/test/infrastructure/docker/examples/simple-cluster.yaml b/test/infrastructure/docker/examples/simple-cluster.yaml index ae5fceb69b82..9c67dad16679 100644 --- a/test/infrastructure/docker/examples/simple-cluster.yaml +++ b/test/infrastructure/docker/examples/simple-cluster.yaml @@ -1,11 +1,11 @@ # Creates a cluster with one control-plane node and one worker node -apiVersion: infrastructure.cluster.x-k8s.io/v1alpha3 +apiVersion: infrastructure.cluster.x-k8s.io/v1alpha4 kind: DockerCluster metadata: name: my-cluster namespace: default --- -apiVersion: cluster.x-k8s.io/v1alpha3 +apiVersion: cluster.x-k8s.io/v1alpha4 kind: Cluster metadata: name: my-cluster @@ -18,17 +18,17 @@ spec: cidrBlocks: ["192.168.0.0/16"] serviceDomain: "cluster.local" controlPlaneRef: - apiVersion: controlplane.cluster.x-k8s.io/v1alpha3 + apiVersion: controlplane.cluster.x-k8s.io/v1alpha4 kind: KubeadmControlPlane name: controlplane namespace: default infrastructureRef: - apiVersion: infrastructure.cluster.x-k8s.io/v1alpha3 + apiVersion: infrastructure.cluster.x-k8s.io/v1alpha4 kind: DockerCluster name: my-cluster namespace: default --- -apiVersion: infrastructure.cluster.x-k8s.io/v1alpha3 +apiVersion: infrastructure.cluster.x-k8s.io/v1alpha4 kind: DockerMachineTemplate metadata: name: controlplane @@ -37,7 +37,7 @@ spec: template: spec: {} --- -apiVersion: controlplane.cluster.x-k8s.io/v1alpha3 +apiVersion: controlplane.cluster.x-k8s.io/v1alpha4 kind: KubeadmControlPlane metadata: name: controlplane @@ -46,7 +46,7 @@ spec: replicas: 1 version: v1.19.1 infrastructureTemplate: - apiVersion: infrastructure.cluster.x-k8s.io/v1alpha3 + apiVersion: infrastructure.cluster.x-k8s.io/v1alpha4 kind: DockerMachineTemplate name: controlplane namespace: default @@ -65,7 +65,7 @@ spec: kubeletExtraArgs: eviction-hard: nodefs.available<0%,nodefs.inodesFree<0%,imagefs.available<0% --- -apiVersion: infrastructure.cluster.x-k8s.io/v1alpha3 +apiVersion: infrastructure.cluster.x-k8s.io/v1alpha4 kind: DockerMachineTemplate metadata: name: worker @@ -74,7 +74,7 @@ spec: template: spec: {} --- -apiVersion: bootstrap.cluster.x-k8s.io/v1alpha3 +apiVersion: bootstrap.cluster.x-k8s.io/v1alpha4 kind: KubeadmConfigTemplate metadata: name: worker @@ -86,7 +86,7 @@ spec: kubeletExtraArgs: eviction-hard: nodefs.available<0%,nodefs.inodesFree<0%,imagefs.available<0% --- -apiVersion: cluster.x-k8s.io/v1alpha3 +apiVersion: cluster.x-k8s.io/v1alpha4 kind: MachineDeployment metadata: name: worker-md-0 @@ -102,10 +102,10 @@ spec: clusterName: my-cluster bootstrap: configRef: - apiVersion: bootstrap.cluster.x-k8s.io/v1alpha3 + apiVersion: bootstrap.cluster.x-k8s.io/v1alpha4 kind: KubeadmConfigTemplate name: worker infrastructureRef: - apiVersion: infrastructure.cluster.x-k8s.io/v1alpha3 + apiVersion: infrastructure.cluster.x-k8s.io/v1alpha4 kind: DockerMachineTemplate name: worker