kube-ship
allows you to create Kubernetes clusters leveraging
cluster-api
. It supports the following cluster-api
providers as of today:
cluster-api
providers usually allow you to create infrastructure
using their own clusterctl
command. kube-ship
aims to unify this
setup, so you can use kube-ship
to create the infrastructure using any
cluster-api
provider.
You can think about kube-ship
as the clusterctl
for many cluster-api
provider implementations.
You can find some examples in the samples
directory. Each
file defines a complete way of deploying a cluster in the given
provider. All you should need is a Cluster
definition, and a couple
of MachineDeployment
objects, aside from provider-specific
authentication.
Building:
# make build
Installing:
# make install
Several environment variables need to be set so they can be propagated to the proxmox cluster-api provider manager:
PROXMOX_HOSTPORT
- Example:
a-proxmox.some-company.intra.net:8006
- Example:
PROXMOX_USERNAME
- Example:
root@pam
- Example:
PROXMOX_PASSWORD
- Example:
mypassword
- Example:
PROXMOX_HYPERVISOR_NAME
- Example:
proxmox
- Example:
PROXMOX_HYPERVISOR_SNIPPETS_STORAGE
- Example:
ci-snippets
- Important: make sure you create this volume using the Proxmox UI
with
Snippets
content.
- Example:
VM_TEMPLATE_ID
- Example:
9000
- Important: make sure you have created this template beforehand.
- Example:
# PROXMOX_HOSTPORT=... PROXMOX_USERNAME=... (...) kube-ship --config samples/proxmox.yaml
Before running the command, please check samples/openstack.yaml
file
for all settings that have to be configured. After you have configured
everything required in this file, you can go ahead and create the infrastructure:
# kube-ship --config samples/openstack.yaml
kube-ship
will create a temporary kind
cluster, it will then deploy cluster-api
CRD's and controller inside
this temporary cluster.
kube-ship
will read your infrastructure definition, then it will
decide what specific provider needs to be created based on this
definition, and will deploy it on top of the temporary cluster. This
definition will also be applied automatically on this temporary
cluster.
After this temporary cluster using cluster-api
has created and
initialized the infrastructure remotely, this kind
temporary cluster
will be dropped.
- General cleanup and refactoring
- Support for AWS
- Support for Azure
- Support for GCE
- Allow for a "management cluster" (
--kubeconfig
param) instead of starting a temporarykind
based cluster - Check the best way to check when a deployment on the different
providers have finished
- Right now
kube-ship
waits for thePhase
status on each target machine to beRunning
, but not all providers behave in the same way
- Right now
- Download the target
kubeconfig
file - Pivot
cluster-api
definitions and actuators to the target cluster if a "management cluster" is not used
This project started as a SUSE Hackweek 2019 project.
Copyright 2019 Rafael Fernández López <ereslibre@ereslibre.es>
Copyright 2019 SUSE LLC
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.