hit-lacus edited a comment on pull request #1182: URL: https://github.com/apache/kylin/pull/1182#issuecomment-619861773
## Create Memcached Service - Create namespace ```shell root@open-source:/home/ubuntu/kylin-kubernetes/kubernetes/example/deployment# kubectl create namespace kylin-example Error from server (AlreadyExists): namespaces "kylin-example" already exists ``` - Create memcached service ```shell root@open-source:/home/ubuntu/kylin-kubernetes/kubernetes/example/deployment# kubectl apply -f memcached service/cache-svc created statefulset.apps/kylin-memcached created ``` - Check service and pod state ```shell root@open-source:/home/ubuntu/kylin-kubernetes/kubernetes/example/deployment# kubectl get pod -n kylin-example NAME READY STATUS RESTARTS AGE kylin-memcached-0 1/1 Running 0 60s root@open-source:/home/ubuntu/kylin-kubernetes/kubernetes/example/deployment# kubectl get svc -n kylin-example NAME TYPE CLUSTER-IP EXTERNAL-IP PORT(S) AGE cache-svc ClusterIP None <none> 11211/TCP 69s ``` - Check hostname ``` root@open-source:/home/ubuntu/kylin-kubernetes/kubernetes/example/deployment# root@open-source:/home/ubuntu/kylin-kubernetes/kubernetes/example/deployment# kubectl run -it --image=busybox:1.28.4 --rm --restart=Never sh -n test-dnsIf you don't see a command prompt, try pressing enter. / # nslookup cache-svc.kylin-example.svc.cluster.local Server: 10.96.0.10 Address 1: 10.96.0.10 kube-dns.kube-system.svc.cluster.local Name: cache-svc.kylin-example.svc.cluster.local Address 1: 192.168.11.9 kylin-memcached-0.cache-svc.kylin-example.svc.cluster.local / # telnet cache-svc.kylin-example.svc.cluster.local 11211 ^C ``` ---------------------------------------------------------------- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: [email protected]
