update openstack documentation

This commit is contained in:
Jesse Haka 2019-01-31 20:45:46 +02:00
parent 2590fe7c8d
commit 3f37dba17a
1 changed files with 19 additions and 16 deletions

View File

@ -3,13 +3,16 @@
**WARNING**: OpenStack support on kops is currently **alpha** meaning it is in the early stages of development and subject to change, please use with caution. **WARNING**: OpenStack support on kops is currently **alpha** meaning it is in the early stages of development and subject to change, please use with caution.
## Source your openstack RC ## Source your openstack RC
The Cloud Config used by the kubernetes API server and kubelet will be constructed from environment variables in the openstack RC file. The Cloud Config used by the kubernetes API server and kubelet will be constructed from environment variables in the openstack RC file. The openrc.sh file is usually located under `API access`.
```bash ```bash
source openstack.rc source openstack.rc
``` ```
**--OR--** **--OR--**
## Create config file ## Create config file
The config file contains the OpenStack credentials required to create a cluster. The config file has the following format: The config file contains the OpenStack credentials required to create a cluster. The config file has the following format:
```ini ```ini
[Default] [Default]
identity=<OS_AUTH_URL> identity=<OS_AUTH_URL>
@ -38,6 +41,7 @@ region=<OS_REGION_NAME>
## Environment Variables ## Environment Variables
It is important to set the following environment variables: It is important to set the following environment variables:
```bash ```bash
export OPENSTACK_CREDENTIAL_FILE=<config-file> # where <config-file> is the path of the config file export OPENSTACK_CREDENTIAL_FILE=<config-file> # where <config-file> is the path of the config file
export KOPS_STATE_STORE=swift://<bucket-name> # where <bucket-name> is the name of the Swift container to use for kops state export KOPS_STATE_STORE=swift://<bucket-name> # where <bucket-name> is the name of the Swift container to use for kops state
@ -46,6 +50,8 @@ export KOPS_STATE_STORE=swift://<bucket-name> # where <bucket-name> is the name
export KOPS_FEATURE_FLAGS="AlphaAllowOpenStack" export KOPS_FEATURE_FLAGS="AlphaAllowOpenStack"
``` ```
If your OpenStack does not have Swift you can use any other VFS store, such as S3.
## Creating a Cluster ## Creating a Cluster
```bash ```bash
@ -56,31 +62,28 @@ openstack volume type list
kops create cluster \ kops create cluster \
--cloud openstack \ --cloud openstack \
--name my-cluster.k8s.local \ --name my-cluster.k8s.local \
--state swift://my-cluster \ --state ${KOPS_STATE_STORE} \
--zones nova \ --zones nova \
--network-cidr 10.0.0.0/24 \ --network-cidr 10.0.0.0/24 \
--image CentOS \ --image <imagename> \
--master-count=3 \ --master-count=3 \
--node-count=1 \ --node-count=1 \
--node-size 2vCPUx8GB \ --node-size <flavorname> \
--master-size 2vCPUx8GB \ --master-size <flavorname> \
--etcd-storage-type CBS \ --etcd-storage-type <volumetype> \
--api-loadbalancer-type public \ --api-loadbalancer-type public \
--topology private \ --topology private \
--bastion \ --bastion \
--ssh-public-key ~/.ssh/id_rsa.pub \ --ssh-public-key ~/.ssh/id_rsa.pub \
--networking weave --networking weave \
--os-ext-net <externalnetworkname>
# to update a cluster # to update a cluster
kops update cluster my-cluster.k8s.local --state swift://my-cluster --yes kops update cluster my-cluster.k8s.local --state ${KOPS_STATE_STORE} --yes
# to delete a cluster # to delete a cluster
# Not implemented yet... kops delete cluster my-cluster.k8s.local --yes
# kops delete cluster my-cluster.k8s.local --yes
``` ```
## Features Still in Development #### Optional flags
* `--os-kubelet-ignore-az=true` Nova and Cinder have different availability zones, more information [Kubernetes docs](https://kubernetes.io/docs/concepts/cluster-administration/cloud-providers/#block-storage)
kops for OpenStack currently does not support these features:
* cluster delete