Created
February 23, 2024 18:08
-
-
Save brandonros/c0fc2a7d96bb60b9db6a05a210affa83 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
#!/bin/bash | |
set -x | |
# run installer | |
curl -sfL https://get.k3s.io | sh - | |
# set up .kube/config for user | |
KUBECONFIG_CONTENT=$(sudo k3s kubectl config view --raw) | |
mkdir -p "/home/$USER/.kube" | |
echo "$KUBECONFIG_CONTENT" > "/home/$USER/.kube/config" | |
chmod 600 "/home/$USER/.kube/config" | |
# add KUBECONFIG to environment | |
export KUBECONFIG="/home/$USER/.kube/config" | |
# poll kube-system deployments | |
kubectl rollout status -n kube-system deployment/coredns | |
kubectl rollout status -n kube-system deployment/local-path-provisioner | |
kubectl rollout status -n kube-system deployment/metrics-server | |
kubectl rollout status -n kube-system deployment/traefik |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment