Last active
May 7, 2023 18:50
-
-
Save mstred/eb0c4ac8c6abf8f8ef0e02aacef0907a to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
cat <<EOF > config.yaml | |
--- | |
apiVersion: kubeadm.k8s.io/v1beta2 | |
kind: ClusterConfiguration | |
networking: | |
podSubnet: 10.244.0.0/16 | |
apiServer: | |
extraArgs: | |
service-node-port-range: 8000-31274 | |
EOF | |
sudo kubeadm init --config config.yaml | |
mkdir -p $HOME/.kube | |
sudo cp -i /etc/kubernetes/admin.conf $HOME/.kube/config | |
sudo chown $(id -u):$(id -g) $HOME/.kube/config | |
kubectl apply -f https://github.com/flannel-io/flannel/releases/latest/download/kube-flannel.yml | |
curl -s https://raw.githubusercontent.com/kubernetes/helm/master/scripts/get-helm-3 | bash | |
helm repo add prometheus-community https://prometheus-community.github.io/helm-charts | |
helm repo add grafana https://grafana.github.io/helm-charts | |
helm repo update | |
kubectl create ns prometheus | |
kubectl create ns grafana | |
helm install -n prometheus prometheus prometheus-community/prometheus --set server.persistentVolume.enabled=false --set alertmanager.persistence.enabled=false | |
helm install -n grafana grafana grafana/grafana --set service.type=NodePort --set service.nodePort=8080 | |
kubectl get secret --namespace grafana grafana -o jsonpath="{.data.admin-password}" | base64 --decode ; echo |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment