weaveworks / wks-quickstart-firekube

Example configuration to create Kubernetes clusters powered by ignite and gitops
342 stars 372 forks source link

Fails to start with wksctl 0.8.1 or 0.8.2-alpha1 #69

Open NicolasRouquette opened 5 years ago

NicolasRouquette commented 5 years ago

I'm running on this system:

uname -a
Linux rouquette-Precision-7530 5.0.0-31-generic #33-Ubuntu SMP Mon Sep 30 18:51:59 UTC 2019 x86_64 x86_64 x86_64 GNU/Linux
kubectl version
Client Version: version.Info{Major:"1", Minor:"16", GitVersion:"v1.16.1", GitCommit:"d647ddbd755faf07169599a625faf302ffc34458", GitTreeState:"clean", BuildDate:"2019-10-07T14:30:40Z", GoVersion:"go1.12.10", Compiler:"gc", Platform:"linux/amd64"}

With wksctl 0.8.1, I get this behavior:

./setup.sh 
• Using git branch: master
• Using git remote: origin

• Found jk 0.3.0
• Found footloose 0.6.2
• Found ignite 0.6.2
• Found wksctl 0.8.1
• Creating footloose manifest
• Creating virtual machines
INFO[0000] Docker Image: weaveworks/ignite-centos:firekube-pre3 present locally 
INFO[0000] Creating machine: firekube-node0 ...         
INFO[0000] Machine firekube-node0 is already created... 
INFO[0000] Creating machine: firekube-node1 ...         
INFO[0000] Machine firekube-node1 is already created... 
• Creating Cluster API manifests
• Updating container images and git parameters
• Pushing initial cluster configuration
[master 20cf4a5] Initial cluster configuration
 4 files changed, 66 insertions(+), 2 deletions(-)
 create mode 100644 footloose.yaml
 create mode 100644 machines.yaml
Enumerating objects: 9, done.
Counting objects: 100% (9/9), done.
Delta compression using up to 12 threads
Compressing objects: 100% (6/6), done.
Writing objects: 100% (6/6), 1.62 KiB | 1.62 MiB/s, done.
Total 6 (delta 3), reused 0 (delta 0)
remote: Resolving deltas: 100% (3/3), completed with 3 local objects.
To github.com:NicolasRouquette/wks-quickstart-firekube.git
   0d7364e..20cf4a5  HEAD -> master
• Installing Kubernetes cluster
Error: failed to create SSH client: failed to connect to 127.0.0.1:2222: ssh: handshake failed: ssh: host key mismatch
Usage:
  wksctl apply [flags]

Flags:
      --cluster string              Location of cluster manifest (default "cluster.yaml")
      --config-directory string     Directory containing configuration information for the cluster (default ".")
      --git-branch string           Git branch WKS should use to sync with your cluster (default "master")
      --git-deploy-key string       Path to the Git deploy key
      --git-path string             Relative path to files in Git (default ".")
      --git-url string              Git repo containing your cluster and machine information
  -h, --help                        help for apply
      --machines string             Location of machines manifest (default "machines.yaml")
      --namespace string            namespace override for WKS components (default "weavek8sops")
      --sealed-secret-cert string   Path to a certificate used to encrypt sealed secrets
      --sealed-secret-key string    Path to a key used to decrypt sealed secrets
      --use-manifest-namespace      use namespaces from supplied manifests (overriding any --namespace argument)

Global Flags:
  -v, --verbose   Enable verbose output

failed to create SSH client: failed to connect to 127.0.0.1:2222: ssh: handshake failed: ssh: host key mismatch

For wksctl 0.8.2-alpha1, I modified cluster.yaml to remove spec.providerSpec.sshKeyPath Instead, I added to the setup.sh script:

wksctl apply --git-url="$(git_http_url "$(git_remote_fetchurl "${git_remote}")")" --git-branch="$(git_current_branch)" --ssh-key ${SCRIPT_DIR}/$cluster_key ${git_deploy_key} 

I get the same error:

...
• Installing Kubernetes cluster
Error: failed to create SSH client: failed to connect to 127.0.0.1:2222: ssh: handshake failed: ssh: host key mismatch