Skip to content
This repository was archived by the owner on Oct 22, 2021. It is now read-only.
This repository was archived by the owner on Oct 22, 2021. It is now read-only.

Deploy KubeCF on Kind - Windows + WSL2 + Docker Addendum #38

@jimconner

Description

@jimconner

Not really an issue as such - more of a suggestion to improve the docs when using kind on Windows inside WSL2.

Ingress to docker containers works differently for Windows than it does on Linux so the default instructions which use the node IP as the system domain do not work correctly for people on Windows platform.

Here's the workaround that I used to get things up and working.

  1. Create a cluster config for kind that sets up 80 & 443 as ingress ports.
cat << _EOF_ > cluster.yml
kind: Cluster
apiVersion: kind.x-k8s.io/v1alpha4
nodes:
- role: control-plane
  kubeadmConfigPatches:
  - |
    kind: InitConfiguration
    nodeRegistration:
      kubeletExtraArgs:
        node-labels: "ingress-ready=true"
  extraPortMappings:
  - protocol: TCP
    containerPort: 80
    hostPort: 80
  - protocol: TCP
    containerPort: 443
    hostPort: 443
containerdConfigPatches:
  - |-
    [plugins."io.containerd.grpc.v1.cri".containerd]
    disable_snapshot_annotations = true
_EOF_
  1. Create the cluster specifying the cluster.yml config file.
kind create cluster --name kubecf --config=cluster.yml
  1. After creating the values.yml file, edit it and change the system_domain to 127.0.0.1.nip.io

e.g. values.yml ends up looking something like this

system_domain: 127.0.0.1.nip.io
services:
  router:
    externalIPs:
    - 172.17.0.2
features:
  eirini:
    enabled: true
install_stacks: ["sle15"]

The rest of the install is as normal.
After install, cf api --skip-ssl-validation api.127.0.0.1.nip.io

From that point on, everything works properly. You can acess the apps you push to cf from your windows browser etc.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions