KCP on Power

Pre-requisites

  • IBM Power resource for deploying KCP server
  • Install Go
git clone https://github.com/rpsene/goconfig.gitcd ./goconfigsource ./go.sh install
  • Install kubectl
curl -LO "https://dl.k8s.io/release/$(curl -L -s https://dl.k8s.io/release/stable.txt)/bin/linux/ppc64le/kubectl"chmod +x kubectl
  • Install kind
curl -Lo ./kind "https://github.com/kubernetes-sigs/kind/releases/download/v0.14.0/kind-linux-ppc64le"chmod +x ./kindmv ./kind /usr/local/bin/
  • Install Docker
mkdir /root/docker; cd /root/dockerwget https://oplab9.parqtec.unicamp.br/pub/ppc64el/docker/version-19.03.7/centos/docker-ce-19.03.7-3.el7.ppc64le.rpmwget https://oplab9.parqtec.unicamp.br/pub/ppc64el/docker/version-19.03.7/centos/docker-ce-cli-19.03.7-3.el7.ppc64le.rpmwget https://oplab9.parqtec.unicamp.br/pub/repository/rpm/ppc64le/containerd/containerd-1.6.4-1.ppc64le.rpmyum install docker-ce-cli-19.03.7-3.el7.ppc64le.rpm docker-ce-19.03.7-3.el7.ppc64le.rpm containerd-1.2.14-1.el7.ppc64le.rpmservice docker start

Deploy KCP server on Power

  1. Clone KCP source code
git clone https://github.com/kcp-dev/kcp.git
cd kcp && makemake installgo install ./cmd/...export PATH=$PWD/bin:$PATH
kcp start
cd kcpexport KUBECONFIG=/root/kcp/.kcp/admin.kubeconfigkubectl api-resources

Deploy application on KCP server

  1. Create a new organization and workspace to deploy the application in isolated environment.
  • First check your current workspace, using below command:
kubectl kcp workspace .
  • Navigate to root workspace using below command multiple times(4 times in our case)until you reach root workspace:
kubectl kcp workspace ..
kubectl kcp workspace create --type=Organization org1kubectl get workspaces       //list workspaceskubectl kcp workspace use org1     //enter organization
kubectl kcp workspace create workspace1kubectl get workspaces       //list workspaceskubectl kcp workspace use workspace1    //enter workspace
kubectl create namespace defaultkubectl kcp workload sync <cluster-name> --syncer-image ghcr.io/kcp-dev/kcp/syncer:main -o syncer.yaml
kind create cluster --image docker.io/mwaghmodepersistent/kindnode:ppc64le --name <cluster-name>
kubectl apply -f syncer.yamlkubectl api-resources

git clone https://github.com/snehakpersistent/golang-hello-world.git
cd golang-hello-worldkubectl apply -f deployment.yamlkubectl get pods
kubectl port-forward --address localhost,<public-ip-of-VM> <pod-name> 3000:3000

--

--

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store
Sneha Kanekar

Sneha Kanekar

Engineering Lead at Persistent Systems