Skip to content

Instantly share code, notes, and snippets.

@mstred
Last active May 7, 2023 18:50
Show Gist options
  • Save mstred/eb0c4ac8c6abf8f8ef0e02aacef0907a to your computer and use it in GitHub Desktop.
Save mstred/eb0c4ac8c6abf8f8ef0e02aacef0907a to your computer and use it in GitHub Desktop.
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