-
Notifications
You must be signed in to change notification settings - Fork 9
Expand file tree
/
Copy pathArgoCD
More file actions
65 lines (40 loc) · 2.24 KB
/
Copy pathArgoCD
File metadata and controls
65 lines (40 loc) · 2.24 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
# kOps Setup
# ------------------------------------------------
curl -Lo kops https://github.com/kubernetes/kops/releases/download/$(curl -s https://api.github.com/repos/kubernetes/kops/releases/latest | grep tag_name | cut -d '"' -f 4)/kops-linux-amd64
chmod +x kops
sudo mv kops /usr/local/bin/kops
# Install kubectl
# ----------------------------
curl -LO "https://dl.k8s.io/release/$(curl -L -s https://dl.k8s.io/release/stable.txt)/bin/linux/amd64/kubectl"
chmod +x kubectl
mv kubectl /usr/local/bin/
# kOps Setup
# ----------------------------
export KOPS_STATE_STORE=s3://ccit.k8s.bucket
kops create cluster --zones=ap-south-1a,ap-south-1b --name ccit.k8s.local --master-count=1 --master-size=m7i-flex.large --master-volume-size=30 --node-count=2 --node-size=c7i-flex.large --node-volume-size=20 --image=ami-019715e0d74f695be
kops update cluster --name ccit.k8s.local --yes --admin
# Install ArgoCD
# ----------------------------
kubectl create namespace argocd
kubectl apply -n argocd -f https://raw.githubusercontent.com/argoproj/argo-cd/stable/manifests/install.yaml
kubectl get all -n argocd
# Expose ArgoCD - this command will provide load balancer URL to access ARGO CD
kubectl patch svc argocd-server -n argocd -p '{"spec": {"type": "LoadBalancer"}}'
yum install jq -y
export ARGOCD_SERVER='kubectl get svc argocd-server -n argocd -o json | jq --raw-output '.status.loadBalancer.ingress[0].hostname''
echo $ARGOCD_SERVER
kubectl get svc argocd-server -n argocd -o json | jq --raw-output .status.loadBalancer.ingress[0].hostname
# TO GET ARGO CD PASSWORD:
#------------------------------
export ARGO_PWD='kubectl -n argocd get secret argocd-initial-admin-secret -o jsonpath="{.data.password}" | base64 -d'
echo $ARGO_PWD
kubectl -n argocd get secret argocd-initial-admin-secret -o jsonpath="{.data.password}" | base64 -d
#
#-------------------------------
kubectl create -f https://raw.githubusercontent.com/kubernetes/ingress-nginx/controller-v1.2.1/deploy/static/provider/cloud/deploy.yaml
kubectl get ing
yum install git -y
git clone https://github.com/cloudcomputingintelugu/k8s_ingress.git
cd kubernetes/ingress
kubectl apply -f .
kubectl apply -f https://raw.githubusercontent.com/kubernetes/ingress-nginx/main/deploy/static/provider/aws/deploy.yaml