alias kubectl='microk8s.kubectl'
sudo snap install microk8s --classic --channel=1.18/stable
microk8s start
Enable Use ServiceAccountToken volumes linkerd/linkerd2#3260 (comment) kubeflow/manifests#974
sudo echo -e '\n--service-account-issuer=api
--service-account-signing-key-file=${SNAP_DATA}/certs/serviceaccount.key
--service-account-api-audiences=api' >> /var/snap/microk8s/current/args/kube-apiserver
microk8s enable storage metallb
# For use by MetalLB, assign a range of IP addresses at the end of the network’s subnet CIDR range.
microk8s status # check addons are started
microk8s inspect # check api daemon is started
kubectl create secret generic -n metallb-system memberlist --from-literal=secretkey="$(openssl rand -base64 128)"
https://verrazzano.io/docs/setup/install/installation/#install-the-verrazzano-platform-operator
kubectl apply -f https://github.com/verrazzano/verrazzano/releases/latest/download/operator.yaml
kubectl -n verrazzano-install rollout status deployment/verrazzano-platform-operator
kubectl apply -f - <<EOF
apiVersion: install.verrazzano.io/v1alpha1
kind: Verrazzano
metadata:
name: example-verrazzano
spec:
profile: dev
EOF
Check installation logs
kubectl logs -f \
$( \
kubectl get pod \
-l job-name=verrazzano-install-example-verrazzano \
-o jsonpath="{.items[0].metadata.name}" \
)
kubectl create namespace hello-helidon
kubectl label namespace hello-helidon verrazzano-managed=true
kubectl apply -f https://raw.githubusercontent.com/verrazzano/verrazzano/master/examples/hello-helidon/hello-helidon-comp.yaml
kubectl apply -f https://raw.githubusercontent.com/verrazzano/verrazzano/master/examples/hello-helidon/hello-helidon-app.yaml
Save GW host
HOST=$(kubectl get gateway hello-helidon-hello-helidon-appconf-gw -n hello-helidon -o jsonpath='{.spec.servers[0].hosts[0]}')
Ping helidon
curl -X GET "https://${HOST}/greet"
microk8s reset
snap remove --purge microk8s