miniature-potato-84713
02/06/2019, 10:22 PMk8s.core.v1.Service()
) and wondering if there’s a problem linked to the isMinikube
setting.gorgeous-egg-16927
02/06/2019, 10:31 PMminiature-potato-84713
02/06/2019, 10:35 PM"ClusterIP"
when trying to allocate a local IP. For example with the Guestbook example code.
Using the Docker for Mac k8s cluster. I’ll try minikube next.creamy-potato-29402
02/06/2019, 10:43 PMhostname
instead of the IP in the .status
gieldminiature-potato-84713
02/06/2019, 11:42 PMgorgeous-egg-16927
02/06/2019, 11:48 PMminiature-potato-84713
02/07/2019, 12:06 AMcreamy-potato-29402
02/07/2019, 12:46 AMisMinikube
to true.miniature-potato-84713
02/07/2019, 12:49 AMcreamy-potato-29402
02/07/2019, 12:49 AMminiature-potato-84713
02/07/2019, 12:50 AMcreamy-potato-29402
02/07/2019, 12:50 AMminiature-potato-84713
02/07/2019, 12:54 AMcreamy-potato-29402
02/07/2019, 12:54 AMminiature-potato-84713
02/07/2019, 12:54 AMcreamy-potato-29402
02/07/2019, 12:54 AM$ minikube start
There is a newer version of minikube available (v0.33.1). Download it here:
<https://github.com/kubernetes/minikube/releases/tag/v0.33.1>
To disable this notification, run the following:
minikube config set WantUpdateNotification false
Starting local Kubernetes v1.10.0 cluster...
Starting VM...
E0206 16:54:35.569372 74404 start.go:174] Error starting host: Error starting stopped host: Error setting up host only network on machine start: host-only cidr conflicts with the network address of a host interface.
Retrying.
E0206 16:54:35.569881 74404 start.go:180] Error starting host: Error starting stopped host: Error setting up host only network on machine start: host-only cidr conflicts with the network address of a host interface
miniature-potato-84713
02/07/2019, 12:55 AMcreamy-potato-29402
02/07/2019, 12:57 AMkubectl get
is?miniature-potato-84713
02/07/2019, 1:01 AMup
firstget
which resource type do you want?creamy-potato-29402
02/07/2019, 1:11 AMminiature-potato-84713
02/07/2019, 1:11 AMfrontend-aqczm1da LoadBalancer 10.98.147.145 <pending> 80:32229/TCP 9m
guestbook:isMinikube: "true"
creamy-potato-29402
02/07/2019, 1:12 AMpulumi stack ls
miniature-potato-84713
02/07/2019, 1:13 AMcreamy-potato-29402
02/07/2019, 1:13 AMminiature-potato-84713
02/07/2019, 1:16 AMup
again, making sure that the config says it’s a minikube (i.e. don’t use the load balancer). But you mentioned earlier the
in DfM they populatewhich would mean that I shouldn’t useinstead of the IP in thehostname
gield.status
"clusterIP"
, correct?creamy-potato-29402
02/07/2019, 1:16 AMisMinikube
should only decide whether the service should be type clusterIP or notpulumi config set isMinikube true
and then pulumi config
and tell me the output?miniature-potato-84713
02/07/2019, 1:18 AMKEY VALUE
guestbook:isMinikube true
That’s what’s noodling right now through pulumi up
creamy-potato-29402
02/07/2019, 1:18 AMguestbook
miniature-potato-84713
02/07/2019, 1:18 AMpulumi-examples/kubernetes-ts-guestbook/components > pulumi config
KEY VALUE
guestbook:isMinikube true
creamy-potato-29402
02/07/2019, 1:19 AMget -o yaml
the service object you’re waiting on, what does it show?miniature-potato-84713
02/07/2019, 1:21 AM> kubectl get services
NAME TYPE CLUSTER-IP EXTERNAL-IP PORT(S) AGE
frontend-cjxb1rpy LoadBalancer 10.105.151.196 <pending> 80:32503/TCP 6m
redis-master-7w2eedl3 ClusterIP 10.102.106.173 <none> 6379/TCP 6m
redis-replica-wo7gjc3z ClusterIP 10.101.191.1 <none> 6379/TCP 6m
creamy-potato-29402
02/07/2019, 1:21 AMminiature-potato-84713
02/07/2019, 1:22 AM> kubectl get service frontend-cjxb1rpy -o yaml
apiVersion: v1
kind: Service
metadata:
annotations:
<http://pulumi.com/autonamed|pulumi.com/autonamed>: "true"
creationTimestamp: 2019-02-07T01:13:25Z
name: frontend-cjxb1rpy
namespace: default
resourceVersion: "80631"
selfLink: /api/v1/namespaces/default/services/frontend-cjxb1rpy
uid: 91d0f047-2a75-11e9-a4f9-025000000001
spec:
clusterIP: 10.105.151.196
externalTrafficPolicy: Cluster
ports:
- nodePort: 32503
port: 80
protocol: TCP
targetPort: 80
selector:
app: frontend
sessionAffinity: None
type: LoadBalancer
status:
loadBalancer: {}
creamy-potato-29402
02/07/2019, 1:22 AMlet frontend = new k8sjs.ServiceDeployment("frontend", {
replicas: 3,
image: "<http://gcr.io/google-samples/gb-frontend:v4|gcr.io/google-samples/gb-frontend:v4>",
ports: [80],
allocateIpAddress: true,
isMinikube: true
});
miniature-potato-84713
02/07/2019, 1:22 AMcreamy-potato-29402
02/07/2019, 1:23 AMminiature-potato-84713
02/07/2019, 1:23 AMup
is still noodling…creamy-potato-29402
02/07/2019, 1:23 AMminiature-potato-84713
02/07/2019, 1:23 AMcreamy-potato-29402
02/07/2019, 1:23 AMminiature-potato-84713
02/07/2019, 1:24 AMup
again…Outputs:
+ frontendIp: "10.99.213.188"
Resources:
+-1 replaced
9 unchanged
Duration: 15s
creamy-potato-29402
02/07/2019, 1:25 AMisMinikube
is set incorrectlypulumi config set isMinikube true
is not the same thing as pulumi config set guestbook:isMinikube true
guestbook
miniature-potato-84713
02/07/2019, 1:26 AMcreamy-potato-29402
02/07/2019, 1:27 AMpulumi stack ls
miniature-potato-84713
02/07/2019, 1:27 AMtestbook
vs guestbook
creamy-potato-29402
02/07/2019, 1:27 AMminiature-potato-84713
02/07/2019, 1:27 AMpulumi configKEY VALUE guestbook:isMinikube true
pulumi stack lsNAME LAST UPDATE RESOURCE COUNT URL testbook* 1 minute ago 11 https://app.pulumi.com/jenstroeger/guestbook-easy/testbook
creamy-potato-29402
02/07/2019, 1:27 AMminiature-potato-84713
02/07/2019, 1:28 AM$ pulumi stack init
Enter a stack name: testbook
and then
pulumi config set guestbook:isMinikube <value>
creamy-potato-29402
02/07/2019, 1:29 AMminiature-potato-84713
02/07/2019, 1:29 AM$ pulumi up
Updating stack 'k8sjs-guestbook'
...
Yeah I think that’s a bit inconsistent here 😉creamy-potato-29402
02/07/2019, 1:29 AMminiature-potato-84713
02/07/2019, 1:30 AMcreamy-potato-29402
02/07/2019, 1:30 AMminiature-potato-84713
02/07/2019, 1:34 AMup
output as well?creamy-potato-29402
02/07/2019, 1:38 AMminiature-potato-84713
02/07/2019, 1:39 AMlet config = new pulumi.Config("guestbook");
creamy-potato-29402
02/07/2019, 1:51 AMminiature-potato-84713
02/07/2019, 1:51 AMcreamy-potato-29402
02/07/2019, 1:52 AMpulumi config set isMinikube true
will set it to true independent of what your stack is called.miniature-potato-84713
02/07/2019, 1:52 AM> pulumi config
KEY VALUE
guestbook:isMinikube true
> pulumi stack ls
NAME LAST UPDATE RESOURCE COUNT URL
guestbook* in progress 10 <https://app.pulumi.com/jenstroeger/guestbook-easy/guestbook>
creamy-potato-29402
02/07/2019, 1:53 AMminiature-potato-84713
02/07/2019, 1:54 AMguestbook-easy
come from?creamy-potato-29402
02/07/2019, 1:54 AMminiature-potato-84713
02/07/2019, 1:55 AM> pulumi stack init
Enter a stack name: guestbook
Created stack 'guestbook'
> pulumi config set guestbook:isMinikube true
> pulumi up
Previewing update (guestbook):
Type Name Plan
+ pulumi:pulumi:Stack guestbook-easy-guestbook create
Huh?creamy-potato-29402
02/07/2019, 1:56 AMguestbook:
from the pulumi config set
miniature-potato-84713
02/07/2019, 1:56 AM> cat Pulumi.yaml
name: guestbook-easy
runtime: nodejs
description: Kubernetes Guestbook example based on <https://kubernetes.io/docs/tutorials/stateless-application/guestbook/>
template:
config:
isMinikube:
description: Whether you are deploying to minikube
default: true
creamy-potato-29402
02/07/2019, 1:57 AMminiature-potato-84713
02/07/2019, 2:06 AM10.105.48.30
but maybe I don’t care right now.creamy-potato-29402
02/07/2019, 2:38 AMminiature-potato-84713
02/07/2019, 3:45 AMcreamy-potato-29402
02/07/2019, 3:45 AMminiature-potato-84713
02/07/2019, 3:46 AMkubectl proxy
creamy-potato-29402
02/07/2019, 3:47 AMminiature-potato-84713
02/07/2019, 3:49 AMcreamy-potato-29402
02/07/2019, 3:49 AMminiature-potato-84713
02/07/2019, 3:51 AMcreamy-potato-29402
02/07/2019, 3:52 AMminiature-potato-84713
02/07/2019, 3:54 AMcreamy-potato-29402
02/07/2019, 3:55 AMminiature-potato-84713
02/07/2019, 3:55 AMcreamy-potato-29402
02/07/2019, 4:02 AM