Add support for managed kubernetes
Current implementation starts and provisions our own kubernetes cluster and integrates with gitlab.
Digital ocean, aws, and azure all support managed kubernetes services.
Do best effort in seamlessly being able to use either our own cluster or managed kubernetes.
Status
-
v1.0 - 1 cloud provider with no gitlab integration - [ 9c8712c8 ]
-
v1.1 - At least 2 cloud providers -
v2.0 - At least 2 cloud providers with gitlab integration
Using managed kubernetes will mean using nginx ingress controller with cloud load balancer.
Here are the various items created using the digitalocean_nginx_ingress_controller:
kubectl apply -f https://raw.githubusercontent.com/kubernetes/ingress-nginx/controller-v1.1.0/deploy/static/provider/do/deploy.yaml
namespace/ingress-nginx created
serviceaccount/ingress-nginx created
configmap/ingress-nginx-controller created
clusterrole.rbac.authorization.k8s.io/ingress-nginx created
clusterrolebinding.rbac.authorization.k8s.io/ingress-nginx created
role.rbac.authorization.k8s.io/ingress-nginx created
rolebinding.rbac.authorization.k8s.io/ingress-nginx created
service/ingress-nginx-controller-admission created
service/ingress-nginx-controller created
deployment.apps/ingress-nginx-controller created
ingressclass.networking.k8s.io/nginx created
validatingwebhookconfiguration.admissionregistration.k8s.io/ingress-nginx-admission created
serviceaccount/ingress-nginx-admission created
clusterrole.rbac.authorization.k8s.io/ingress-nginx-admission created
clusterrolebinding.rbac.authorization.k8s.io/ingress-nginx-admission created
role.rbac.authorization.k8s.io/ingress-nginx-admission created
rolebinding.rbac.authorization.k8s.io/ingress-nginx-admission created
job.batch/ingress-nginx-admission-create created
job.batch/ingress-nginx-admission-patch created
Some misc notes:
- App ingress routing - https://kubernetes.io/docs/concepts/services-networking/ingress/
- nginx-controller deployment creates a load balancer that does not get managed in terraform
- vpc cannot be destroyed while LB is still online, need to figure out creating in terraform and attaching
Some links - should have have added before closing some:
- https://kubernetes.io/docs/concepts/services-networking/service/#loadbalancer
- https://kubernetes.io/docs/concepts/services-networking/ingress/#tls
- https://kubernetes.io/docs/reference/kubernetes-api/service-resources/ingress-v1/
- https://kubernetes.io/docs/concepts/configuration/secret/#tls-secrets
- https://registry.terraform.io/providers/digitalocean/digitalocean/latest/docs/resources/loadbalancer
Edited by kc