Slide 45
Slide 45 text
$ puppet resource kubernetes_pod sample-pod
kubernetes_pod { 'sample-pod':
ensure => 'present',
metadata => {
'creationTimestamp' => '2016-01-20T14:03:23Z',
'name' => 'sample-pod',
'namespace' => 'default',
'resourceVersion' => '4579',
'selfLink' => '/api/v1/namespaces/default/pods/sample-pod’,
'uid' => '91c8a550-bf7e-11e5-816e-42010af001b1'
},
spec => {
'containers' => [{
‘image' => 'nginx',
'imagePullPolicy' => 'IfNotPresent',
'name' => ‘container-name',
'resources' => {'requests' => {'cpu' => '100m'}}, 'terminationMessagePat
[{'mountPath' => '/var/run/secrets/kubernetes.io/serviceaccount', 'name'
'dnsPolicy' => 'ClusterFirst', 'nodeName' => 'gke-guestbook-dc15a31a-nod
puppet resource allows for interrogating an existing
Kubernetes installation
Gareth Rushgrove