Last active
June 22, 2017 17:36
-
-
Save sjenning/7dd61a22435e5e92e1882c1b6f032c0d to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Until packages hit repo: | |
| curl -O https://kojipkgs.fedoraproject.org//packages/cri-o/1.0.0.alpha.0/0.git5dcbdc0.fc26.2/x86_64/cri-o-1.0.0.alpha.0-0.git5dcbdc0.fc26.2.x86_64.rpm | |
| dnf install -y cri-o-1.0.0.alpha.0-0.git5dcbdc0.fc26.2.x86_64.rpm | |
| Otherwise just: | |
| dnf install -y cri-o | |
| curl -L -O https://github.com/containernetworking/cni/releases/download/v0.5.2/cni-amd64-v0.5.2.tgz | |
| mkdir -p /opt/cni/bin | |
| tar xf cni-amd64-v0.5.2.tgz -C /opt/cni/bin/ | |
| mkdir -p /etc/cni/net.d | |
| curl -o /etc/cni/net.d/10-crio-bridge.conf https://raw.githubusercontent.com/kubernetes-incubator/cri-o/master/contrib/cni/10-crio-bridge.conf | |
| systemctl enable --now crio | |
| dnf install kubernetes etcd -y | |
| systemctl enable --now etcd | |
| vi /etc/kubernetes/apiserver | |
| # remove ServiceAccount /etc/kubernetes/apiserver | |
| vi /etc/kubernetes/kubelet | |
| # add "--container-runtime=remote --container-runtime-endpoint=/var/run/crio.sock" to KUBELET_ARGS | |
| vi /usr/lib/systemd/system/kubelet.service | |
| # remove docker.service dependency | |
| systemctl daemon-reload | |
| systemctl enable --now kube-apiserver kube-scheduler kube-controller-manager kube-proxy kubelet | |
| kubectl get nodes | |
| vi hello-openshift-pod.yaml | |
| --- | |
| kind: Pod | |
| apiVersion: v1 | |
| metadata: | |
| name: hello-openshift | |
| spec: | |
| containers: | |
| - name: hello-openshift | |
| image: openshift/hello-openshift | |
| ports: | |
| - containerPort: 8080 | |
| protocol: TCP | |
| kubectl create -f hello-openshift-pod.yaml | |
| kubectl get pod | |
| docker ps | |
| ps -fe | grep docker | |
| crioctl pod list | |
| kubectl describe pod hello-openshift | |
| ip a | |
| curl http://<pod-ip>:8080/ | |
| kubectl logs hello-openshift | |
| kubectl run busybox --image=busybox --command -- sleep 300 | |
| kubectl exec -ti <busybox-pod> /bin/sh |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment