fix
This commit is contained in:
parent
d1cbb39ca1
commit
3321a59e23
@ -10,11 +10,6 @@
|
||||
#apt-get update
|
||||
#apt-get install docker-ce docker-ce-cli containerd.io -y
|
||||
|
||||
#Install kind kubernetes
|
||||
# apt -y install golang-go
|
||||
# GO111MODULE="on" go get sigs.k8s.io/kind@v0.11.1
|
||||
# echo 'export PATH=$PATH:/root/go/bin' >> /root/.bashrc && source /root/.bashrc
|
||||
|
||||
#Install kubectl
|
||||
#apt update
|
||||
#apt-get install -y apt-transport-https ca-certificates curl
|
||||
@ -23,24 +18,9 @@
|
||||
#apt-get update
|
||||
#apt-get install -y kubectl
|
||||
|
||||
#Create a kind cluster
|
||||
#cat <<EOF >> portainer.yaml
|
||||
## a cluster with 3 control-plane nodes and 3 workers
|
||||
#kind: Cluster
|
||||
#apiVersion: kind.x-k8s.io/v1alpha4
|
||||
#nodes:
|
||||
#- role: control-plane
|
||||
# extraPortMappings:
|
||||
# - containerPort: 30778
|
||||
# hostPort: 30778
|
||||
#- role: worker
|
||||
#- role: worker
|
||||
#- role: worker
|
||||
#EOF
|
||||
#kind create cluster --config portainer.yaml
|
||||
|
||||
#Install the Metrics Server
|
||||
#kubectl apply -f https://github.com/kubernetes-sigs/metrics-server/releases/latest/download/components.yaml
|
||||
#Create a minikube
|
||||
#curl -LO https://storage.googleapis.com/minikube/releases/latest/minikube_latest_amd64.deb
|
||||
#dpkg -i minikube_latest_amd64.deb
|
||||
|
||||
#Install httpie
|
||||
#apt -y install httpie
|
||||
@ -50,15 +30,28 @@
|
||||
#docker run -d -p 8000:8000 -p 9000:9000 --name=portainer --restart=always -v /var/run/docker.sock:/var/run/docker.sock -v portainer_data:/data portainer/portainer-ce
|
||||
|
||||
#Define Admin user and Password
|
||||
#http POST http://localhost:9000/api/users/admin/init Username="portainer" Password="portainer"
|
||||
#http POST http://localhost:9000/api/users/admin/init Username="portainer" Password="portainer1234"
|
||||
|
||||
#Get the admin JWT token
|
||||
#http POST :9000/api/auth Username="portainer" Password="portainer1234"
|
||||
#jwt=`http POST :9000/api/auth Username="portainer" Password="portainer1234" | jq '.jwt' | sed 's/^.//' | sed 's/.$//'`
|
||||
|
||||
#Add local Docker endpoint
|
||||
#http --form POST :9000/api/endpoints \
|
||||
#"Authorization: Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpZCI6MSwidXNlcm5hbWUiOiJwb3J0YWluZXIiLCJyb2xlIjoxLCJleHAiOjE2MjU2MzUxNzB9.RF6-DxP_HAdRwkpi3fPTr7YPjzTBsaioi9Au3njY0YI" \
|
||||
#"Authorization: Bearer $jwt" \
|
||||
#Name="docker" EndpointCreationType=1
|
||||
|
||||
#Add the portainer user to the docker group
|
||||
usermod -aG docker portainer && newgrp docker
|
||||
|
||||
#Start minikube
|
||||
sudo -u portainer minikube start
|
||||
|
||||
#Add the metrics server to the minikube cluster
|
||||
sudo -u portainer minikube addons enable metrics-server
|
||||
|
||||
#Add Portainer Agent to the local kind Kubernetes cluster
|
||||
curl -L https://downloads.portainer.io/portainer-agent-k8s-nodeport.yaml -o portainer-agent-k8s.yaml; kubectl apply -f portainer-agent-k8s.yaml
|
||||
# curl -L https://downloads.portainer.io/portainer-agent-k8s-nodeport.yaml -o portainer-agent-k8s.yaml; kubectl apply -f portainer-agent-k8s.yaml
|
||||
#sleep 30
|
||||
|
||||
#Add local Kubernetes endpoint
|
||||
|
BIN
minikube_latest_amd64.deb
Normal file
BIN
minikube_latest_amd64.deb
Normal file
Binary file not shown.
Loading…
Reference in New Issue
Block a user