Closed FangKee closed 1 year ago
Write files so the kubeconfig points to correct locations
Ŀ¼: C:\var\lib
Mode LastWriteTime Length Name
d----- 2023/7/13 10:56 kube-proxy
Finding sourcevip
���� Null �������������
����λ�� C:\hpc\kube-proxy\start.ps1:19 �ַ�: 9
+ CategoryInfo : InvalidOperation: (:) []��ParentContainsErrorRecordException
+ FullyQualifiedErrorId : NullArray
It feels like it's a path issue. When I execute flannel start.ps1 , it will show that Path is empty
You need to build the images for flannel and kube-proxy on your own. I'm running flannel successfully on v0.21.5
I already build flannel
You need to build the images for flannel and kube-proxy on your own. I'm running flannel successfully on v0.21.5
On the Windows node ? Sorry, I'm a novice please can you tech me look at the working steps Thank you @Mik4sa very much. It's important to me
curl -L https://raw.githubusercontent.com/kubernetes-sigs/sig-windows-tools/master/hostprocess/flannel/flanneld/flannel-overlay.yml | sed 's/FLANNEL_VERSION/v0.21.5/g' | sed "s/KUBERNETES_SERVICE_HOST_VALUE/$kubernetesServiceHost/g" | sed "s/KUBERNETES_SERVICE_PORT_VALUE/$kubernetesServicePort/g" | kubectl apply -f -
sigwindowstools/flannel:FLANNEL_VERSION-hostprocess not have 0.21.5 only v0.14.0 0.13.0 0.17.0
I'm a novice please can you tech me look at the working steps
I see. Let me clarify some terminology first.
I already build flannel
As far as I can see you didn't build
an own image for flannel instead you deployed
an existing image.
The problem with existing images on docker hub is that they no longer match the guide on the master branch. So instead you need to build/create and push your own image to docker hub or any other accessible registry from your cluster and you that in your manifests.
In case they fit your needs you can use my images but keep in mind that they are subject to change at anytime. You are better advised to create your own.
These are my images:
To build your own images prepare a docker installation powered by linux containers on a windows system. Execute this command to create the builder needed to build flannel and kube-proxy:
docker buildx create --name img-builder --use --platform windows/amd64
Afterwars clone this repo and checkout the master branch. Open this folder in a terminal /hostprocess/flannel/flanneld
.
Set $flannelVersion
and $repository
accordingly. I used for example $flannelVersion="v0.21.5"
and $repository="mik4sa"
. Last but not least execute this command to build and push your image:
docker buildx build --provenance=false --sbom=false --platform windows/amd64 --output=type=registry --pull --build-arg=flannelVersion=$flannelVersion -f Dockerfile -t $repository/flannel:$flannelVersion-hostprocess .
Next open this folder in a terminal /hostprocess/flannel/kube-proxy
.
Set $proxyVersion
and $repository
accordingly. I used for example $proxyVersion="v1.27.1"
and $repository="mik4sa"
. Last but not least execute this command to build and push your image:
docker buildx build --provenance=false --sbom=false --platform windows/amd64 --output=type=registry --pull --build-arg=k8sVersion=$proxyVersion -f Dockerfile -t $repository/kube-proxy:$proxyVersion-flannel-hostprocess .
In the manifest you apply, so flannel-overlay.yml
and kube-proxy.yml
you need to reference the image you just created. So change image: sigwindowstools/[...]
to image: mik4sa/[...]
I'm a novice please can you tech me look at the working steps
I see. Let me clarify some terminology first.
I already build flannel
As far as I can see you didn't
build
an own image for flannel instead youdeployed
an existing image. The problem with existing images on docker hub is that they no longer match the guide on the master branch. So instead you need to build/create and push your own image to docker hub or any other accessible registry from your cluster and you that in your manifests.In case they fit your needs you can use my images but keep in mind that they are subject to change at anytime. You are better advised to create your own.
These are my images:
- mik4sa/flannel:v0.21.5-hostprocess
- mik4sa/kube-proxy:v1.27.1-flannel-hostprocess
- mik4sa/kube-proxy:v1.27.2-flannel-hostprocess
To build your own images prepare a docker installation powered by linux containers on a windows system. Execute this command to create the builder needed to build flannel and kube-proxy:
docker buildx create --name img-builder --use --platform windows/amd64
Afterwars clone this repo and checkout the master branch. Open this folder in a terminal
/hostprocess/flannel/flanneld
. Set$flannelVersion
and$repository
accordingly. I used for example$flannelVersion="v0.21.5"
and$repository="mik4sa"
. Last but not least execute this command to build and push your image:docker buildx build --provenance=false --sbom=false --platform windows/amd64 --output=type=registry --pull --build-arg=flannelVersion=$flannelVersion -f Dockerfile -t $repository/flannel:$flannelVersion-hostprocess .
Next open this folder in a terminal
/hostprocess/flannel/kube-proxy
. Set$proxyVersion
and$repository
accordingly. I used for example$proxyVersion="v1.27.1"
and$repository="mik4sa"
. Last but not least execute this command to build and push your image:docker buildx build --provenance=false --sbom=false --platform windows/amd64 --output=type=registry --pull --build-arg=k8sVersion=$proxyVersion -f Dockerfile -t $repository/kube-proxy:$proxyVersion-flannel-hostprocess .
In the manifest you apply, so
flannel-overlay.yml
andkube-proxy.yml
you need to reference the image you just created. So changeimage: sigwindowstools/[...]
toimage: mik4sa/[...]
Thank you very very much,Now it's successful.
This working steps Helped me a lot, a lot
heartfelt thanks @Mik4sa
heartfelt thanks @Mik4sa
kubernetes: v1.27.1 Windows Server: 2022 Datacenter