![]() ![]() Note the annotation of /backend-path-prefix: “/”, this is required as the paths defined above do not exist on the backends, without this annotation we will receive 502 Bad Gateway errors. Kubernetes.io/ingress.class: azure/application-gatewayĪ/backend-path-prefix: "/" Using and created with kubectl apply -f ingress.yaml apiVersion: /v1 Kubectl apply -f luton-wembley-deployment.yaml Create the Ingress: Kubectl apply -f luton-scenes-deployment.yaml Kubectl apply -f luton-kenny-deployment.yaml Note the use of subPath in the volumesMounts section, I did this so I would only require one Azure File share, one place to upload the index-*.html and images files.Ĭreated the deployments with kubectl apply -f as below: kubectl apply -f luton-power-deployment.yaml MountPath: /usr/share/nginx/html/index.html Requests made to different path will be routed to different backend pods/services as shown below: Path based routing Create Kubernetes Deployments and Objects:Ĭreated four different deployments and services, as stored in GitHub at, one of the deployments below: apiVersion: apps/v1 Run terraform destroy to clean up the resources created: References:īuilding on my last blog post I wanted to enable path based routing in my cluster. ![]() Here we see the keys created, along with the aliases: The output of terraform apply below: Check via AWS console: Use the terraform commands, init, validate, plan before applying with terraform apply -var-file=./env/eu-west-1.tfvars it will force the build to destory and rebuild env/eu-west-1.tfvars # Do not change the order of these default values. Resource "aws_kms_alias" "clustername-alias" -alias"ĭescription = "AWS provider to be used to create roles, policies, S3 objects. The key to achieving this aim was the use of count.index in my terraform code to create multiple resources of the same kind, interating through my list of variables.Ĭount = length(var.clustername) //count will be number of keysĭescription = var.clustername Install terraform and set environment variables to connect to my AWS account (rather than entering keys in my terraform code. For now the secrets will be created without contents. We will also create secrets in AWS Secrets Manager with the newly created CMKs used for the Encryption key. The aim is to create multiple CMKs (Customer Managed Keys) in AWS KMS (Key Management Service) with Terraform with unique aliases from a list of variables. A quick post here as I didn’t find a suitable example online when researching. ![]()
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |