root@ip-172-31-36-8:~/cri-dockerd# history
1 curl -LO https://storage.googleapis.com/kubernetes-release/release/`curl -s https://storage.googleapis.com/kubernetes-release/release/stable.txt`/bin/linux/amd64/kubectl
2 chmod +x ./kubectl
3 sudo mv ./kubectl /usr/local/bin/kubectl
4 sudo apt-get update && > sudo apt-get install docker.io -y
5 curl -Lo minikube https://storage.googleapis.com/minikube/releases/latest/minikube-linux-amd64 && chmod +x minikube && sudo mv minikube /usr/local/bin/
6 sudo apt install conntrack -y
7 git clone https://github.com/Mirantis/cri-dockerd.git
# mkdir bin
#VERSION=$((git describe --abbrev=0 --tags | sed -e 's/v//') || echo $(cat VERSION)-$(git log -1 --pretty='%h')) PRERELEASE=$(grep -q dev <<< "${VERSION}" && echo "pre" || echo "") REVISION=$(git log -1 --pretty='%h')
10 mkdir bin
11 VERSION=$((git describe --abbrev=0 --tags | sed -e 's/v//') || echo $(cat VERSION)-$(git log -1 --pretty='%h')) PRERELEASE=$(grep -q dev <<< "${VERSION}" && echo "pre" || echo "") REVISION=$(git log -1 --pretty='%h')
12 go get && go build -ldflags="-X github.com/Mirantis/cri-dockerd/version.Version='$VERSION}' -X github.com/Mirantis/cri-dockerd/version.PreRelease='$PRERELEASE' -X github.com/Mirantis/cri-dockerd/version.BuildTime='$BUILD_DATE' -X github.com/Mirantis/cri-dockerd/version.GitCommit='$REVISION'" -o cri-dockerd
13 cd bin/
14 ls -l
15 wget https://storage.googleapis.com/golang/getgo/installer_linux
16 chmod +x ./installer_linux
17 ./installer_linux
18 source ~/.bash_profile
19 cd cri-dockerd
20 mkdir bin
21 go get && go build -o bin/cri-dockerd
22 mkdir -p /usr/local/bin
23 install -o root -g root -m 0755 bin/cri-dockerd /usr/local/bin/cri-dockerd
24 cp -a packaging/systemd/* /etc/systemd/system
25 sed -i -e 's,/usr/bin/cri-dockerd,/usr/local/bin/cri-dockerd,' /etc/systemd/system/cri-docker.service
26 systemctl daemon-reload
27 systemctl enable cri-docker.service
28 systemctl enable --now cri-docker.socket
29 cd cri-dockerd
30 cd ..
31 cd cri-dockerd/
32 mkdir bin
33 go get && go build -o bin/cri-dockerd
34 mkdir -p /usr/local/bin
35 install -o root -g root -m 0755 bin/cri-dockerd /usr/local/bin/cri-dockerd
36 cp -a packaging/systemd/* /etc/systemd/system
37 sed -i -e 's,/usr/bin/cri-dockerd,/usr/local/bin/cri-dockerd,' /etc/systemd/system/cri-docker.service
38 systemctl daemon-reload
39 systemctl enable cri-docker.service
40 systemctl enable --now cri-docker.socket
41 VERSION="v1.24.1"
42 curl -L https://github.com/kubernetes-sigs/cri-tools/releases/download/$VERSION/crictl-${VERSION}-linux-amd64.tar.gz --output crictl-${VERSION}-linux-amd64.tar.gz
43 sudo tar zxvf crictl-$VERSION-linux-amd64.tar.gz -C /usr/local/bin
44 rm -f crictl-$VERSION-linux-amd64.tar.gz
45 minikube start --vm-driver=none
46 mv /root/.kube /root/.minikube $HOME
47 chown -R $USER $HOME/.kube $HOME/.minikube
48 minikube --version
49 minikube -version
50 minikube status
51 kubectl get nodes
52 kubectl describe node ip-172-31-36-8
53 curl https://docs.projectcalico.org/manifests/calico-typha.yaml -o calico.yaml
54 kubectl apply -f calico.yaml
55 kubectl get nodes
56 minikube stop
57 minikube start
58 kubectl get nodes
59 kubectl run mypod --image=nginx
60 kubectl get pods
61 kubectl create ns myns
62 kubectl get ns
63 history
No comments:
Post a Comment