https://github.com/jrhrmsll/minikube-arm64
A foundation to play locally with Kubernetes
https://github.com/jrhrmsll/minikube-arm64
docker kubernetes parallels vagrant
Last synced: 4 months ago
JSON representation
A foundation to play locally with Kubernetes
- Host: GitHub
- URL: https://github.com/jrhrmsll/minikube-arm64
- Owner: jrhrmsll
- License: mit
- Created: 2022-10-23T19:05:28.000Z (over 3 years ago)
- Default Branch: main
- Last Pushed: 2023-03-07T00:47:03.000Z (over 3 years ago)
- Last Synced: 2025-01-28T21:45:09.556Z (over 1 year ago)
- Topics: docker, kubernetes, parallels, vagrant
- Language: Shell
- Homepage:
- Size: 43.9 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# minikube on Linux arm64
minikube setup based on ubuntu-20.04-arm64 running as a Vagrant Virtual Machine with the _Parallels_ provider.
## Applications
- Docker
- Docker Compose
- minikube
## Just start
### Start the Virtual Machine
```
vagrant up
```
### SSH into the Virtual Machine
```
vagrant ssh
```
### Launch minikube
```
minikube start --kubernetes-version=v1.25.3
```
### Install kubectl
```
curl -LO https://dl.k8s.io/release/v1.25.3/bin/linux/arm64/kubectl
```
```
curl -LO https://dl.k8s.io/release/v1.25.3/bin/linux/arm64/kubectl.sha256
echo "$(cat kubectl.sha256) kubectl" | sha256sum --check
```
```
sudo install -o root -g root -m 0755 kubectl /usr/local/bin/kubectl
```
## Operations
### Get all running pods!
```
kubectl get pods -A
```
### Create a job
```
kubectl create job hello --image nixery.dev/arm64/shell -- echo "Hello World"
```
### Expose Kubernetes API using kubectl proxy
```
kubectl proxy --port=8080 --address=0.0.0.0 --accept-hosts='.+'
```
#### Test Kubernetes API from the host machine
```
curl http://localhost:8080/apis
```
## Programming (Go)
The [src](https://github.com/jrhrmsll/minikube-arm64/tree/main/src) directory contains an simple program using the [client-go](https://github.com/kubernetes/client-go) library, to talk with the Kubernetes API
and list the existing jobs in the default namespace.
To create the program binary run (from the `src` directory):
```
GOOS=linux go build -o jobs main.go
```
in the **host** machine and execute the following in the **guess** one:
```
/vagrant/src/jobs
```
the output should be similar to:
```
hello
```
the name of the Job created before in the `default` namespace.