layout | title | version | date | editor | ||||
---|---|---|---|---|---|---|---|---|
page |
IN2 DOME GitOps |
0.0.1 |
2024-05-29 |
|
- ionosctl-cli
- jq
- kubectl
- kubeseal
NOTE: to get the token, you will need to access the IONOS Cloud Panel and create a new API token: Management > Token Management > Generate Token.
ionosctl login -t <token>
export IN2_DOME_DEV_DATACENTER_ID=$(ionosctl datacenter create --name in2-ssi-dev -o json | jq -r '.items[0].id')
watch ionosctl datacenter get -i $IN2_DOME_DEV_DATACENTER_ID
export IN2_DOME_DEV_K8S_CLUSTER_ID=$(ionosctl k8s cluster create --name in2-ssi-dev-k8s -o json | jq -r '.items[0].id')
watch ionosctl k8s cluster get -i $IN2_DOME_DEV_K8S_CLUSTER_ID
export IN2_DOME_DEV_K8S_DEFAULT_NODE_POOL_ID=$(ionosctl k8s nodepool create --cluster-id $IN2_DOME_DEV_K8S_CLUSTER_ID --name default-pool --node-count 2 --ram 8192 --storage-size 10 --datacenter-id $IN2_DOME_DEV_DATACENTER_ID --cpu-family "INTEL_SKYLAKE" -o json | jq -r '.items[0].id')
watch ionosctl k8s nodepool get --nodepool-id $IN2_DOME_K8S_DEFAULT_NODEPOOL_ID --cluster-id $IN2_DOME_DEV_K8S_CLUSTER_ID
ionosctl k8s nodepool create --cluster-id $IN2_DOME_DEV_K8S_CLUSTER_ID \ --name ingress --node-count 1 --datacenter-id $IN2_DOME_DEV_DATACENTER_ID --cpu-family "INTEL_SKYLAKE" --labels nodepool=ingress
ionosctl k8s kubeconfig get --cluster-id $IN2_DOME_DEV_K8S_CLUSTER_ID > in2-dome-dev-k8s-config.json
export KUBECONFIG=$(pwd)/in2-dome-dev-k8s-config.json
kubectl config get-contexts
kubectl config use-context cluster-admin@in2-ssi-dev-k8s
kubectl create namespace argocd
kubectl apply -k ./extension/ -n argocd
kubectl apply -f applications_dev/namespaces.yaml -n argocd
NOTE: This environment is for dev purposes, we do not need to encrypt the secrets.
kubectl apply -f applications_dev/sealed-secrets.yaml -n argocd
kubectl apply -f applications_dev/ingress.yaml -n argocd
NOTE: You can get all the applications deployed in the argocd namespace by running the following command:
kubectl get applications -n argocd
brew install argocd
kubectl port-forward svc/argocd-server -n argocd 8080:443
NOTE: Open your browser and go to http://localhost:8080 and login with the default credentials:
admin
/admin
.
argocd admin initial-password -n argocd