Pada langkah awal lakukan inisiasi awscli dengan IAM Users yang memiliki policy AdministratorAccess seperti gambar di bawah.
lalu lakukan configure untuk awscli dengan menggunakan
lakukan pengecekan apabila konfigurasi sudah benar dengan command
Create Cluster
Apabila sudah dapat melakukan list eks cluster seperti response diatas, maka langsung lakukan create cluster dengan eksctl. Langkah pertama create file cluster.yaml
lalu jalankan command berikut
tunggu beberapa saat dan cek dashboard Console AWS di Services > EC2 .
lakukan verifikasi akses Kubernetes cluster dengan CLI kubectl
Konfigurasi Context di kubeconfig
TBD
selesai. enjoy orchestrating.
Install Ingress EKS L7
System requirements
AWS EKS cluster sudah dibuat
Sudah meng-install kubectl with context cluster
Inisiasi Ingress
Langkah pertama , lakukan inisiasi ingress pada cluster
Buat file `service-l7.yaml` sebagai berikut
Jalankan command di bawah ini
Konfigurasi SSL
untuk file service-l7.yaml sudah di include dengan certificate ssl. untuk menggenarate ssl dapat melakukan langkah dibawah ini
kind: Service
apiVersion: v1
metadata:
name: ingress-nginx
namespace: ingress-nginx
labels:
app.kubernetes.io/name: ingress-nginx
app.kubernetes.io/part-of: ingress-nginx
annotations:
# replace with the correct value of the generated certificate in the AWS console
service.beta.kubernetes.io/aws-load-balancer-ssl-cert: "arn:aws:acm:ap-southeast-1:924939894012:certificate/9f880639-7e47-41f4-bd9e-ed1f05616f1d"
# the backend instances are HTTP
service.beta.kubernetes.io/aws-load-balancer-backend-protocol: "http"
# Map port 443
service.beta.kubernetes.io/aws-load-balancer-ssl-ports: "https"
# Ensure the ELB idle timeout is less than nginx keep-alive timeout. By default,
# NGINX keep-alive is set to 75s. If using WebSockets, the value will need to be
# increased to '3600' to avoid any potential issues.
service.beta.kubernetes.io/aws-load-balancer-connection-idle-timeout: "60"
spec:
type: LoadBalancer
selector:
app.kubernetes.io/name: ingress-nginx
app.kubernetes.io/part-of: ingress-nginx
ports:
- name: http
port: 80
targetPort: http
- name: https
port: 443
targetPort: http
---