|
1 |
| -<!-- START doctoc generated TOC please keep comment here to allow auto update --> |
2 |
| -<!-- DON'T EDIT THIS SECTION, INSTEAD RE-RUN doctoc TO UPDATE --> |
3 |
| -**Table of Contents** *generated with [DocToc](https://github.com/thlorenz/doctoc)* |
| 1 | +# Kubernetes Cluster API Provider OpenStack |
4 | 2 |
|
5 |
| -- [Kubernetes cluster-api-provider-openstack Project](#kubernetes-cluster-api-provider-openstack-project) |
6 |
| - - [Community, discussion, contribution, and support](#community-discussion-contribution-and-support) |
7 |
| - - [Code of conduct](#code-of-conduct) |
8 |
| - - [Compatibility with Cluster API, Kubernetes and OpenStack Versions](#compatibility-with-cluster-api-kubernetes-and-openstack-versions) |
9 |
| - - [Getting Started](#getting-started) |
10 |
| - - [Prerequisites](#prerequisites) |
11 |
| - - [Cluster Creation](#cluster-creation) |
12 |
| - - [Managed OpenStack Security Groups](#managed-openstack-security-groups) |
13 |
| - - [Interacting with your cluster](#interacting-with-your-cluster) |
14 |
| - - [Cluster Deletion](#cluster-deletion) |
15 |
| - - [Trouble shooting](#trouble-shooting) |
16 |
| - - [Contributing](#contributing) |
| 3 | +[](https://goreportcard.com/report/kubernetes-sigs/cluster-api-provider-openstack) |
17 | 4 |
|
18 |
| -<!-- END doctoc generated TOC please keep comment here to allow auto update --> |
| 5 | +------ |
19 | 6 |
|
20 |
| -# Kubernetes cluster-api-provider-openstack Project |
| 7 | +Kubernetes-native declarative infrastructure for OpenStack. |
21 | 8 |
|
22 |
| -This repository hosts a concrete implementation of an OpenStack provider for the [cluster-api project](https://github.com/kubernetes-sigs/cluster-api). |
| 9 | +## What is the Cluster API Provider OpenStack |
23 | 10 |
|
24 |
| -## Community, discussion, contribution, and support |
| 11 | +The [Cluster API][cluster_api] brings |
| 12 | +declarative, Kubernetes-style APIs to cluster creation, configuration and |
| 13 | +management. |
25 | 14 |
|
26 |
| -Learn how to engage with the Kubernetes community on the [community page](http://kubernetes.io/community/). |
| 15 | +The API itself is shared across multiple cloud providers allowing for true OpenStack |
| 16 | +hybrid deployments of Kubernetes. It is built atop the lessons learned from |
| 17 | +previous cluster managers such as [kops][kops] and |
| 18 | +[kubicorn][kubicorn]. |
27 | 19 |
|
28 |
| -You can reach the maintainers of this project at: |
29 | 20 |
|
30 |
| -- [#cluster-api-openstack on Kubernetes Slack](https://kubernetes.slack.com/messages/cluster-api-openstack) |
31 |
| -- [SIG-Cluster-Lifecycle Mailing List](https://groups.google.com/forum/#!forum/kubernetes-sig-cluster-lifecycle) |
| 21 | +## Launching a Kubernetes cluster on OpenStack |
32 | 22 |
|
33 |
| -### Code of conduct |
| 23 | +Check out the [getting started guide](./docs/getting-started.md) for launching a cluster on OpenStack. |
34 | 24 |
|
35 |
| -Participation in the Kubernetes community is governed by the [Kubernetes Code of Conduct](code-of-conduct.md). |
| 25 | +## Features |
| 26 | + |
| 27 | +- Native Kubernetes manifests and API |
| 28 | +- Choice of Linux distribution (as long as a current cloud-init is available) |
| 29 | +- Support for single and multi-node control plane clusters |
| 30 | +- Deploy clusters with and without LBaaS available |
| 31 | +- Support for security groups |
| 32 | +- Doesn't use SSH for bootstrapping nodes |
36 | 33 |
|
37 | 34 | ------
|
38 | 35 |
|
39 |
| -## Compatibility with Cluster API, Kubernetes and OpenStack Versions |
| 36 | +## Compatibility with Cluster API and Kubernetes Versions |
40 | 37 |
|
41 | 38 | This provider's versions are compatible with the following versions of Cluster API:
|
42 | 39 |
|
43 |
| -||Cluster API v1alpha1 (v0.1)| |
44 |
| -|-|-| |
45 |
| -|OpenStack Provider v1alpha1 (ea309e7f)|✓| |
| 40 | +||Cluster API v1alpha1 (v0.1)|Cluster API v1alpha2 (v0.2)| |
| 41 | +|-|-|-| |
| 42 | +|OpenStack Provider v1alpha1 (release-0.1 branch)|✓|| |
| 43 | +|OpenStack Provider v1alpha2 (v0.2)||✓| |
46 | 44 |
|
47 | 45 | This provider's versions are able to install and manage the following versions of Kubernetes:
|
48 | 46 |
|
49 |
| -||Kubernetes 1.13.5+|Kubernetes 1.14|Kubernetes 1.15| |
| 47 | +||Kubernetes 1.13|Kubernetes 1.14|Kubernetes 1.15| |
50 | 48 | |-|-|-|-|
|
51 |
| -|OpenStack Provider v1alpha1 (ea309e7f)|✓|✓|✓| |
52 |
| - |
53 |
| -Kubernetes control plane and Kubelet versions are defined in `spec.versions.controlPlane` and `spec.versions.kubelet` of `cmd/clusterctl/examples/openstack/machines.yaml.template` respectively. |
54 |
| -You can generate `cmd/clusterctl/examples/openstack/out/machines.yaml` by running the `generate-yaml.sh` from the template and change the versions if you want. |
55 |
| - |
56 |
| -**NOTE**: Because the user is able to customize any `user-data`, it is also possible to deploy older versions. |
57 |
| -But we won't provide any examples or working templates. See [user-data in the examples](https://github.com/kubernetes-sigs/cluster-api-provider-openstack/tree/master/cmd/clusterctl/examples/openstack/provider-component/user-data). |
| 49 | +|OpenStack Provider v1alpha1 (release-0.1 branch)|✓|✓|✓| |
| 50 | +|OpenStack Provider v1alpha2 (v0.2)|||✓| |
58 | 51 |
|
59 |
| -This provider's versions are able to install kubernetes to the following versions of OpenStack: |
| 52 | +This provider's versions are able to install Kubernetes to the following versions of OpenStack: |
60 | 53 |
|
61 | 54 | ||OpenStack Pike|OpenStack Queens|OpenStack Rocky|OpenStack Stein|
|
62 | 55 | |-|-|-|-|-|
|
63 |
| -|OpenStack Provider v1alpha1 (ea309e7f)|✓|✓|✓|✓| |
| 56 | +|OpenStack Provider v1alpha1 (release-0.1 branch)|✓|✓|✓|✓| |
| 57 | +|OpenStack Provider v1alpha2 (v0.2)|+|✓|+|✓| |
| 58 | + |
| 59 | +Key: |
| 60 | +* `✓` tested |
| 61 | +* `+` should work, but we weren't able to test it |
64 | 62 |
|
65 | 63 | Each version of Cluster API for OpenStack will attempt to support two Kubernetes versions.
|
66 | 64 |
|
67 | 65 | **NOTE:** As the versioning for this project is tied to the versioning of Cluster API, future modifications to this
|
68 |
| -policy may be made to more closely align with other providers in the Cluster API ecosystem. |
| 66 | +policy may be made to more closely aligned with other providers in the Cluster API ecosystem. |
69 | 67 |
|
70 | 68 | ------
|
71 | 69 |
|
72 |
| -## Getting Started |
73 |
| - |
74 |
| -### Notice |
75 |
| -Currently `cluster-api-provider-openstack` project is evolving into `cluster-api v1alpha2`, please use `release-0.1` branch for `cluster-api v1alpha1` development as it provides function workable code and configurations. |
76 |
| - |
77 |
| -For more information, please refer to [v1alpha2](https://github.com/kubernetes-sigs/cluster-api-provider-openstack/issues/380) |
78 |
| - |
79 |
| -### Prerequisites |
| 70 | +## Operating system images |
80 | 71 |
|
81 |
| -1. Install `kustomize` v3.1.0+ (see [here](https://github.com/kubernetes-sigs/kustomize/releases). |
82 |
| -2. You can use either VM, container or existing Kubernetes cluster act as bootstrap cluster. |
83 |
| - - If you want to use VM, install [minikube](https://kubernetes.io/docs/tasks/tools/install-minikube/), version 0.30.0 or greater. |
84 |
| - - If you want to use container, install [kind](https://github.com/kubernetes-sigs/kind#installation-and-usage). |
85 |
| - - If you want to use existing Kubernetes cluster, prepare your kubeconfig. |
86 |
| -3. Install a [driver](https://github.com/kubernetes/minikube/blob/master/docs/drivers.md) **if you are using Minikube**. For Linux, we recommend kvm2. For MacOS, we recommend VirtualBox. |
87 |
| -4. An appropriately configured [Go development environment](https://golang.org/doc/install) |
88 |
| -5. Build the `clusterctl` tool and make it available in your `PATH` |
| 72 | +Note: Cluster API Provider OpenStack relies on a few prerequisites which have to be already |
| 73 | +installed in the used operating system images, e.g. a container runtime, kubelet, kubeadm,.. . |
| 74 | +Reference images can be found in [kubernetes-sigs/image-builder](https://github.com/kubernetes-sigs/image-builder/tree/master/images/capi). If it isn't possible to pre-install those |
| 75 | + prerequisites in the image, you can always deploy and execute some custom scripts |
| 76 | + through the [KubeadmConfig](https://github.com/kubernetes-sigs/cluster-api-bootstrap-provider-kubeadm). |
89 | 77 |
|
90 |
| - ```bash |
91 |
| - git clone https://github.com/kubernetes-sigs/cluster-api ${GOPATH}/src/sigs.k8s.io/cluster-api |
92 |
| - cd ${GOPATH}/src/sigs.k8s.io/cluster-api/ |
93 |
| - make clusterctl |
94 |
| - ``` |
95 |
| - |
96 |
| -### Cluster Creation |
97 |
| - |
98 |
| -1. Create the YAML files if needed. You can use the `examples/generate.sh` script as documented [here](examples/README.md). |
99 |
| - |
100 |
| -2. Create a cluster: |
101 |
| - - If you are using Minikube: |
102 |
| - |
103 |
| - ```bash |
104 |
| - clusterctl create cluster \ |
105 |
| - --bootstrap-type minikube --bootstrap-flags kubernetes-version=v1.15.0 \ |
106 |
| - -c examples/_out/cluster.yaml \ |
107 |
| - -m examples/_out/machines.yaml \ |
108 |
| - -p examples/_out/provider-components.yaml \ |
109 |
| - -a examples/addons.yaml |
110 |
| - ``` |
111 |
| - |
112 |
| - To choose a specific Minikube driver, please use the `--bootstrap-flags vm-driver=xxx` command line parameter. For example to use the kvm2 driver with clusterctl you would add `--bootstrap-flags vm-driver=kvm2`, for linux, if you haven't installed any driver, you can add `--bootstrap-flags vm-driver=none`. |
113 |
| - |
114 |
| - - If you are using Kind: |
115 |
| - |
116 |
| - ```bash |
117 |
| - clusterctl create cluster \ |
118 |
| - --bootstrap-type kind --bootstrap-cluster-cleanup=false \ |
119 |
| - -c examples/_out/cluster.yaml \ |
120 |
| - -m examples/_out/machines.yaml \ |
121 |
| - -p examples/_out/provider-components.yaml \ |
122 |
| - -a examples/addons.yaml |
123 |
| - # Alternatively |
124 |
| - make create-cluster |
125 |
| - ``` |
| 78 | +------ |
126 | 79 |
|
127 |
| - - If you are using an existing Kubernetes cluster: |
| 80 | +## Documentation |
128 | 81 |
|
129 |
| - ```bash |
130 |
| - clusterctl create cluster \ |
131 |
| - --bootstrap-cluster-kubeconfig ~/.kube/config \ |
132 |
| - -c examples/_out/cluster.yaml \ |
133 |
| - -m examples/_out/machines.yaml \ |
134 |
| - -p examples/_out/provider-components.yaml \ |
135 |
| - -a examples/addons.yaml |
136 |
| - ``` |
| 82 | +Documentation is in the `/docs` directory |
137 | 83 |
|
138 |
| -### Interacting with your cluster |
| 84 | +## Getting involved and contributing |
139 | 85 |
|
140 |
| -Once you have created a cluster, you can interact with the cluster and machine resources using kubectl: |
| 86 | +Are you interested in contributing to cluster-api-provider-openstack? We, the |
| 87 | +maintainers and community, would love your suggestions, contributions, and help! |
| 88 | +Also, the maintainers can be contacted at any time to learn more about how to get |
| 89 | +involved via the [cluster-api-openstack channel on Kubernetes Slack][slack] or the |
| 90 | +[SIG-Cluster-Lifecycle Mailing List](https://groups.google.com/forum/#!forum/kubernetes-sig-cluster-lifecycle). |
141 | 91 |
|
142 |
| -```bash |
143 |
| -kubectl --kubeconfig=kubeconfig get clusters |
144 |
| -kubectl --kubeconfig=kubeconfig get machines |
145 |
| -kubectl --kubeconfig=kubeconfig get machines -o yaml |
146 |
| -``` |
| 92 | +In the interest of getting more new people involved we try to tag issues with |
| 93 | +[`good first issue`][good_first_issue]. |
| 94 | +These are typically issues that have smaller scope but are good ways to start |
| 95 | +to get acquainted with the codebase. |
147 | 96 |
|
148 |
| -### Cluster Deletion |
| 97 | +We also encourage ALL active community participants to act as if they are |
| 98 | +maintainers, even if you don't have "official" write permissions. This is a |
| 99 | +community effort, we are here to serve the Kubernetes community. If you have an |
| 100 | +active interest and you want to get involved, you have real power! Don't assume |
| 101 | +that the only people who can get things done around here are the "maintainers". |
149 | 102 |
|
150 |
| -Use following command to delete a cluster and all resources it created. |
151 |
| -```bash |
152 |
| -clusterctl delete cluster --cluster <cluster-name> --bootstrap-type kind --kubeconfig kubeconfig --provider-components examples/_out/provider-components.yaml |
153 |
| -``` |
| 103 | +We also would love to add more "official" maintainers, so show us what you can |
| 104 | +do! |
154 | 105 |
|
155 |
| -Or you can manually delete all resources that were created as part of |
156 |
| -your openstack Cluster API Kubernetes cluster. |
| 106 | +This repository uses the Kubernetes bots. See a full list of the commands [here][prow]. |
| 107 | +Please also refer to the [Contribution Guide](CONTRIBUTING.md) and the [Development Guide](docs/development.md) for this project. |
157 | 108 |
|
158 |
| -1. Delete all of the node Machines in the cluster. Make sure to wait for the |
159 |
| - corresponding Nodes to be deleted before moving onto the next step. After this |
160 |
| - step, the master node will be the only remaining node. |
| 109 | +## Code of conduct |
161 | 110 |
|
162 |
| - ```bash |
163 |
| - kubectl --kubeconfig=kubeconfig delete machines -l set=node |
164 |
| - kubectl --kubeconfig=kubeconfig get nodes |
165 |
| - ``` |
| 111 | +Participation in the Kubernetes community is governed by the [Kubernetes Code of Conduct](code-of-conduct.md). |
166 | 112 |
|
167 |
| -2. Delete the master machine. |
168 |
| - ```bash |
169 |
| - kubectl --kubeconfig=kubeconfig delete machines -l set=master |
170 |
| - ``` |
| 113 | +## Github issues |
171 | 114 |
|
172 |
| -3. (optional) Delete the load balancer in your OpenStack cloud if you created them. |
| 115 | +### Bugs |
173 | 116 |
|
174 |
| -4. Delete the kubeconfig file that were created for your cluster. |
| 117 | +If you think you have found a bug please follow the instructions below. |
175 | 118 |
|
176 |
| - ```bash |
177 |
| - rm kubeconfig |
178 |
| - ``` |
| 119 | +- Please spend a small amount of time giving due diligence to the issue tracker. Your issue might be a duplicate. |
| 120 | +- Get the logs from the cluster controllers. Please paste this into your issue. |
| 121 | +- Open a [new issue][new_issue]. |
| 122 | +- Remember that users might be searching for your issue in the future, so please give it a meaningful title to help others. |
| 123 | +- Feel free to reach out to the Cluster API community on the [Kubernetes Slack][slack]. |
179 | 124 |
|
180 |
| -5. Delete the ssh keypair that were created for your cluster machine. |
| 125 | +### Tracking new features |
181 | 126 |
|
182 |
| - ```bash |
183 |
| - rm -rf $HOME/.ssh/openstack_tmp* |
184 |
| - ``` |
| 127 | +We also use the issue tracker to track features. If you have an idea for a feature, or think you can help Cluster API Provider OpenStack become even more awesome follow the steps below. |
185 | 128 |
|
186 |
| -### Troubleshooting |
| 129 | +- Open a [new issue][new_issue]. |
| 130 | +- Remember that users might be searching for your issue in the future, so please |
| 131 | + give it a meaningful title to help others. |
| 132 | +- Clearly define the use case, using concrete examples. |
| 133 | +- Some of our larger features will require some design. If you would like to |
| 134 | + include a technical design for your feature, please include it in the issue. |
| 135 | +- After the new feature is well understood, and the design agreed upon, we can |
| 136 | + start coding the feature. We would love for you to code it. So please open |
| 137 | + up a **WIP** *(work in progress)* pull request, and happy coding. |
187 | 138 |
|
188 |
| -Please refer to [Trouble shooting documentation](docs/trouble_shooting.md) for further info. |
189 | 139 |
|
190 |
| -## Contributing |
| 140 | +<!-- References --> |
191 | 141 |
|
192 |
| -Please refer to the [Contribution Guide](CONTRIBUTING.md) and [Development Guide](docs/development.md) for this project. |
| 142 | +[cluster_api]: https://github.com/kubernetes-sigs/cluster-api |
| 143 | +[kops]: https://github.com/kubernetes/kops |
| 144 | +[kubicorn]: http://kubicorn.io/ |
| 145 | +[slack]: https://kubernetes.slack.com/messages/cluster-api-openstack |
| 146 | +[good_first_issue]: https://github.com/kubernetes-sigs/cluster-api-provider-openstack/issues?q=is%3Aissue+is%3Aopen+sort%3Aupdated-desc+label%3A%22good+first+issue%22 |
| 147 | +[prow]: https://go.k8s.io/bot-commands |
| 148 | +[new_issue]: https://github.com/kubernetes-sigs/cluster-api-provider-openstack/issues/new |
0 commit comments