File tree Expand file tree Collapse file tree 2 files changed +7
-8
lines changed Expand file tree Collapse file tree 2 files changed +7
-8
lines changed Original file line number Diff line number Diff line change 1
1
# Deploy kubernetes via k3s (which installs a bundled containerd).
2
+ # $ limactl start ./k3s.yaml
3
+ # $ limactl shell k3s sudo kubectl
2
4
#
3
5
# It can be accessed from the host by exporting the kubeconfig file;
4
6
# the ports are already forwarded automatically by lima:
Original file line number Diff line number Diff line change 1
1
# Deploy kubernetes via kubeadm.
2
+ # $ limactl start ./k8s.yaml
3
+ # $ limactl shell k8s sudo kubectl
2
4
3
5
# It can be accessed from the host by exporting the kubeconfig file;
4
6
# the ports are already forwarded automatically by lima:
5
7
#
6
8
# $ export KUBECONFIG=$PWD/kubeconfig.yaml
7
- # $ limactl shell k8s sudo cat /etc/kubernetes/admin.conf | sed -e 's/192.168.5.15/127.0.0.1/' >$KUBECONFIG
9
+ # $ limactl shell k8s sudo cat /etc/kubernetes/admin.conf >$KUBECONFIG
8
10
# $ kubectl get no
9
11
# NAME STATUS ROLES AGE VERSION
10
12
# lima-k8s Ready control-plane,master 44s v1.22.3
@@ -73,13 +75,8 @@ provision:
73
75
kubectl apply -f https://raw.githubusercontent.com/flannel-io/flannel/v0.14.0/Documentation/kube-flannel.yml
74
76
# Control plane node isolation
75
77
kubectl taint nodes --all node-role.kubernetes.io/master-
76
- - mode : user
77
- script : |
78
- #!/bin/bash
79
- set -eux -o pipefail
80
- mkdir -p $HOME/.kube
81
- sudo cp -f /etc/kubernetes/admin.conf $HOME/.kube/config
82
- sudo chown $(id -u):$(id -g) $HOME/.kube/config
78
+ sed -e "s/${LIMA_CIDATA_SLIRP_IP_ADDRESS:-192.168.5.15}/127.0.0.1/" -i $KUBECONFIG
79
+ mkdir -p ${HOME:-/root}/.kube && cp -f $KUBECONFIG ${HOME:-/root}/.kube/config
83
80
probes :
84
81
- script : |
85
82
#!/bin/bash
You can’t perform that action at this time.
0 commit comments