Commit f91504ce authored by João Lino's avatar João Lino

Initial commit for installing demo CI/CD node.

parents
##LDE specific
.project
*.iml
*.idea
#!/bin/sh
# print token
token=$(microk8s kubectl -n kube-system get secret | grep default-token | cut -d " " -f1)
kubectl -n kube-system describe secret $token
# expose dashboard
microk8s kubectl port-forward -n kube-system service/kubernetes-dashboard 10443:443 --address 0.0.0.0 &
#!/bin/bash
# install microk8s
sudo snap install microk8s --classic --channel=1.18/stable
sudo usermod -a -G microk8s $USER
sudo chown -f -R $USER ~/.kube
su - $USER
# test microk8s
microk8s status --wait-ready
microk8s inspect
# test kubernetes
microk8s kubectl get nodes
microk8s kubectl get services
# add dns, dashboard, ingress and storage to microk8s
microk8s enable dns dashboard ingress storage
# print default token for dashboard access
token=$(microk8s kubectl -n kube-system get secret | grep default-token | cut -d " " -f1)
kubectl -n kube-system describe secret $token
# setup local execution environment
sudo ln -s /snap/microk8s/current/kubectl /usr/local/bin/kubectl
kubectl config view --raw > ~/.kube/config
# create namespaces
kubectl create -f namespace-demo.json
# install helm
sudo snap install helm --classic
# add stable repo do helm3
helm repo add stable https://kubernetes-charts.storage.googleapis.com/
helm repo update
{
"apiVersion": "v1",
"kind": "Namespace",
"metadata": {
"name": "demo-infra",
"labels": {
"name": "demo-infra"
}
}
}
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment