...
Code Block | ||||||
---|---|---|---|---|---|---|
| ||||||
kind: ServiceAccount apiVersion: v1 metadata: name: octavia-ingress-controller namespace: kube-system --- kind: ClusterRoleBinding apiVersion: rbac.authorization.k8s.io/v1 metadata: name: octavia-ingress-controller roleRef: apiGroup: rbac.authorization.k8s.io kind: ClusterRole name: cluster-admin subjects: - kind: ServiceAccount name: octavia-ingress-controller namespace: kube-system |
...
Code Block | ||||||
---|---|---|---|---|---|---|
| ||||||
kind: ConfigMap apiVersion: v1 metadata: name: octavia-ingress-controller-config namespace: kube-system data: config: | cluster-name: <cluster_name> openstack: # domain-name: <domain_name> # Choose between domain-name or domain-id (do not use together) domain-id: <domain_id> username: <username> # user-id: <user_id> # Choose between user-id or username (do not use together) password: <user_id> project-id: <project_id> auth-url: <auth_url> region: <region> octavia: subnet-id: <subnet_id> floating-network-id: <public_net_id> manage-security-groups: <boolean_value> # If true, creates automatically SecurityGroup |
...
Info | ||
---|---|---|
| ||
It's advisable to create a service account associated to your project, if the is shared with other users, and use the credentials of this account. To get a service account you need to ask the Cloud@CNAF administrators. However, for testing purposes, for the moment you can use your personal credentials (username/password). |
Deploy octavia-ingress-controller
Info | ||
---|---|---|
| ||
StatefulSet is the workload API object used to manage stateful applications. Like a Deployment (preferred in stateless applications), a StatefulSet manages Pods that are based on an identical container spec. Unlike a Deployment, a StatefulSet maintains a sticky identity for each of their Pods. These pods are created from the same spec, but are not interchangeable: each has a persistent identifier that it maintains across any rescheduling. If you want to use storage volumes to provide persistence for your workload, you can use a StatefulSet as part of the solution. Although individual Pods in a StatefulSet are susceptible to failure, the persistent Pod identifiers make it easier to match existing volumes to the new Pods that replace any that have failed. |
...
Code Block | ||||||
---|---|---|---|---|---|---|
| ||||||
apiVersion: apps/v1 kind: StatefulSet metadata: name: octavia-ingress-controller namespace: kube-system labels: k8s-app: octavia-ingress-controller spec: replicas: 1 selector: matchLabels: k8s-app: octavia-ingress-controller serviceName: octavia-ingress-controller template: metadata: labels: k8s-app: octavia-ingress-controller spec: serviceAccountName: octavia-ingress-controller tolerations: - effect: NoSchedule # Make sure the pod can be scheduled on master kubelet. operator: Exists - key: CriticalAddonsOnly # Mark the pod as a critical add-on for rescheduling. operator: Exists - effect: NoExecute operator: Exists containers: - name: octavia-ingress-controller image: docker.io/k8scloudprovider/octavia-ingress-controller:latest imagePullPolicy: IfNotPresent args: - /bin/octavia-ingress-controller - --config=/etc/config/octavia-ingress-controller-config.yaml volumeMounts: - mountPath: /etc/kubernetes name: kubernetes-config readOnly: true - name: ingress-config mountPath: /etc/config hostNetwork: true volumes: - name: kubernetes-config hostPath: path: /etc/kubernetes type: Directory - name: ingress-config configMap: name: octavia-ingress-controller-config items: - key: config path: octavia-ingress-controller-config.yaml |
...
Code Block | ||||
---|---|---|---|---|
| ||||
$ kubectl describe pod/octavia-ingress-controller-0 $ kubectl logs pod/octavia-ingress-controller-0 |