correcting minikube install #20
This file contains 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
name: Setup MicroK8s with QEMU Emulating ppc64le | |
on: | |
push: | |
branches: | |
- main | |
pull_request: | |
branches: | |
- main | |
jobs: | |
microk8s-setup: | |
runs-on: ubuntu-22.04 | |
steps: | |
- name: Checkout repository | |
uses: actions/checkout@v2 | |
- name: Set up QEMU for ppc64le emulation | |
uses: docker/setup-qemu-action@v3 | |
with: | |
platforms: linux/ppc64le | |
- name: Install Docker from official Docker repository | |
run: | | |
sudo apt-get update | |
sudo apt-get install -y \ | |
ca-certificates \ | |
curl \ | |
gnupg \ | |
lsb-release | |
sudo mkdir -m 0755 -p /etc/apt/keyrings | |
curl -fsSL https://download.docker.com/linux/ubuntu/gpg | sudo tee /etc/apt/keyrings/docker.asc | |
echo "deb [arch=ppc64el signed-by=/etc/apt/keyrings/docker.asc] https://download.docker.com/linux/ubuntu $(lsb_release -cs) stable" | sudo tee /etc/apt/sources.list.d/docker.list > /dev/null | |
sudo apt-get update | |
sudo apt-get install -y docker-ce docker-ce-cli containerd.io | |
- name: Enable QEMU emulation for ppc64le | |
run: | | |
docker run --rm --privileged multiarch/qemu-user-static --reset -p yes | |
- name: Install MicroK8s in emulated ppc64le environment | |
run: | | |
sudo apt-get update | |
sudo apt-get install -y snapd | |
sudo snap install microk8s --classic | |
- name: Enable MicroK8s Add-ons | |
run: | | |
sudo microk8s.enable dns storage | |
- name: Wait for MicroK8s to be ready | |
run: | | |
sudo microk8s status --wait-ready | |
- name: Verify ppc64le architecture in MicroK8s | |
run: | | |
MICROK8S_ARCH=$(sudo microk8s kubectl run --rm -i --tty busybox --image=busybox --restart=Never --command -- uname -m) | |
echo "MicroK8s architecture: $MICROK8S_ARCH" | |
if [ "$MICROK8S_ARCH" != "ppc64le" ]; then | |
echo "Emulation failed or wrong architecture. Expected ppc64le but got $MICROK8S_ARCH" | |
exit 1 | |
fi | |
- name: Test MicroK8s Cluster | |
run: | | |
sudo microk8s kubectl get nodes | |
sudo microk8s kubectl run test-pod --image=nginx --restart=Never --dry-run=client -o yaml | |
sudo microk8s kubectl get pods | |