Kubernetes cluster-api-provider-openstack Project
This repository hosts a concrete implementation of an OpenStack provider for the cluster-api project.
Community, discussion, contribution, and support
Learn how to engage with the Kubernetes community on the community page.
You can reach the maintainers of this project at:
Code of conduct
Participation in the Kubernetes community is governed by the Kubernetes Code of Conduct.
Install minikube, version 0.30.0 or greater.
Install a driver for minikube. For Linux, we recommend kvm2. For MacOS, we recommend VirtualBox.
An appropriately configured Go development environment
git clone https://github.com/kubernetes-sigs/cluster-api-provider-openstack $GOPATH/src/sigs.k8s.io/cluster-api-provider-openstack cd $GOPATH/src/sigs.k8s.io/cluster-api-provider-openstack/cmd/clusterctl go build
addons.yamlfiles if needed:
cd examples/openstack ./generate-yaml.sh cd ../..
**Note: **When generating
provider-components.yaml, you need input your openstack cloud provider information, which include:
You can get those information from your cloud provider.
Create a cluster:
clusterctl create cluster --minikube kubernetes-version=v1.12.1 --provider openstack -c examples/openstack/out/cluster.yaml -m examples/openstack/out/machines.yaml -p examples/openstack/out/provider-components.yaml
To choose a specific minikube driver, please use the
--vm-driver command line parameter. For example to use the kvm2 driver with clusterctl you woud add
--vm-driver kvm2, for linux, if you haven't installed any driver, you can add
Additional advanced flags can be found via help.
clusterctl create cluster --help
Interacting with your cluster
Once you have created a cluster, you can interact with the cluster and machine resources using kubectl:
kubectl --kubeconfig=kubeconfig get clusters kubectl --kubeconfig=kubeconfig get machines kubectl --kubeconfig=kubeconfig get machines -o yaml
This guide explains how to delete all resources that were created as part of your openstack Cluster API Kubernetes cluster.
Delete all of the node Machines in the cluster. Make sure to wait for the corresponding Nodes to be deleted before moving onto the next step. After this step, the master node will be the only remaining node.
kubectl --kubeconfig=kubeconfig delete machines -l set=node kubectl --kubeconfig=kubeconfig get nodes
Delete the master machine.
kubectl --kubeconfig=kubeconfig delete machines -l set=master
Delete the ssh keypair that were created for your cluster machine.
rm -rf $HOME/.ssh/openstack_tmp*